Pureftp itself can transmit files and reflect speed, but when only active mode is turned on, the linked server will become very unstable, often with file transfer failures,
In this case, we can solve the problem by opening the passive mode.
Passive mode by default is to open a port range, all passive FTP links through the scope, you can view the configuration file acquisition, generally installed in the/usr/local/pureftpd/pure-ftpd.conf
Find this configuration entry, the passive mode available port defaults to 20000-30000
The code is as follows |
Copy Code |
PassivePortRange 20000 30000 |
You can use passive mode on FTP links simply by adding these ports to the firewall allow rules.
The code is as follows |
Copy Code |
Vi/etc/sysconfig/iptables
|
Add one line
The code is as follows |
Copy Code |
-A input-m state--state new-m tcp-p TCP--dport 20000:30000-j ACCEPT |
Reboot firewall iptables
The code is as follows |
Copy Code |
Service Iptables Restart
|