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

Image:

Enjoy.

Entry Filed under: English Blog

Leave a Comment

Required

Required, hidden

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


Search

Calendar

March 2011
M T W T F S S
« Feb   Apr »
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Category

Posts by Month


Latest Posts

Interesting Websites:

Most Recent Posts

Syndication

Management

Stats:
eXTReMe Tracker