vsftpd 要限制特定 ip 連線必須使用 xinetd
1. 編輯 vsftpd.conf
/etc/vsftpd/vsftpd.conf
1. listen=NO
2. tcp_wrappers=YES
2. 編輯 xinetd 的 vsftpd
# 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
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
server_args = /etc/vsftpd/vsftpd.conf
nice = 10
only_from = 127.0.0.1 192.168.0.1 192.168.0.2
}
3. 將舊的停掉
cd /etc/init.d/
mv vsftpd vsftpd.old
4. 重新啟動服務
chkconfig vsftpd on
service vsftpd start
Thursday, November 23, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment