]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/outgoingfw/outgoingfw.pl
outgoing firewall: Reload firewall.local when changing outgoing fw.
[people/teissler/ipfire-2.x.git] / config / outgoingfw / outgoingfw.pl
index 19ae414141cc3ee1fc6a9511778aee8fce9ea216..1208567dd7ad015bc290e2e4debb8628ec708ab1 100644 (file)
@@ -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
 }
 
@@ -214,7 +215,7 @@ foreach $configentry (sort @configs)
                                        if ($configline[14]){$DAY .= "Fri,"}
                                        if ($configline[15]){$DAY .= "Sat,"}
                                        if ($configline[16]){$DAY .= "Sun"}
-                                       $CMD = "$CMD -m time --kerneltz --timestart $configline[17] --timestop $configline[18] --weekdays $DAY";
+                                       $CMD = "$CMD -m time --timestart $configline[17] --timestop $configline[18] --weekdays $DAY";
                                }
 
                                $CMD = "$CMD -o $netsettings{'RED_DEV'}";
@@ -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");
+       }
+}