From: Michael Tremer Date: Sun, 1 Jul 2018 09:32:31 +0000 (+0100) Subject: firewall: Allow starting without a green interface X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48a7737fdd50db0384e0c999a768c7cf3052200b;p=people%2Fms%2Fipfire-2.x.git firewall: Allow starting without a green interface Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/firewall b/src/initscripts/system/firewall index cab791c1f7..707209987e 100644 --- a/src/initscripts/system/firewall +++ b/src/initscripts/system/firewall @@ -280,7 +280,9 @@ iptables_init() { # Always allow accessing the web GUI from GREEN. iptables -N GUIINPUT iptables -A INPUT -j GUIINPUT - iptables -A GUIINPUT -i "${GREEN_DEV}" -p tcp --dport 444 -j ACCEPT + if [ -n "${GREEN_DEV}" ]; then + iptables -A GUIINPUT -i "${GREEN_DEV}" -p tcp --dport 444 -j ACCEPT + fi # WIRELESS chains iptables -N WIRELESSINPUT @@ -329,8 +331,10 @@ iptables_init() { iptables -t nat -N NAT_DESTINATION_FIX iptables -t nat -A POSTROUTING -j NAT_DESTINATION_FIX - iptables -t nat -A NAT_DESTINATION_FIX \ - -m mark --mark 1 -j SNAT --to-source "${GREEN_ADDRESS}" + if [ -n "${GREEN_ADDRESS}" ]; then + iptables -t nat -A NAT_DESTINATION_FIX \ + -m mark --mark 1 -j SNAT --to-source "${GREEN_ADDRESS}" + fi if [ -n "${BLUE_ADDRESS}" ]; then iptables -t nat -A NAT_DESTINATION_FIX \