Make iptables like your ftp sessions

If you manage your firewall by hand have issues with connection trough ftp, try adding this.

# FTP Helper (beginning of script)
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp ports=21

# ... 
# other rules
# ...

# FTP Helper
iptables -A OUTPUT -o eth0 -p tcp --sport ftp -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport ftp-data -j ACCEPT

# Drop rule 

#(end of script)

Cloud & Open-Source magician 🧙‍♂️

I try to find the KISS in complex systems and share it with the world.

comments powered by Disqus