Linux iptables Configuration for FTP Server - VSFTP

Linux FTP server iptables Configuration


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

save this configuration
# iptables-save >  /etc/sysconfig/iptables
or
#service iptables save

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 



Restart iptables
#service iptables start

Now the FTP ports will be enabled in iptables.




FOLLOW US :-    
   


0 comments :

Post a Comment