在Debian系統中,可通過以下方式限制vsftp訪問:
/etc/vsftpd.conf
,設置userlist_enable=YES
,指定userlist_file=/etc/vsftpd.userlist
,并在該文件中添加允許訪問的用戶,userlist_deny=NO
表示僅允許列表中用戶訪問。/etc/vsftpd.conf
,設置tcp_wrappers=YES
,然后編輯/etc/hosts.deny
和/etc/hosts.allow
,在hosts.deny
中拒絕所有IP,hosts.allow
中添加允許訪問的IP。