Forward Firewall: added dmz-converter.

Also extended backup.pl script to support old backups. Now it is possible to restore old backups into new firewall. On restore, all config files of new firewall will be destroyed and the 4 converters will recreate them.
This commit is contained in:
Alexander Marx
2013-04-02 05:40:50 +02:00
committed by Michael Tremer
parent 829697d076
commit a60dbb4b6a
6 changed files with 225 additions and 9 deletions

View File

@@ -77,7 +77,7 @@ my %aliases=();
my %optionsfw=();
my %ifaces=();
my $VERSION='0.9.9.0';
my $VERSION='0.9.9.1';
my $color;
my $confignet = "${General::swroot}/fwhosts/customnetworks";
my $confighost = "${General::swroot}/fwhosts/customhosts";
@@ -133,6 +133,7 @@ if ($fwdfwsettings{'ACTION'} eq 'saverule')
$errormessage=&checksource;
if(!$errormessage){&checktarget;}
if(!$errormessage){&checkrule;}
#check if manual ip (source) is orange network
if ($fwdfwsettings{'grp1'} eq 'src_addr'){
my ($sip,$scidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp1'}});
@@ -2034,7 +2035,7 @@ sub saverule
#print"6";
}
#check if we change a DMZ to a FORWARD/DMZ
elsif($fwdfwsettings{'oldruletype'} eq 'DMZ' && $fwdfwsettings{'chain'} eq 'FORWARDFW' ){
elsif($fwdfwsettings{'oldruletype'} eq 'DMZ' && $fwdfwsettings{'chain'} eq 'FORWARDFW' && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ORANGE'){
&changerule($configdmz);
#print"7";
}