pasv_promiscuous=NO:该参数指定是否允许非本地IP地址使用被动模式。设置为 NO 表示只有本地IP地址才能使用被动模式。
port_promiscuous=NO:该参数指定是否允许非本地IP地址使用主动模式。设置为 NO 表示只有本地IP地址才能使用主动模式。
客户端搭建
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
yum install ftp -y
[root@02v ~]# ftp 10.192.233.182
Connected to 10.192.233.182 (10.192.233.182).
220 (vsFTPd 3.0.2)
Name (10.192.233.182:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pass
Passive mode off.
ftp> pass
Passive mode on.
ftp> ls
227 Entering Passive Mode (172,17,0,1,79,58).
150 Here comes the directory listing.
226 Directory send OK.
ftp> put /root/test.py test.py
local: /root/test.py remote: test.py
227 Entering Passive Mode (172,17,0,1,79,45).
150 Ok to send data.
226 Transfer complete.
4567 bytes sent in 0.0868 secs (52.63 Kbytes/sec)
ftp> ls
227 Entering Passive Mode (172,17,0,1,80,101).
150 Here comes the directory listing.
-rw------- 1 ftp ftp 4567 Jun 08 08:04 test.py
226 Directory send OK.
ftp>