From: Jan Froch Date: Sat, 22 Feb 2025 00:13:01 +0000 (+0100) Subject: luci-app-firewall: add log option X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cecb1e5227fc2c1d226157a04fe9a695bbf02257;p=project%2Fluci.git luci-app-firewall: add log option This adds the 'log' option to rules in Port Forwards, Traffic Rules and NAT Rules. Signed-off-by: Jan Froch --- diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js index 34ab804257..a10cd2eead 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/forwards.js @@ -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!')); diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js index 25c7568a9a..73deea1259 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js @@ -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!')); diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js index a700475e49..c6299f2fcf 100644 --- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js +++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/snats.js @@ -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!'));