How to block all ports in IPTABLES except 80 & 443
March 31st, 2011
This maybe particularly useful for those who need to know how to block all ports in IPTABLES except 80 & 443 (Linux Firewall – Centos 5.5).
Type in:
sudo iptables -A INPUT -p tcp -i eth0 –dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp -i eth0 –dport 443 -j ACCEPT
service iptables save
Enjoy.
Entry Filed under: English Blog

Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed