From 31fef6cc2d8c19fb7b5a86529b4b98bc2d4fd85f Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Mon, 25 Feb 2013 13:56:48 +0100 Subject: [PATCH] Forward Firewall: rules.pl supports now DMZ rules. These rules are applied first --- config/forwardfw/rules.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/forwardfw/rules.pl b/config/forwardfw/rules.pl index ffdb6c2ce..0ff153d61 100755 --- a/config/forwardfw/rules.pl +++ b/config/forwardfw/rules.pl @@ -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); } -- 2.39.2