]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Handle loopback on input before NEW,NOTSYN check.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Dec 2010 09:01:27 +0000 (10:01 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Dec 2010 09:01:27 +0000 (10:01 +0100)
Many programs like squid/squidguard spam the log without this.

src/initscripts/init.d/firewall

index fea8d87e8437a37bf6c7d219368facab5d58dc25..88889a4c2609186b22eee3a013eba7c762cc2a0b 100644 (file)
@@ -188,10 +188,10 @@ case "$1" in
        /sbin/iptables -A FORWARD -j OUTGOINGFW
 
        # localhost and ethernet.
        /sbin/iptables -A FORWARD -j OUTGOINGFW
 
        # localhost and ethernet.
-       /sbin/iptables -A INPUT   -i lo          -m state --state NEW -j ACCEPT
+       /sbin/iptables -I INPUT 1 -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -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 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
+       /sbin/iptables -A FORWARD -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -m state --state NEW -j ACCEPT
        /sbin/iptables -A FORWARD -s 127.0.0.0/8 -m state --state NEW -j DROP
        /sbin/iptables -A FORWARD -d 127.0.0.0/8 -m state --state NEW -j DROP
        /sbin/iptables -A INPUT   -i $GREEN_DEV  -m state --state NEW -j ACCEPT ! -p icmp
        /sbin/iptables -A FORWARD -s 127.0.0.0/8 -m state --state NEW -j DROP
        /sbin/iptables -A FORWARD -d 127.0.0.0/8 -m state --state NEW -j DROP
        /sbin/iptables -A INPUT   -i $GREEN_DEV  -m state --state NEW -j ACCEPT ! -p icmp