mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 11:05:54 +02:00
Forward Firewall: rules.pl supports now DMZ rules. These rules are applied first
This commit is contained in:
committed by
Michael Tremer
parent
d603d1dee0
commit
31fef6cc2d
@@ -43,6 +43,7 @@ our %targethash=();
|
||||
my @timeframe=();
|
||||
my %configinputfw=();
|
||||
my %configoutgoingfw=();
|
||||
my %configdmzfw=();
|
||||
my %aliases=();
|
||||
my @DPROT=();
|
||||
my @p2ps=();
|
||||
@@ -50,6 +51,7 @@ require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/forward/bin/firewall-lib.pl";
|
||||
|
||||
my $configdmz = "${General::swroot}/forward/dmz";
|
||||
my $configfwdfw = "${General::swroot}/forward/config";
|
||||
my $configinput = "${General::swroot}/forward/input";
|
||||
my $configoutgoing = "${General::swroot}/forward/outgoing";
|
||||
@@ -66,6 +68,7 @@ my $CHAIN="FORWARDFW";
|
||||
|
||||
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||
&General::readhash("$netsettings", \%defaultNetworks);
|
||||
&General::readhasharray($configdmz, \%configdmzfw);
|
||||
&General::readhasharray($configfwdfw, \%configfwdfw);
|
||||
&General::readhasharray($configinput, \%configinputfw);
|
||||
&General::readhasharray($configoutgoing, \%configoutgoingfw);
|
||||
@@ -132,6 +135,9 @@ sub flush
|
||||
}
|
||||
sub preparerules
|
||||
{
|
||||
if (! -z "${General::swroot}/forward/dmz"){
|
||||
&buildrules(\%configdmzfw);
|
||||
}
|
||||
if (! -z "${General::swroot}/forward/config"){
|
||||
&buildrules(\%configfwdfw);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user