mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-15 13:32:59 +02:00
outgoing firewall: Reload firewall.local when changing outgoing fw.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user