From 30041b894900da9bafaebac4f8eaa578e976f4a1 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Fri, 21 Feb 2020 16:26:41 +0100 Subject: [PATCH] Fix IPV6 var not being defined on stop --- minifirewall | 8 +++++--- minifirewall.conf | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/minifirewall b/minifirewall index 5fd31b2..320fa49 100755 --- a/minifirewall +++ b/minifirewall @@ -51,6 +51,11 @@ BROAD='255.255.255.255' PORTSROOT='0:1023' PORTSUSER='1024:65535' +# Configuration +oldconfigfile="/etc/firewall.rc" +configfile="/etc/default/minifirewall" + +IPV6=$(grep "IPV6=" /etc/default/minifirewall | awk -F '=' -F "'" '{print $2}') case "$1" in start) @@ -109,9 +114,6 @@ $IPT -N LOG_ACCEPT $IPT -A LOG_ACCEPT -j LOG --log-prefix '[IPTABLES ACCEPT] : ' $IPT -A LOG_ACCEPT -j ACCEPT -# Configuration -oldconfigfile="/etc/firewall.rc" -configfile="/etc/default/minifirewall" if test -f $oldconfigfile; then echo "$oldconfigfile is deprecated, rename to $configfile" >&2 diff --git a/minifirewall.conf b/minifirewall.conf index bb24827..2599124 100644 --- a/minifirewall.conf +++ b/minifirewall.conf @@ -13,7 +13,7 @@ IPV6=on INTLAN='192.168.0.2/32' # Trusted IPv4 addresses for private and semi-public services -TRUSTEDIPS='62.212.121.90 88.179.18.233 31.170.8.4 31.170.9.129' +TRUSTEDIPS='' # Privilegied IPv4 addresses for semi-public services # (no need to add again TRUSTEDIPS)