]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall: some typos in dmz-converter
authorAlexander Marx <amarx@ipfire.org>
Tue, 2 Apr 2013 06:43:18 +0000 (08:43 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:12:39 +0000 (14:12 +0200)
config/backup/backup.pl
config/forwardfw/convert-dmz

index 4ad7363fbb6e4369da2f106b30d0be75c3ce5677..4662a8a1d35a032a22e5114cc399086191a6a494 100644 (file)
@@ -66,9 +66,9 @@ elsif ($ARGV[0] eq 'restore') {
   system("/usr/sbin/ovpn-ccd-convert");
   #OUTGOINGFW CONVERTER
   if( -d "${General::swroot}/outgoing"){
-         if( -f "${General::swroot}/forward/config" ){ 
+         if( -f "${General::swroot}/forward/config" ){
                  unlink("${General::swroot}/forward/config");
-                 system("touch ${General::swroot}/forward/config"); 
+                 system("touch ${General::swroot}/forward/config");
                  chown 99,99,"${General::swroot}/forward/config";
          }
          if( -f "${General::swroot}/forward/outgoing" ){
@@ -99,7 +99,7 @@ elsif ($ARGV[0] eq 'restore') {
          rmtree("${General::swroot}/xtaccess");
   }
   #DMZ-HOLES CONVERTER
-  if( -d "${General::swroot}/dmz-holes"){
+  if( -d "${General::swroot}/dmzholes"){
          if( -f "${General::swroot}/forward/dmz" ){
                  unlink("${General::swroot}/forward/dmz");
                  system("touch ${General::swroot}/forward/dmz");
@@ -107,7 +107,7 @@ elsif ($ARGV[0] eq 'restore') {
          }
          #START CONVERTER "DMZ-HOLES"
          system("/usr/sbin/convert-dmz");
-         rmtree("${General::swroot}/xtaccess");
+         rmtree("${General::swroot}/dmzholes");
   }
   #PORTFORWARD CONVERTER
   if( -d "${General::swroot}/portfw"){
index 639cef374dcb1504a3761bb684526d128ee45ad0..81d77bab735f71df5afd5e74a12a8e1b6cc2ca7e 100755 (executable)
@@ -49,8 +49,8 @@ sub process_rules{
                my $now=localtime;
                #get values from old configfile
                my ($a,$b,$c,$d,$e,$f,$g,$h) = split (",",$line);
-               $h =~ s/\s//gi;
-               print LOG "$Now Processing A: $a   B: $b   C: $c   D: $d   E: $e   F: $f   G: $g   H: $h\n";
+               $h =~ s/\s*\n//gi;
+               print LOG "$now Processing A: $a   B: $b   C: $c   D: $d   E: $e   F: $f   G: $g   H: $h\n";
                #Now convert values and check ip addresses
                $a=uc($a);
                $e=uc($e);
@@ -99,11 +99,11 @@ sub process_rules{
                                $field5='tgt_addr';
                                $field6=$c;
                        }else{
-                               print LOG "$Now ->NOT Converted, invalid Source IP $b\n\n";
+                               print LOG "$now ->NOT Converted, target ip $c not part of target network $g \n\n";
                                next;
                        }
                }else{
-                       print LOG "$now -> SOURCE IP INVALID. \n\n";
+                       print LOG "$now -> TARGET IP INVALID. \n\n";
                        next;
                }
                $field12=$a;