$Lang::tr{'protocol'} | $Lang::tr{'network'} | $Lang::tr{'destination'} | $Lang::tr{'description'} | $Lang::tr{'policy'} | $Lang::tr{'logging'} | $Lang::tr{'action'} | END ; foreach $configentry (sort @configs) { @configline = split( /\;/, $configentry ); $outfwsettings{'STATE'} = $configline[0]; $outfwsettings{'ENABLED'} = $configline[1]; $outfwsettings{'SNET'} = $configline[2]; $outfwsettings{'PROT'} = $configline[3]; $outfwsettings{'NAME'} = $configline[4]; $outfwsettings{'SIP'} = $configline[5]; $outfwsettings{'SMAC'} = $configline[6]; $outfwsettings{'DIP'} = $configline[7]; $outfwsettings{'DPORT'} = $configline[8]; $outfwsettings{'LOG'} = $configline[9]; $configline[10] = "on" if not exists $configline[11]; $configline[11] = "on" if not exists $configline[11]; $configline[12] = "on" if not exists $configline[12]; $configline[13] = "on" if not exists $configline[13]; $configline[14] = "on" if not exists $configline[14]; $configline[15] = "on" if not exists $configline[15]; $configline[16] = "on" if not exists $configline[16]; $configline[17] = "00:00" if not exists $configline[17]; $configline[18] = "00:00" if not exists $configline[18]; $outfwsettings{'TIME_MON'} = $configline[10]; $outfwsettings{'TIME_TUE'} = $configline[11]; $outfwsettings{'TIME_WED'} = $configline[12]; $outfwsettings{'TIME_THU'} = $configline[13]; $outfwsettings{'TIME_FRI'} = $configline[14]; $outfwsettings{'TIME_SAT'} = $configline[15]; $outfwsettings{'TIME_SUN'} = $configline[16]; $outfwsettings{'TIME_FROM'} = $configline[17]; $outfwsettings{'TIME_TO'} = $configline[18]; if ($outfwsettings{'DIP'} eq ''){ $outfwsettings{'DISPLAY_DIP'} = 'ALL'; } else { $outfwsettings{'DISPLAY_DIP'} = $outfwsettings{'DIP'}; } if ($outfwsettings{'DPORT'} eq ''){ $outfwsettings{'DISPLAY_DPORT'} = 'ALL'; } else { $outfwsettings{'DISPLAY_DPORT'} = $outfwsettings{'DPORT'}; } if ($outfwsettings{'STATE'} eq 'DENY'){ $outfwsettings{'DISPLAY_STATE'} = ""; } if ($outfwsettings{'STATE'} eq 'ALLOW'){ $outfwsettings{'DISPLAY_STATE'} = ""; } if ((($outfwsettings{'POLICY'} eq 'MODE1') && ($outfwsettings{'STATE'} eq 'ALLOW')) || (($outfwsettings{'POLICY'} eq 'MODE2') && ($outfwsettings{'STATE'} eq 'DENY'))){ if ( $outfwsettings{'ENABLED'} eq "on" ){ print "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$outfwsettings{'SNET'} | $outfwsettings{'DISPLAY_DIP'}:$outfwsettings{'DISPLAY_DPORT'} | $outfwsettings{'NAME'} | $outfwsettings{'DISPLAY_STATE'} | $outfwsettings{'LOG'} |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
$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'} - |
END
;
if ($outfwsettings{'TIME_MON'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy monday'},";
if ($outfwsettings{'TIME_TUE'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy tuesday'},";
if ($outfwsettings{'TIME_WED'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy wednesday'},";
if ($outfwsettings{'TIME_THU'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy thursday'},";
if ($outfwsettings{'TIME_FRI'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy friday'},";
if ($outfwsettings{'TIME_SAT'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy saturday'},";
if ($outfwsettings{'TIME_SUN'} eq 'on') { print "";}
else { print "";}
print "$Lang::tr{'advproxy sunday'}";
print <$Lang::tr{'advproxy from'} $outfwsettings{'TIME_FROM'} |
$Lang::tr{'advproxy to'} $outfwsettings{'TIME_TO'} |
END
;
}
}
if ($outfwsettings{'POLICY'} eq 'MODE1'){
print < |
$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'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
END
;
if ($outfwsettings{'POLICY'} ne 'MODE0') {
print <
|