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
credit to : foogazi
No comments:
Post a Comment