Outbound FTP connections with iptables

I found lots of useful information on how to enable outbound connections with FTP on a Linux box that runs the iptables firewall.

I don’t know anything about how FTP works internally and frankly don’t really care. I just want iptables to work with one particular connection.

The missing piece of information for me was that I couldn’t upload or download files using the FTP connection if ICMP is blocked with iptables. I’m talking about these lines in the config:

I had to remove those rules for file transfers to work.

Here’s the rest of the configuration, which allows both active and passive file transfers:

 

Buffer this pageTweet about this on TwitterShare on FacebookShare on Google+Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *

*