X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Foutgoingfw.cgi;h=295bde477c4a9069fe986116642bf0d94e0a39c9;hp=be16beb6e6930799f3103c42c8c4784ddbf19554;hb=98c474a4aa6802cc07088eafb60eb47a8b315d10;hpb=6411b32c6e1c6ffa066d27b8acbb2178ec33578d diff --git a/html/cgi-bin/outgoingfw.cgi b/html/cgi-bin/outgoingfw.cgi index be16beb6e6..295bde477c 100644 --- a/html/cgi-bin/outgoingfw.cgi +++ b/html/cgi-bin/outgoingfw.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2005-2010 IPTifre Team # +# Copyright (C) 2005-2010 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -310,6 +310,11 @@ if ($outfwsettings{'ACTION'} eq $Lang::tr{'delete'}) if ($outfwsettings{'ACTION'} eq $Lang::tr{'add'}) { if ( $outfwsettings{'VALID'} eq 'yes' ) { + + if ( $outfwsettings{'SNET'} eq "all" ) { + $outfwsettings{'SIP'} =""; + $outfwsettings{'SMAC'}=""; + } open( FILE, ">> $configfile" ) or die "Unable to write $configfile"; print FILE < - + END ; @@ -403,8 +408,12 @@ END if ($outfwsettings{'STATE'} eq 'DENY'){ $outfwsettings{'DISPLAY_STATE'} = "DENY"; } if ($outfwsettings{'STATE'} eq 'ALLOW'){ $outfwsettings{'DISPLAY_STATE'} = "ALLOW"; } if ((($outfwsettings{'POLICY'} eq 'MODE1') && ($outfwsettings{'STATE'} eq 'ALLOW')) || (($outfwsettings{'POLICY'} eq 'MODE2') && ($outfwsettings{'STATE'} eq 'DENY'))){ - print < + if ( $outfwsettings{'ENABLED'} eq "on" ){ + print ""; + } else { + print ""; + } + print <$outfwsettings{'PROT'} $outfwsettings{'SNET'} $outfwsettings{'DISPLAY_DIP'}:$outfwsettings{'DISPLAY_DPORT'} @@ -462,17 +471,25 @@ END END ; if (($outfwsettings{'SIP'}) || ($outfwsettings{'SMAC'})) { - unless ($outfwsettings{'SIP'}) { $outfwsettings{'DISPLAY_SIP'} = 'ALL'; } else { $outfwsettings{'DISPLAY_SIP'} = $outfwsettings{'SIP'}; } - unless ($outfwsettings{'SMAC'}) { $outfwsettings{'DISPLAY_SMAC'} = 'ALL'; } else { $outfwsettings{'DISPLAY_SMAC'} = $outfwsettings{'SMAC'}; } - print <$Lang::tr{'source ip'}: - $outfwsettings{'DISPLAY_SIP'} - -END -; + + unless ($outfwsettings{'SIP'}) { + $outfwsettings{'DISPLAY_SIP'} = 'ALL'; + } else { + $outfwsettings{'DISPLAY_SIP'} = $outfwsettings{'SIP'}; + } + + unless ($outfwsettings{'SMAC'}) { + $outfwsettings{'DISPLAY_SMAC'} = 'ALL'; + print "$Lang::tr{'source ip or net'}: "; + print "$outfwsettings{'DISPLAY_SIP'}"; + } else { + $outfwsettings{'DISPLAY_SMAC'} = $outfwsettings{'SMAC'}; + print "$Lang::tr{'source'} $Lang::tr{'mac address'}: "; + print "$outfwsettings{'DISPLAY_SMAC'}"; + } } print <$Lang::tr{'time'} - + $Lang::tr{'time'} - END ; @@ -559,13 +576,13 @@ END if ($p2pline[2] eq 'on') { print < - + END ; } else { print < - + END ; } @@ -576,7 +593,7 @@ END } print < -
$Lang::tr{'outgoingfw p2p description'} +
$Lang::tr{'outgoing firewall p2p description 1'} $Lang::tr{ $Lang::tr{'outgoing firewall p2p description 2'} $Lang::tr{ $Lang::tr{'outgoing firewall p2p description 3'} END ; &Header::closebox(); @@ -586,9 +603,9 @@ END print < - - - + + + - + - - + + + + + + + + @@ -700,10 +737,10 @@ END - - - - + + + + @@ -809,4 +846,4 @@ END } &Header::closebigbox(); -&Header::closepage(); \ No newline at end of file +&Header::closepage();
$Lang::tr{'mode'} 0:$Lang::tr{'outgoingfw mode0'}
$Lang::tr{'mode'} 1:$Lang::tr{'outgoingfw mode1'}
$Lang::tr{'mode'} 2:$Lang::tr{'outgoingfw mode2'}
$Lang::tr{'mode'} 0:$Lang::tr{'outgoing firewall mode0'}
$Lang::tr{'mode'} 1:$Lang::tr{'outgoing firewall mode1'}
$Lang::tr{'mode'} 2:$Lang::tr{'outgoing firewall mode2'}

@@ -597,7 +614,7 @@ END ; if ($outfwsettings{'POLICY'} ne 'MODE0') { print < + $Lang::tr{'outgoing firewall reset'}: END ; } @@ -627,7 +644,7 @@ print <
$Lang::tr{'protocol'}:$Lang::tr{'protocol'} + + + - + - - + @@ -675,19 +694,37 @@ END } print < - + END ; my @ipgroups = qx(ls $configpath/ipgroups/); foreach (sort @ipgroups){ - print "\t\t\t\t\t\n"; + chomp($_); + print "\t\t\t\t\t\n"; + } + print < + +END +; + my @macgroups = qx(ls $configpath/macgroups/); + foreach (sort @macgroups){ + chomp($_); + print "\t\t\t\t\t\n"; } print < $Lang::tr{'source ip'}: $Lang::tr{'outgoing firewall warning'}
$Lang::tr{'source ip or net'}
$Lang::tr{'source'} $Lang::tr{'mac address'}: +
$Lang::tr{'logging'}:
$Lang::tr{'destination ip'}: $Lang::tr{'destination port'}: $Lang::tr{'destination ip or net'}: $Lang::tr{'destination port'}(s)
$Lang::tr{'time'}: