]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Change some iptables rules to match new negation syntax.
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 15 Feb 2010 19:15:11 +0000 (20:15 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 15 Feb 2010 19:15:11 +0000 (20:15 +0100)
config/qos/makeqosscripts.pl
src/initscripts/init.d/firewall
src/misc-progs/Makefile [changed mode: 0755->0644]
src/misc-progs/setaliases.c [changed mode: 0755->0644]
src/misc-progs/wirelessctrl.c

index 66bdc4fa387b5896e6accda57c50ab33f3936a21..d62e6307a803e9642eab8c634a812e87d7e83131 100644 (file)
@@ -514,7 +514,7 @@ print <<END
 
        ### ADD QOS-INC CHAIN TO THE MANGLE TABLE IN IPTABLES
        iptables -t mangle -N QOS-INC
-       iptables -t mangle -A POSTROUTING -m mark ! --mark 0 -o ! $qossettings{'RED_DEV'} -j IMQ --todev 0
+       iptables -t mangle -A POSTROUTING -m mark ! --mark 0 ! -o $qossettings{'RED_DEV'} -j IMQ --todev 0
        iptables -t mangle -I FORWARD -i $qossettings{'RED_DEV'} -j QOS-INC
        iptables -t mangle -A FORWARD -i $qossettings{'RED_DEV'} -j QOS-TOS
 
@@ -687,7 +687,7 @@ print <<END
        tc qdisc del dev $qossettings{'IMQ_DEV'} root >/dev/null 2>&1
        # STOP IMQ-DEVICE
        ip link set $qossettings{'IMQ_DEV'} down >/dev/null 2>&1
-       iptables -t mangle --delete POSTROUTING -m mark ! --mark 0 -o ! $qossettings{'RED_DEV'} -j IMQ --todev 0 >/dev/null 2>&1
+       iptables -t mangle --delete POSTROUTING -m mark ! --mark 0 ! -o $qossettings{'RED_DEV'} -j IMQ --todev 0 >/dev/null 2>&1
        iptables -t mangle --delete PREROUTING -i $qossettings{'RED_DEV'} -j IMQ --todev 0  >/dev/null 2>&1
        # rmmod imq # this crash on 2.6.25.xx
        # REMOVE & FLUSH CHAINS
index 0392e9f67d7509c8867b5b387486d940f16ddbba..410ff8737115425eca5b5dc36ac10398bbad82c1 100644 (file)
@@ -186,7 +186,7 @@ case "$1" in
        /sbin/iptables -A FORWARD -i lo          -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 INPUT   -i $GREEN_DEV  -m state --state NEW -j ACCEPT ! -p icmp
        /sbin/iptables -A FORWARD -i $GREEN_DEV  -m state --state NEW -j ACCEPT
 
        # If a host on orange tries to initiate a connection to IPFire's red IP and
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 01743a7662f450c069076c231289d95207375544..bfd4527041fe437c5658998b8851eb87aa66b8d1 100644 (file)
@@ -151,7 +151,7 @@ int main(void)
                                                                        (VALID_IP(ipaddress))) {
                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -m mac --mac-source %s -s %s -i %s -j ACCEPT", macaddress, ipaddress, blue_dev);
                                                                        safe_system(command);
-                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s -o ! %s -j ACCEPT", macaddress, ipaddress, blue_dev, green_dev);
+                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s ! -o %s -j ACCEPT", macaddress, ipaddress, blue_dev, green_dev);
                                                                        safe_system(command);
                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -s %s -i %s -j DMZHOLES", macaddress, ipaddress, blue_dev);
                                                                        safe_system(command);
@@ -161,7 +161,7 @@ int main(void)
                                                                        if (strlen(macaddress) == 17) {
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -m mac --mac-source %s -i %s -j ACCEPT", macaddress, blue_dev);
                                                                                                        safe_system(command);
-                                                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s -o ! %s -j ACCEPT", macaddress, blue_dev, green_dev);
+                                                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s ! -o %s -j ACCEPT", macaddress, blue_dev, green_dev);
                                                                                                        safe_system(command);
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -m mac --mac-source %s -i %s -j DMZHOLES", macaddress, blue_dev);
                                                                                                        safe_system(command);
@@ -170,7 +170,7 @@ int main(void)
                                                                        if (VALID_IP(ipaddress)) {
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -s %s -i %s -j ACCEPT", ipaddress, blue_dev);
                                                                                                        safe_system(command);
-                                                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s -o ! %s -j ACCEPT", ipaddress, blue_dev, green_dev);
+                                                                                                       snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s ! -o %s -j ACCEPT", ipaddress, blue_dev, green_dev);
                                                                                                        safe_system(command);
                                                                                                        snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -s %s -i %s -j DMZHOLES", ipaddress, blue_dev);
                                                                                                        safe_system(command);