Quickzi: How To Block Incoming Access to Port 80
Here is a quick Linux tip to block incoming access to port 80 using iptables.
iptables -A INPUT -j DROP -p tcp --destination-port 80 -i eth0
The code above will drop all tcp packets coming into your Linux computer on device eth0 on port 80. If your Internet connection runs through a device other than eth0, go ahead and make the adjustment.
To remove the iptables rule use the following code:
iptables -D INPUT -j DROP -p tcp --destination-port 80 -i eth0
For more information on using iptables visit the iptables man page.
Popularity: 6% [?]
Tagged with: HowTo • Linux • quickzi • tips • tricks
Filed under: Linux
Like this post? Subscribe to my RSS feed and get loads more!













I want to turn off internet for a given user… but when I do this the remote access is also getting disabled?
Any ideas where I can disable internet and not both internet and remote login.
Really the commands are very usefull and worthy… and helped me at right time…Great!