4

How do I use iptables to reject all traffic to localhost port 80 but allow the one that comes from local machine?

view full story
linux-howto

http://serverfault.com – How do I use iptables to reject all traffic to localhost port 80 but allow the one that comes from local machine? Here is my current solution that doesn't seems to block the traffic. the ip, the the ip of the local machine. If I do not put the 2nd line, all the traffic is block, and with it enabled, all the traffic is accepted ?! iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -A INPUT -p tcp --dport 80 -s 127.0.0.1 -j ACCEPT iptables -A INPUT -p t (HowTos)