在
Rh EL4
下以
xinetd
的方式启动
vsftpd<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
1、
安装vsftpd(以rpm包方式)
2、
修改/etc/vsftpd/vsftpd.conf 下的linsten=YES 改为listen=NO,关闭独立模式启动
默认 tcp_wrappers=YES ,支持xinetd方式启动。
3、
查看vsftpd安装包
4、
rpm –ql vsftpd | grep xinetd 查询文件地方
5、
cp /usr/share/doc/vsftpd-<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />2.0.1/vsftpd.xinetd /etc/xinetd.d/vsftpd
6、
vi /etc/xinetd.d/vsftpd
# default: off
# description: The vsftpd FTP server serves FTP connections. It uses \
# normal, unencrypted usernames and passwords for authentication.
service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
server_args = /etc/vsftpd/vsftpd.conf
nice = 10
disable = no
flags = IPv4
access_times = 13:00-17:00 ;
限制访问时间
only_from = 10.0.0.0
;限制访问地址
no_access = 10.10.10.10 ;
拒绝访问
}Netstat
–
ln | grep 21
端口查询
更多选项可以man /etc/xinetd.conf
7、
重新启动xinetd服务 service xinetd restart
8、
查看ftp :netstat -an |grep :21
9、
还可以通过 /etc/hosts.allow 和 /etc/hosts.deny 来限制客户端对ftp的访问
转载于:https://blog.51cto.com/zhangxuelei/187775