--policy DROP kills everything?
busby at edoceo.com
Wed Jun 8 23:11:20 CEST 2005
I have this these rules on a host, to protect only this host.
# Generated by iptables-save v1.2.11 on Tue Jun 7 23:03:58 2005
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 127.0.0.0/255.0.0.0 -i lo -j ACCEPT
-A INPUT -d 192.168.42.2 -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -d 192.168.42.2 -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
# Completed on Tue Jun 7 23:03:58 2005
These are the loaded modules: iptable_filter, ip_tables
I cannot make an SSH or HTTP connection to the box.
I was under the impression that a policy of DROP will drop the packets if they dont match a rule.
If I switch the policy to ACCEPT then no problem. If I add a last rule as DROP then it also fails.
If I put a LOG or ULOG before the DROP rule then I can see packes destined for port 80 making it to log, shouldn't
ACCEPT have passed them through? What stupid little thing did I miss?
imperium root # iptables --version
imperium root # uname -a
Linux imperium 2.6.10-gentoo-r6-edoceo #4 Sun May 1 03:48:25 PDT 2005 i686 AMD Athlon(TM) XP 1700+ AuthenticAMD GNU/Linux
More information about the netfilter