]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/firewall
Firewall: better loopback badtcp skipping.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / firewall
index 9a4e5eb17b877a571e573709a8fc8f3b02936f74..f1330f06707c3fa6a3180c4b181d0df58fc592d0 100644 (file)
@@ -53,6 +53,9 @@ iptables_init() {
        # Chain to contain all the rules relating to bad TCP flags
        /sbin/iptables -N BADTCP
 
+       #Don't check loopback
+       /sbin/iptables -A INPUT   -i lo -j RETURN
+
        # Disallow packets frequently used by port-scanners
        # nmap xmas
        /sbin/iptables -A BADTCP -p tcp --tcp-flags ALL FIN,URG,PSH  -j PSCAN
@@ -188,7 +191,7 @@ case "$1" in
        /sbin/iptables -A FORWARD -j OUTGOINGFW
 
        # localhost and ethernet.
-       /sbin/iptables -I INPUT 1 -i lo -m state --state NEW -j ACCEPT
+       /sbin/iptables -A INPUT   -i lo -m state --state NEW -j ACCEPT
        /sbin/iptables -A INPUT   -s 127.0.0.0/8 -m state --state NEW -j DROP   # Loopback not on lo
        /sbin/iptables -A INPUT   -d 127.0.0.0/8 -m state --state NEW -j DROP
        /sbin/iptables -A FORWARD -i lo -m state --state NEW -j ACCEPT