mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +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 @timeframe=();
|
||||||
my %configinputfw=();
|
my %configinputfw=();
|
||||||
my %configoutgoingfw=();
|
my %configoutgoingfw=();
|
||||||
|
my %configdmzfw=();
|
||||||
my %aliases=();
|
my %aliases=();
|
||||||
my @DPROT=();
|
my @DPROT=();
|
||||||
my @p2ps=();
|
my @p2ps=();
|
||||||
@@ -50,6 +51,7 @@ require '/var/ipfire/general-functions.pl';
|
|||||||
require "${General::swroot}/lang.pl";
|
require "${General::swroot}/lang.pl";
|
||||||
require "${General::swroot}/forward/bin/firewall-lib.pl";
|
require "${General::swroot}/forward/bin/firewall-lib.pl";
|
||||||
|
|
||||||
|
my $configdmz = "${General::swroot}/forward/dmz";
|
||||||
my $configfwdfw = "${General::swroot}/forward/config";
|
my $configfwdfw = "${General::swroot}/forward/config";
|
||||||
my $configinput = "${General::swroot}/forward/input";
|
my $configinput = "${General::swroot}/forward/input";
|
||||||
my $configoutgoing = "${General::swroot}/forward/outgoing";
|
my $configoutgoing = "${General::swroot}/forward/outgoing";
|
||||||
@@ -66,6 +68,7 @@ my $CHAIN="FORWARDFW";
|
|||||||
|
|
||||||
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
&General::readhash("${General::swroot}/forward/settings", \%fwdfwsettings);
|
||||||
&General::readhash("$netsettings", \%defaultNetworks);
|
&General::readhash("$netsettings", \%defaultNetworks);
|
||||||
|
&General::readhasharray($configdmz, \%configdmzfw);
|
||||||
&General::readhasharray($configfwdfw, \%configfwdfw);
|
&General::readhasharray($configfwdfw, \%configfwdfw);
|
||||||
&General::readhasharray($configinput, \%configinputfw);
|
&General::readhasharray($configinput, \%configinputfw);
|
||||||
&General::readhasharray($configoutgoing, \%configoutgoingfw);
|
&General::readhasharray($configoutgoing, \%configoutgoingfw);
|
||||||
@@ -132,6 +135,9 @@ sub flush
|
|||||||
}
|
}
|
||||||
sub preparerules
|
sub preparerules
|
||||||
{
|
{
|
||||||
|
if (! -z "${General::swroot}/forward/dmz"){
|
||||||
|
&buildrules(\%configdmzfw);
|
||||||
|
}
|
||||||
if (! -z "${General::swroot}/forward/config"){
|
if (! -z "${General::swroot}/forward/config"){
|
||||||
&buildrules(\%configfwdfw);
|
&buildrules(\%configfwdfw);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user