# Read-in idssettings
&General::readhash("$IDS::settingsdir/settings", \%idssettings);
+# If the runmode has not been configured yet, set default value.
+unless(exists($idssettings{'RUN_MODE'})) {
+ # Set default to IPS.
+ $idssettings{'RUN_MODE'} = 'IPS';
+}
+
$checked{'ENABLE_IDS'}{'off'} = '';
$checked{'ENABLE_IDS'}{'on'} = '';
$checked{'ENABLE_IDS'}{$idssettings{'ENABLE_IDS'}} = "checked='checked'";
+$checked{'RUN_MODE'}{'IDS'} = '';
+$checked{'RUN_MODE'}{'IPS'} = '';
+$checked{'RUN_MODE'}{$idssettings{'RUN_MODE'}} = "checked='checked'";
$selected{'RULES'}{'nothing'} = '';
$selected{'RULES'}{'community'} = '';
$selected{'RULES'}{'emerging'} = '';
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<table width='100%' border='0'>
<tr>
- <td class='base' width='25%'>
+ <td class='base' colspan='4'>
<input type='checkbox' name='ENABLE_IDS' $checked{'ENABLE_IDS'}{'on'}>$Lang::tr{'ids activate'} $Lang::tr{'intrusion detection system'}
</td>
+ </tr>
- <td class='base' width='25%'>
-  
- </td>
+ <tr>
+ <td colspan='4'><br><br></td>
</tr>
<tr>
- <td colspan='2'><br><br>
+ <td class='base' colspan='4'><b>$Lang::tr{'runmode'}</b></td>
</tr>
<tr>
- <td class='base' width='25%'>
- <b>$Lang::tr{'ids analyze incomming traffic'}</b>
+ <td class='base' colspan='4'>
+ <input type='radio' name='RUN_MODE' value='IDS' $checked{'RUN_MODE'}{'IDS'}>$Lang::tr{'intrusion detection system2'}    
+ <input type='radio' name='RUN_MODE' value='IPS' $checked{'RUN_MODE'}{'IPS'}>$Lang::tr{'intrusion prevention system'}
</td>
+ </tr>
- <td class='base' width='25%'>
- <b>$Lang::tr{'ids analyze routing traffic'}</b>
- </td>
+ <tr>
+ <td colspan='4'><br></td>
</tr>
+
+ <tr>
+ <td colspan='4'><b>$Lang::tr{'ids traffic analyze'}</b><br></td>
+ </tr>
+
+ <tr>
END
;
my $zone_upper = uc($zone);
# Grab checkbox status from settings hash.
- if ($idssettings{"ENABLE_IDS_INPUT_$zone_upper"} eq "on") {
+ if ($idssettings{"ENABLE_IDS_$zone_upper"} eq "on") {
$checked_input = "checked = 'checked'";
}
- # Do the same for the forward setting.
- if ($idssettings{"ENABLE_IDS_FORWARD_$zone_upper"} eq "on") {
- $checked_forward = "checked = 'checked'";
- }
-
- print "<tr>\n";
- print "<td class='base' width='25%'>\n";
- print "<input type='checkbox' name='ENABLE_IDS_INPUT_$zone_upper' $checked_input>$Lang::tr{'ids active on'} $Lang::tr{$zone}\n";
- print "</td>\n";
-
print "<td class='base' width='25%'>\n";
- print "<input type='checkbox' name='ENABLE_IDS_FORWARD_$zone_upper' $checked_forward>$Lang::tr{'ids active on'} $Lang::tr{$zone}\n";
+ print "<input type='checkbox' name='ENABLE_IDS_$zone_upper' $checked_input>$Lang::tr{'enabled on'} $Lang::tr{$zone}\n";
print "</td>\n";
- print "</tr>\n";
}
print <<END
'idle timeout' => 'Leerlauf-Wartezeit in Min. (0 zum Deaktivieren):',
'idle timeout not set' => 'Leerlauf-Wartezeit nicht angegeben.',
'ids activate' => 'Aktiviere',
-'ids analyze incomming traffic' => 'Analysiere eingehende (INPUT) Packete',
-'ids analyze routing traffic' => 'Analysiere zu routende (FORWARD) Packete',
+'ids traffic analyze' => 'Packet-Analyse',
'ids active on' => 'Aktiv auf',
'ids log viewer' => 'Ansicht IDS-Protokoll',
'ids logs' => 'IDS-Protokolldateien',
'intrusion detection system' => 'Einbruchsdetektierung',
'intrusion detection system log viewer' => 'Betrachter der IDS-Protokolldateien',
'intrusion detection system rules' => 'Regeln für die Einbruchsdetektierung',
-'intrusion detection system2' => 'Intrusion Detection System:',
+'intrusion detection system2' => 'Intrusion Detection System',
+'intrusion prevention system' => 'Intrusion Prevention System',
'invalid broadcast ip' => 'Ungültige Broadcast-IP',
'invalid cache size' => 'Ungültige Cache-Größe.',
'invalid characters found in pre-shared key' => 'Ungültige Zeichen im Pre-Shared Schlüssel gefunden.',
'rsvd dst port overlap' => 'Dieser Zielportbereich überlappt mit einem Port, der für die ausschließliche Benutzung durch IPFire reserviert ist:',
'rsvd src port overlap' => 'Dieser Quellportbereich überlappt mit einem Port, der für die ausschließliche Benutzung durch IPFire reserviert ist:',
'rules already up to date' => 'Regeln sind schon aktuell',
+'runmode' => 'Runmode',
'running' => 'LÄUFT',
'safe removal of umounted device' => 'Sie können gefahrlos das abgemeldete Gerät entfernen',
'samba' => 'Samba',
'idle timeout' => 'Idle timeout (mins; 0 to disable):',
'idle timeout not set' => 'Idle timeout not set.',
'ids activate' => 'Activate',
-'ids analyze incomming traffic' => 'Analyze incomming (INPUT) traffic',
-'ids analyze routing traffic' => 'Analyze to-route (FORWARD) traffic',
+'ids traffic analyze' => 'Traffic analyzing',
'ids active on' => 'Active on',
'ids log viewer' => 'IDS log viewer',
'ids logs' => 'IDS Logs',
'intrusion detection system' => 'Intrusion Detection System',
'intrusion detection system log viewer' => 'Intrusion Detection System Log Viewer',
'intrusion detection system rules' => 'intrusion detection system rules',
-'intrusion detection system2' => 'Intrusion Detection System:',
+'intrusion detection system2' => 'Intrusion Detection System',
+'intrusion prevention system' => 'Intrusion Prevention System',
'invalid broadcast ip' => 'Invalid broadcast IP',
'invalid cache size' => 'Invalid cache size.',
'invalid characters found in pre-shared key' => 'Invalid characters found in pre-shared key.',
'rsvd dst port overlap' => 'Destination Port Range overlaps a port reserved for IPFire:',
'rsvd src port overlap' => 'Source Port Range overlaps a port reserved for IPFire:',
'rules already up to date' => 'Rules already up to date',
+'runmode' => 'Runmode',
'running' => 'RUNNING',
'safe removal of umounted device' => 'You can safely remove the unmounted device',
'samba' => 'Samba',