vsftpd启动方式改变为xinetd
2016-05-23 16:57
609 查看
一.软件安装:
方法1:修改配置文件
[root@localhost ~]#yum -y install vsftpd xinetd ftp
[root@localhost ~]#cp /usr/share/doc/vsftpd-2.2.2/vsftpd.xinetd /etc/xinetd.d/vsftpd三.修改配置文件
[root@localhost ~]#cat /etc/vsftpd/vsftpd.conf |grep listen= (默认yes改为no) listen=NO [root@localhost ~]# cat /etc/vsftpd/vsftpd.conf |grep tcp_wrapper (默认yes改为no) tcp_wrappers=NO [root@localhost ~]# cat /etc/xinetd.d/vsftpd |grep disable (默认yes改为no) disable= no四.启动服务
[root@localhost ~]# /etc/init.d/xinetd restart五.测试
[root@localhost ~]# ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 (vsFTPd 2.2.2) Name (127.0.0.1:root): xxxx 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp>扩展操作:限制客户访问vsftpd的访问时间段(限制客户8:30到11:30可以登录)
方法1:修改配置文件
[root@localhost ~]# vim /etc/xinetd.d/vsftpd service ftp{ socket_type = stream wait = no user = root server = /usr/sbin/vsftpd server_args = /etc/vsftpd/vsftpd.conf nice = 10 disable = no access_times =8:30-11:30 #(限制客户8:30到11:30可以登录) flags = IPv4 } [root@localhost ~]# /etc/init.d/xinetd restart #即可在指定时间段登陆
[root@localhost ~]# iptables -A INPUT -p tcp -s 192.168.66.0/255.255.255.0 --dport 21 -m time --timestart 8:30 --timestop 11:30 -j ACCEPT [root@localhost ~]# iptables -A OUTPUT -p tcp -d 192.168.66.0/255.255.255.0 --sport 21 -m time --timestart 8:30 --timestop 11:30 -j ACCEPT原文地址:http://blog.chinaunix.net/uid-26719405-id-3919506.html
相关文章推荐
- BootISO:从 ISO 文件中创建一个可启动的 USB 设备
- 用vsftp快速搭建ftp服务器
- [游戏资讯]《极品飞车16:亡命狂飙》配置需求公布
- 配置文件神器 typesafe conf 用法简介
- 配置文件神器 typesafe conf 用法简介
- 路由器备份配置
- 实现FTP整站上传的批处理代码
- 批处理向FTP上传具有指定属性的文件(增量备份)
- 使用 iisftpdr.vbs 创建 FTP 虚拟目录的方法
- 路由器启动的顺序
- 路由器的基本配置
- 路由器基础配置及传输协议
- 经典配置 Vlan篇
- 备份线路的配置
- Delphi解析FTP地址的方法
- 交换机如何配置 新手配置交换机详细教程
- 如何进行系统配置
- 路由器的配置与调试
- DOS下内存的配置