luci-app-firewall: add log option
authorJan Froch <jan@froch.eu>
Sat, 22 Feb 2025 00:13:01 +0000 (01:13 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Sun, 23 Feb 2025 18:49:34 +0000 (12:49 -0600)
This adds the 'log' option to rules in Port Forwards, Traffic Rules and
NAT Rules.

Signed-off-by: Jan Froch <jan@froch.eu>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js

index 34ab804257681b5d8e94f703865304c644f5cbdd..a10cd2eead2915576cd44cca341747dc09380d7f 100644 (file)
@@ -345,6 +345,9 @@ return view.extend({
                fwtool.addLimitOption(s);
                fwtool.addLimitBurstOption(s);
 
+               o = s.taboption('advanced', form.Flag, 'log', _('Enable logging'), _('Log matched packets to syslog.'));
+               o.modalonly = true;
+
                if (!L.hasSystemFeature('firewall4')) {
                        o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
                                _('Passes additional arguments to iptables. Use with care!'));
index 25c7568a9a0f4066980c0b1fcea5bcb08e93fde2..73deea1259eea02daa8902638222c3a53cbfd4a6 100644 (file)
@@ -466,6 +466,9 @@ return view.extend({
                fwtool.addLimitOption(s);
                fwtool.addLimitBurstOption(s);
 
+               o = s.taboption('advanced', form.Flag, 'log', _('Enable logging'), _('Log matched packets to syslog.'));
+               o.modalonly = true;
+
                if (!L.hasSystemFeature('firewall4')) {
                        o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
                                _('Passes additional arguments to iptables. Use with care!'));
index a700475e4907632e80e7ded1e112f4946ecd8f93..c6299f2fcf38d78139b89254330910aafe9d39ee 100644 (file)
@@ -338,6 +338,9 @@ return view.extend({
                fwtool.addLimitOption(s);
                fwtool.addLimitBurstOption(s);
 
+               o = s.taboption('advanced', form.Flag, 'log', _('Enable logging'), _('Log matched packets to syslog.'));
+               o.modalonly = true;
+
                if (!have_fw4) {
                        o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
                                _('Passes additional arguments to iptables. Use with care!'));