1.VSFTP Login Error: 227 Entering Passive Mod
Server installed Vsftp, due to the iptables limit, the file can not be uploaded to the FTP server, see the route is good, log in to see.
2. Causes and Solutions
This is due to the FTP active mode. When the client connects to FTP, the default is passive mode, to change the FTP server mode to passive.
#将vsftpd的模式修改为被动模式, add the following three lines to the configuration file, restart the VSFTP service
Pasv_enable=yes
pasv_min_port=30000
pasv_max_port=30999
Firewall allows client 210.21.18.205 access
/sbin/iptables-a input-p tcp-s 210.21.18.205--dport 5021-i eth3-j ACCEPT
/sbin/iptables-a input-p tcp-s 210.21.18.205--dport 30000:30999-i eth3-j ACCEPT
3. Principle: FTP Transfer Mode
There are two modes of data transmission in FTP protocol: Active mode and passive mode.
The two modes initiate the connection in the opposite direction, the active mode is initiated from the server side to the client, and the passive mode is the client initiates the connection to the server side.
But if there is a firewall between the server and the customer, the active mode often causes some trouble. Imagine that the client is behind a firewall and the firewall allows all internal connections to be made externally, but there are many limitations to externally initiated connections. In this case, the customer can establish a control connection with the server normally, and if you use active mode, data transfer commands such as LS, put, and get are difficult to run successfully because the firewall blocks the data transfer connection from the server to the customer. The simple packet filtering firewall separates the control connection and the data transfer connection completely, so it is difficult to configure the firewall to allow active mode FTP data transfer connections. If the firewall allows ICMP or TCP RST messages to pass, the client will return the connection refused error message immediately, and if the firewall is simply discarded, it will cause the client program to hang for a period of time.
This article is from "Kaka West" blog, please be sure to keep this source http://whnba.blog.51cto.com/1215711/1619597
VSFTP Login Error: 227 Entering Passive Mode