public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] optionsfw.cgi: Fix bug12981 - Add option to log or not log dropped hostile traffic
@ 2024-01-10 14:38 Adolf Belka
  2024-01-10 14:38 ` [PATCH v2 2/4] firewall: Fixes bug12981 - add if loop " Adolf Belka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adolf Belka @ 2024-01-10 14:38 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]

- Added option with drop hostile section to decide if the dropped traffic should be
   logged or not.

Fixes: bug12981
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 html/cgi-bin/optionsfw.cgi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi
index fbff67b2f..a2a0058f7 100644
--- a/html/cgi-bin/optionsfw.cgi
+++ b/html/cgi-bin/optionsfw.cgi
@@ -94,6 +94,9 @@ if (!$settings{'DROPSPOOFEDMARTIAN'}) {
 if (!$settings{'DROPHOSTILE'}) {
 	$settings{'DROPHOSTILE'} = 'off';
 }
+if (!$settings{'LOGDROPHOSTILE'}) {
+	$settings{'LOGDROPHOSTILE'} = 'on';
+}
 if (!$settings{'LOGDROPCTINVALID'}) {
 	$settings{'LOGDROPCTINVALID'} = 'on';
 }
@@ -125,6 +128,9 @@ $checked{'DROPSPOOFEDMARTIAN'}{$settings{'DROPSPOOFEDMARTIAN'}} = "checked='chec
 $checked{'DROPHOSTILE'}{'off'} = '';
 $checked{'DROPHOSTILE'}{'on'} = '';
 $checked{'DROPHOSTILE'}{$settings{'DROPHOSTILE'}} = "checked='checked'";
+$checked{'LOGDROPHOSTILE'}{'off'} = '';
+$checked{'LOGDROPHOSTILE'}{'on'} = '';
+$checked{'LOGDROPHOSTILE'}{$settings{'LOGDROPHOSTILE'}} = "checked='checked'";
 $checked{'LOGDROPCTINVALID'}{'off'} = '';
 $checked{'LOGDROPCTINVALID'}{'on'} = '';
 $checked{'LOGDROPCTINVALID'}{$settings{'LOGDROPCTINVALID'}} = "checked='checked'";
@@ -279,6 +285,13 @@ END
 			<input type='radio' name='DROPSPOOFEDMARTIAN' value='off' $checked{'DROPSPOOFEDMARTIAN'}{'off'} /> $Lang::tr{'off'}
 		</td>
 	</tr>
+	<tr>
+		<td align='left' width='60%'>$Lang::tr{'log drop hostile'}</td>
+		<td align='left'>
+			$Lang::tr{'on'} <input type='radio' name='LOGDROPHOSTILE' value='on' $checked{'LOGDROPHOSTILE'}{'on'} />/
+			<input type='radio' name='LOGDROPHOSTILE' value='off' $checked{'LOGDROPHOSTILE'}{'off'} /> $Lang::tr{'off'}
+		</td>
+	</tr>
 </table>
 <br/>
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-10 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 14:38 [PATCH v2 1/4] optionsfw.cgi: Fix bug12981 - Add option to log or not log dropped hostile traffic Adolf Belka
2024-01-10 14:38 ` [PATCH v2 2/4] firewall: Fixes bug12981 - add if loop " Adolf Belka
2024-01-10 14:38 ` [PATCH v2 3/4] en.pl: Fixes bug12981 - adds english language input for choice of drop hostile logging Adolf Belka
2024-01-10 14:38 ` [PATCH v2 4/4] optionsfw.cgi: Move Logging section to after all Firewall Options Drop commands Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox