diff --git a/firewall.rc b/firewall.rc index 7cdc486..19f0d22 100644 --- a/firewall.rc +++ b/firewall.rc @@ -49,7 +49,7 @@ DNSSERVEURS='85.31.205.33 78.153.240.29' # du minifirewall en crontab # (Attention, si un proxy HTTP est installe en local # mettre 0.0.0.0/0) -HTTPSITES='security.debian.org pub.evolix.net volatile.debian.org' +HTTPSITES='security.debian.org pub.evolix.net volatile.debian.org mirror.evolix.org' # HTTPS # /!\ Possibilite d'utiliser des noms de domaines diff --git a/minifirewall b/minifirewall index 8741bfd..9ee7865 100644 --- a/minifirewall +++ b/minifirewall @@ -91,7 +91,21 @@ $IPT -A LOG_ACCEPT -j LOG --log-prefix '[IPTABLES ACCEPT] : ' $IPT -A LOG_ACCEPT -j ACCEPT # Configuration -test -f /etc/firewall.rc && . /etc/firewall.rc +configfile="/etc/firewall.rc" + +if ! test -f $configfile; then + echo "$configfile does not exist" >&2 + exit 1 +fi + +tmpfile=`mktemp` +. $configfile 2>$tmpfile >&2 +if [ -s $tmpfile ]; then + echo "$configfile returns standard or error output (see below). Stopping." + cat $tmpfile + exit 1 +fi +rm $tmpfile # trusted ip addresses $IPT -N ONLYTRUSTED