iptables Configuration for FTP Server VSFTPD

      No Comments on iptables Configuration for FTP Server VSFTPD

Linux IPTables Configuration for Allow VSFTPD FTP Incoming and Outgoing Traffic on CentOS Fedora Redhat Ubuntu

IPTables FTP Accept

1) Add following lines in /etc/modprobe.conf

alias ip_conntrack ip_conntract_ftp ip_nat_ftp

or run

# modprobe ip_conntrack_ftp 
#modprobe ip_nat_ftp

2) Allow incoming traffic on the default Ftp port (21)

a) run the following command in Linux shell

# iptables -A INPUT -p tcp –dport 21 -j ACCEPT

b) or You can manually edit /etc/sysconfig/iptables and add the below mentioned line

-A INPUT -p tcp -m tcp –dport  21 -j ACCEPT 

3) Save and Restart iptables
save this configuration
# iptables-save >  /etc/sysconfig/iptables
or
#service iptables save

#service iptables start

Now the FTP ports will be enabled in iptables.

Leave a Reply

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

Comment moderation is enabled. Your comment may take some time to appear.