From: Michael Tremer Date: Thu, 20 Jun 2013 08:59:31 +0000 (+0200) Subject: outgoing firewall: Reload firewall.local when changing outgoing fw. X-Git-Tag: v2.13-core70~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4c3f51441bc9420a645f23ae5f53c651ff53ee9;p=ipfire-2.x.git outgoing firewall: Reload firewall.local when changing outgoing fw. --- diff --git a/config/outgoingfw/outgoingfw.pl b/config/outgoingfw/outgoingfw.pl index 7dd14303a1..1208567dd7 100644 --- a/config/outgoingfw/outgoingfw.pl +++ b/config/outgoingfw/outgoingfw.pl @@ -105,6 +105,7 @@ system("/sbin/iptables --delete-chain OUTGOINGFWMAC >/dev/null 2>&1"); system("/sbin/iptables -N OUTGOINGFWMAC >/dev/null 2>&1"); if ( $outfwsettings{'POLICY'} eq 'MODE0' ) { + &firewall_local_reload(); exit 0 } @@ -264,6 +265,8 @@ if ( $outfwsettings{'POLICY'} eq 'MODE1' ) { applyrule("-o $netsettings{'RED_DEV'} -j DROP -m comment --comment 'DROP_OUTGOINGFW '", 0); } +&firewall_local_reload(); + sub applyrule($$) { my $cmd = shift; my $macrule = shift; @@ -273,3 +276,11 @@ sub applyrule($$) { system("/sbin/iptables -A OUTGOINGFW $cmd"); } } + +sub firewall_local_reload() { + my $script = "/etc/sysconfig/firewall.local"; + + if ( -x $script ) { + system("$script reload >/dev/null 2>&1"); + } +} diff --git a/config/rootfiles/core/70/filelists/files b/config/rootfiles/core/70/filelists/files index 683da926f4..52b9be75a4 100644 --- a/config/rootfiles/core/70/filelists/files +++ b/config/rootfiles/core/70/filelists/files @@ -49,3 +49,4 @@ usr/lib/squid/errors/tr/ERR_ZERO_SIZE_OBJECT usr/lib/squid/errors/tr/error-details.txt usr/local/bin/setddns.pl var/ipfire/general-functions.pl +var/ipfire/outgoing/bin/outgoingfw.pl