If the vsftpd daemon ‘s active mode connections is not working in CentOS, Debian, Redhat etc. then it’s probably caused by the iptables firewall rules.
I just experienced that problem to fix it I had to enable the connections in iptables’s INPUT chain to port number 21
For example in CentOS I needed to add the following iptables rule:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
An alternative way to add the same rule on all Linux disributions is through the command:
linux# /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
linux# /sbin/iptables-save
The second command /sbin/iptables-save will save out all your existent iptables rules to a iptables rule file and on next boot if your Linux’s iptables configured rules are enabling on the Linux startup via a init script like for instance with the cmd /etc/init.d/iptables start the above saved rules with iptables-save will get loaded.
More helpful Articles
Tags: Make active FTP work in VSFTPD