]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/forwardfw/firewall-policy
Forward Firewall: clean up some files
[people/teissler/ipfire-2.x.git] / config / forwardfw / firewall-policy
index 3b7fa18ada97a46b431135a5aa58abcdee5e8c4b..2d4b9ec86cc99f7b80530b8109cadeb6394e6f1e 100755 (executable)
@@ -13,7 +13,7 @@ if [ "$POLICY" == "MODE1" ]; then
                        if [ "$DROPFORWARD" == "on" ]; then
                                /sbin/iptables -A POLICYFWD -m limit --limit 10/minute -j LOG --log-prefix "REJECT_FORWARD"
                        fi
-                       /sbin/iptables -A POLICYFWD -j REJECT --reject-with icmp-host-unreachable -m comment --comment "REJECT_FORWARD"
+                       /sbin/iptables -A POLICYFWD -j REJECT --reject-with icmp-host-unreachable -m comment --comment "DROP_FORWARD"
                fi
                if [ "$FWPOLICY" == "DROP" ]; then
                        if [ "$DROPFORWARD" == "on" ]; then
@@ -21,14 +21,17 @@ if [ "$POLICY" == "MODE1" ]; then
                        fi
                        /sbin/iptables -A POLICYFWD -j DROP -m comment --comment "DROP_FORWARD"
                fi
+else
+       /sbin/iptables -A POLICYFWD -j DROP -m comment --comment "DROP_FORWARD"
 fi
+
 #OUTGOINGFW
 if [ "$POLICY1" == "MODE1" ]; then
        if [ "$FWPOLICY1" == "REJECT" ]; then
                if [ "$DROPOUTGOING" == "on" ]; then
                        /sbin/iptables -A POLICYOUT -m limit --limit 10/minute -j LOG --log-prefix "REJECT_OUTPUT"
                fi
-               /sbin/iptables -A POLICYOUT -j REJECT --reject-with icmp-host-unreachable -m comment --comment "REJECT_OUTPUT"
+               /sbin/iptables -A POLICYOUT -j REJECT --reject-with icmp-host-unreachable -m comment --comment "DROP_OUTPUT"
        fi
        if [ "$FWPOLICY1" == "DROP" ]; then
                if [ "$DROPOUTGOING" == "on" ]; then
@@ -36,17 +39,19 @@ if [ "$POLICY1" == "MODE1" ]; then
                fi
                        /sbin/iptables -A POLICYOUT -j DROP -m comment --comment "DROP_OUTPUT"
        fi
+else
+       /sbin/iptables -A POLICYOUT -j DROP -m comment --comment "DROP_OUTPUT"
 fi
 #INPUT
 if [ "$FWPOLICY2" == "REJECT" ]; then
        if [ "$DROPINPUT" == "on" ]; then
                /sbin/iptables -A POLICYIN -m limit --limit 10/minute -j LOG --log-prefix "REJECT_INPUT"
        fi
-       /sbin/iptables -A POLICYIN -j REJECT --reject-with icmp-host-unreachable -m comment --comment "REJECT_FORWARD"
+       /sbin/iptables -A POLICYIN -j REJECT --reject-with icmp-host-unreachable -m comment --comment "DROP_INPUT"
 fi
 if [ "$FWPOLICY2" == "DROP" ]; then
        if [ "$DROPINPUT" == "on" ]; then
-               /sbin/iptables -A POLICYIN -m limit --limit 10/minute -j LOG --log-prefix "DROP_FORWARD"
+               /sbin/iptables -A POLICYIN -m limit --limit 10/minute -j LOG --log-prefix "DROP_INPUT"
        fi
-       /sbin/iptables -A POLICYIN -j DROP -m comment --comment "DROP_FORWARD"
+       /sbin/iptables -A POLICYIN -j DROP -m comment --comment "DROP_INPUT"
 fi