X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Ffirewall.cgi;h=ceaab566b539a481c8a516ae0729fc650de75fa7;hb=d00b3548852f478a566ffa6dc9dc4b89e86c58a3;hp=71ca752574f56f8448ea33c5c94df6c38781d816;hpb=03f02bcd20f9e5c1cb0743bfe88ba02c6ad01dac;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 71ca75257..ceaab566b 100755 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -158,11 +158,6 @@ print<; close(CONN1); + if (! $fwdfwsettings{'RULE_ACTION'} && $fwdfwsettings{'POLICY'} eq 'MODE2'){ + $fwdfwsettings{'RULE_ACTION'}='DROP'; + }elsif(! $fwdfwsettings{'RULE_ACTION'} && $fwdfwsettings{'POLICY'} eq 'MODE1'){ + $fwdfwsettings{'RULE_ACTION'}='ACCEPT'; + } $checked{'grp1'}{$fwdfwsettings{'grp1'}} = 'CHECKED'; $checked{'grp2'}{$fwdfwsettings{'grp2'}} = 'CHECKED'; $checked{'grp3'}{$fwdfwsettings{'grp3'}} = 'CHECKED'; @@ -1447,6 +1450,7 @@ sub newrule $checked{'TIME_SAT'}{$fwdfwsettings{'TIME_SAT'}} = 'CHECKED'; $checked{'TIME_SUN'}{$fwdfwsettings{'TIME_SUN'}} = 'CHECKED'; $checked{'USE_NAT'}{$fwdfwsettings{'USE_NAT'}} = 'CHECKED'; + $checked{'nat'}{$fwdfwsettings{'nat'}} = 'CHECKED'; $selected{'TIME_FROM'}{$fwdfwsettings{'TIME_FROM'}} = 'selected'; $selected{'TIME_TO'}{$fwdfwsettings{'TIME_TO'}} = 'selected'; $selected{'ipfire'}{$fwdfwsettings{$fwdfwsettings{'grp2'}}} ='selected'; @@ -1552,8 +1556,11 @@ sub newrule } } } - &Header::openbox('100%', 'left', $Lang::tr{'fwdfw addrule'}); - &Header::closebox(); + # Split manual source and target address and delete the subnet + my ($sip,$scidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp1'}}); + if ($scidr eq '32'){$fwdfwsettings{$fwdfwsettings{'grp1'}}=$sip;} + my ($dip,$dcidr) = split("/",$fwdfwsettings{$fwdfwsettings{'grp2'}}); + if ($scidr eq '32'){$fwdfwsettings{$fwdfwsettings{'grp2'}}=$dip;} &Header::openbox('100%', 'left', $Lang::tr{'fwdfw source'}); #------SOURCE------------------------------------------------------- print "
"; @@ -1575,10 +1582,10 @@ END } print< -
+
+ END &gen_dd_block('src','grp1'); - print"
"; &Header::closebox(); #---SNAT / DNAT ------------------------------------------------ @@ -1594,7 +1601,7 @@ END @@ -1627,7 +1634,7 @@ END @@ -1681,10 +1688,9 @@ END } print< -
+
END &gen_dd_block('tgt','grp2'); - print"
"; &Header::closebox; #---PROTOCOL------------------------------------------------------ $fwdfwsettings{'SRC_PORT'} =~ s/\|/,/g; @@ -1837,23 +1843,9 @@ END END &Header::closebox; - - $checked{"RULE_ACTION"} = (); - foreach ("ACCEPT", "DROP", "REJECT") { - $checked{"RULE_ACTION"}{$_} = ""; - } - - if($fwdfwsettings{'updatefwrule'} eq 'on') { - $checked{"RULE_ACTION"}{$fwdfwsettings{'RULE_ACTION'}} = "checked"; - } elsif ($fwdfwsettings{'POLICY'} eq 'MODE1') { - $checked{"RULE_ACTION"}{"ACCEPT"} = "checked"; - } elsif ($fwdfwsettings{'POLICY'} eq 'MODE2') { - $checked{"RULE_ACTION"}{"DROP"} = "checked"; - } - + $checked{"RULE_ACTION"}{$fwdfwsettings{'RULE_ACTION'}} = 'CHECKED'; print <
- +
@@ -2000,7 +1992,7 @@ END
-

+
END #---ACTION------------------------------------------------------ @@ -2031,6 +2023,7 @@ END +
END @@ -2307,7 +2300,7 @@ sub viewtablenew &General::readhasharray("$configccdhost", \%ccdhost); &Header::openbox('100%', 'left', $title); - print ""; + print "
"; if (! -z $config) { my $count=0;