vsftp搭配iptables的配置
[similarface@InnerTest vsftpd]$ ll total 48 -rw------- 1 root root 125 Mar 23 02:26 ftpusers -rw-r--r-- 1 root root 12288 May 27 14:47 logins.db -rw-r--r-- 1 root root 34 May 27 14:40 login_users drwxr-xr-x 2 root root 4096 May 27 16:29 user_config_dir -rw------- 1 root root 361 Mar 23 02:26 user_list -rw------- 1 root root 595 May 27 16:43 vsftpd.conf -rw------- 1 root root 4599 May 27 14:43 vsftpd.conf.bak -rwxr--r-- 1 root root 338 Mar 23 02:26 vsftpd_conf_migrate.sh -rw-r--r-- 1 root root 12288 May 27 14:55 vu_list.db [similarface@InnerTest vsftpd]$
[similarface@InnerTest vsftpd]$ sudo cat vsftpd.conf anonymous_enable=no local_enable=YES dirmessage_enable=YES xferlog_enable=Yes xferlog_file=/var/log/vsftpd.log connect_from_port_20=YES xferlog_std_format=YES listen=YES #listen_port=5222 userlist_enable=YES chroot_local_user=YES tcp_wrappers=YES local_root=/data/vcf/ guest_enable=YES guest_username=vftp pam_service_name=vsftpd_uv user_config_dir=/etc/vsftpd/user_config_dir virtual_use_local_privs=YES pasv_min_port=50000 pasv_max_port=50010 pasv_enable=YES max_clients=200 max_per_ip=4 idle_session_timeout=600 ftpd_banner=Welcometo23mofangFTPService pasv_min_port=28000 pasv_max_port=28999
[similarface@InnerTest user_config_dir]$ cat admin write_enable=YES anonymous_enable=NO anon_world_readable_only=NO anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES local_umask=022 download_enable=Yes local_root=/data/result/vcf/
[similarface@InnerTest vsftpd]$ cat login_users admin vcf
[similarface@InnerTest vsftpd]$ cat /etc/pam.d/vsftpd_uv auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vu_list account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vu_list
cat /etc/sysconfig/iptables:
#开启ftp 上传 by similarface -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 28000:28999 -j ACCEPT