X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Ffreifunk-firewall%2Ffiles%2Fetc%2Fhotplug.d%2Ffirewall%2F23-restricted-wan;h=ed40ff48d62931c4639e0be48e2174d8a4841083;hp=d0795b629f0e4d136d3e18ce2d48c73add12a93b;hb=e3a39de81a4f818ba5e4896bfc4c073885488981;hpb=2c46f1058da3021ed8b07a7936f6c469d31b65a8 diff --git a/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan b/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan index d0795b629..ed40ff48d 100644 --- a/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan +++ b/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan @@ -18,8 +18,8 @@ clear_restricted_gw() config_get gateway "$state" gateway logger -t firewall.freifunk "removing local restriction to $iface($gateway)" - iptables -D "zone_${INTERFACE}_ACCEPT" -i ! $ifname -o $ifname -d $ipaddr/$netmask -j REJECT - iptables -D "zone_${INTERFACE}_ACCEPT" -i ! $ifname -o $ifname -d $gateway -j ACCEPT + iptables -D "zone_${INTERFACE}_ACCEPT" ! -i $ifname -o $ifname -d $ipaddr/$netmask -j REJECT + iptables -D "zone_${INTERFACE}_ACCEPT" ! -i $ifname -o $ifname -d $gateway -j ACCEPT uci_revert_state firewall "$state" fi @@ -56,8 +56,8 @@ if [ "$ACTION" = add ]; then if [ "$local_restrict" = 1 ]; then logger -t firewall.freifunk "restricting local access to $DEVICE($gateway)" - iptables -I "zone_${INTERFACE}_ACCEPT" -i ! $DEVICE -o $DEVICE -d $ipaddr/$netmask -j REJECT - iptables -I "zone_${INTERFACE}_ACCEPT" -i ! $DEVICE -o $DEVICE -d $gateway -j ACCEPT + iptables -I "zone_${INTERFACE}_ACCEPT" ! -i $DEVICE -o $DEVICE -d $ipaddr/$netmask -j REJECT + iptables -I "zone_${INTERFACE}_ACCEPT" ! -i $DEVICE -o $DEVICE -d $gateway -j ACCEPT local state="restricted_gw_${INTERFACE}" uci_set_state firewall "$state" "" restricted_gw_state