FTP: Data Socket Error: Connection failed [iptables]

After a stop & start la iptablesI succeeded to lose all ftp connections:

root@server [~]# service iptables stop 
Flushing firewall rules:                                   [  OK  ] 
Setting chains to policy ACCEPT: mangle filter             [  OK  ] 
Unloading iptables modules:                                [  OK  ] 
root@server [~]# service iptables start 
Flushing firewall rules:                                   [  OK  ] 
Setting chains to policy ACCEPT: filter                    [  OK  ] 
Unloading iptables modules:                                [  OK  ] 
Applying iptables firewall rules:                          [  OK  ] 
Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

Consequence: [R] Date Socket Error: Connection failed [FTP] incoming / outgoing, although it appeared on the server that I was logged in, I did not have access to anything.

Solution:

root@server [~]# iptables -A INPUT -p tcp --dport 21 -j ACCEPT 
root@server [~]# modprobe ip_conntrack_ftp

“/” Is your current location ;-)

Passionate about technology, I enjoy writing on StealthSettings.com since 2006. I have a rich experience in operating systems: macOS, Windows, and Linux, as well as in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, PrestaShop).

How to » Noteworthy » FTP: Data Socket Error: Connection failed [iptables]
Leave a Comment