機能対外vsftpdサービス構築プロセス
1945 ワード
1. IP
#netconfig -d eth0
2. vsftpd
#yum -y install
3. /etc/vsftpd/vsftpd.conf
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=yes
write_enable=yes
listen=yes
listen_address=0.0.0.0 #or public ip
listen_port=21
port_enable=yes
pasv_enable=yes
pasv_min_port=5000
pasv_max_port=6000
idle_session_timeout=300
data_connection_timeout=120
local_max_rate=2048000
max_clients=150
max_per_ip=4
chroot_local_user=yes
userlist_enable=yes
userlist_deny=yes
userlist_file=/etc/vsftpd/deny_users
tcp_wrappers=yes
user_config_dir=/etc/vsftpd/conf
4.
#touch /etc/vsftpd/deny_users
#mkdir /etc/vsftpd/conf
5. vsftpd
#ntsysv --level 345
#service vsftpd restart
6. ftp
(1) ftp
#useradd -s /sbin/nologin
#passwd
(2)
#vi /etc/vsftpd/deny_users
.........
(3) FTP
#vi /etc/hosts.allow // FTP
.....
vsftpd:ip /
#vi /etc/hosts.deny // FTP
....
vsftpd:ip /
7.0
1, selinux
sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/conf
setenforce 0
2,
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5000:6000 -j ACCEPT
8.0 , selinux
1, 530 Login incorrect
2, [root@localhost network-scripts]# ftp *.*.*.*
Connected to *.*.*.*.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS
3, FTP,
ftp: connect: No route to host
ftp> dir
227 Entering Passive Mode (*,*,*,*,20,178)