# Path to the guardian.ignore file.
my $ignorefile ='/var/ipfire/guardian/guardian.ignore';
-# Path to the guardian.target file.
-my $targetfile ='/var/ipfire/guardian/guardian.ignore';
-
our %netsettings = ();
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
$settings{'GUARDIAN_ENABLE_SNORT'} = 'on';
$settings{'GUARDIAN_ENABLE_SSH'} = 'on';
$settings{'GUARDIAN_ENABLE_HTTPD'} = 'on';
-$settings{'GUARDIAN_BLOCKINTERFACES'} ='default';
+$settings{'GUARDIAN_LOGLEVEL'} ='info';
$settings{'GUARDIAN_BLOCKTIME'} = '86400';
$settings{'GUARDIAN_LOGFILE'} = '/var/log/guardian/guardian.log';
$settings{'GUARDIAN_SNORT_ALERTFILE'} = '/var/log/snort/alert';
# Function to display the status of guardian and allow base configuration.
sub showMainBox() {
my %checked = ();
+ my %selected = ();
$checked{'GUARDIAN_ENABLED'}{'on'} = '';
$checked{'GUARDIAN_ENABLED'}{'off'} = '';
$checked{'GUARDIAN_ENABLE_HTTPD'}{'on'} = '';
$checked{'GUARDIAN_ENABLE_HTTPD'}{$settings{'GUARDIAN_ENABLE_HTTPD'}} = "checked='checked'";
+ $selected{'GUARDIAN_LOGLEVEL'}{$settings{'GUARDIAN_LOGLEVEL'}}= 'selected';
+
&Header::openpage($Lang::tr{'guardian configuration'}, 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);
<tr>
<td colspan='2'><br></td>
</tr>
+ <tr>
+ <td align='left' width='20%'>$Lang::tr{'guardian loglevel'}</td>
+ <td><select name='GUARDIAN_LOGLEVEL'>
+ <option value='off' $selected{'GUARDIAN_LOGLEVEL'}{'off'}>off</option>
+ <option value='info' $selected{'GUARDIAN_LOGLEVEL'}{'info'}>info</option>
+ <option value='debug' $selected{'GUARDIAN_LOGLEVEL'}{'debug'}>debug</option>
+ </select></td>
+ </tr>
+
<tr>
<td width='20%' class='base'>$Lang::tr{'guardian blocktime'}:</td>
<td><input type='text' name='GUARDIAN_BLOCKTIME' value='$settings{'GUARDIAN_BLOCKTIME'}' size='10' /></td>
# We set this to 1 (enabled) to prevent guardian from blocking the ISP gateway.
my $HostGatewayByte = "1";
- # Grab interface of red network zone.
- my $red_interface = &General::get_red_interface();
-
# Open configfile for writing.
open(FILE, ">$configfile");
- print FILE "Interface $red_interface\n";
print FILE "EnableSnortMonitoring $settings{'GUARDIAN_ENABLE_SNORT'}\n";
print FILE "EnableSSHMonitoring $settings{'GUARDIAN_ENABLE_SSH'}\n";
print FILE "EnableHTTPDMonitoring $settings{'GUARDIAN_ENABLE_HTTPD'}\n";
+ print FILE "LogLevel $settings{'GUARDIAN_LOGLEVEL'}\n";
print FILE "HostGatewayByte $HostGatewayByte\n";
print FILE "LogFile $settings{'GUARDIAN_LOGFILE'}\n";
print FILE "AlertFile $settings{'GUARDIAN_SNORT_ALERTFILE'}\n";
print FILE "IgnoreFile $ignorefile\n";
- print FILE "TargetFile $targetfile\n";
print FILE "TimeLimit $settings{'GUARDIAN_BLOCKTIME'}\n";
close(FILE);