News : LinuxSolved.com Linux Help Community Forum..
# below rule block any on from anywhere accessing the port 21 ie.. ftpiptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 21 -j DROP # Now this rule will open ftp port for only LAN iptables -A INPUT -p tcp -i eth1 --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -s <your trusted pucblic ip> -d 0/0 --dport 21 -j ACCEPT
iptables=/sbin/iptables iptables --flush -t nat # below rule block any on from anywhere accessing the port 21 ie.. ftp iptables -A INPUT -p tcp -s 0/0 -d 0/0 --dport 21 -j DROP # Now this rule will open ftp port for only LAN iptables -A INPUT -p tcp -i eth1 --dport 21 -j ACCEPT # giving access to specific ipiptables -A INPUT -p tcp -s <your trusted pucblic ip> -d 0/0 --dport 21 -j ACCEPT # likewise u can add more rules so that u can make ur firewall..
iptables -A INPUT -p tcp -i eth0 --dport 21 -j DROP