diff options
author | S. Brusch <ne20002@gmx.ch> | 2023-01-30 20:40:13 +0100 |
---|---|---|
committer | ne20002 <ne20002@gmx.ch> | 2023-07-25 13:17:57 +0200 |
commit | 3a4843f341c9d0c5749b9cad4c82eacf67b0a79c (patch) | |
tree | 58c583f586e0b318316d3b513d984042e4caa4e6 /applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view | |
parent | 075b86ceebe7c9ef31a11fcecad0b26960fd4dc3 (diff) |
crowdsec-firewall-bouncer: add app
Signed-off-by: S. Brusch <ne20002@gmx.ch>
Maintainer: S. Brusch <ne20002@gmx.ch>
Compile tested: no compile, script
Run tested: ipq40xx/generic, Fritzbox 4040, Openwrt 22.03.3
Description: this is the luci app for crowdsec-firewall-bouncer package
Diffstat (limited to 'applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view')
-rw-r--r-- | applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view/crowdsec-firewall-bouncer/form.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view/crowdsec-firewall-bouncer/form.js b/applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view/crowdsec-firewall-bouncer/form.js new file mode 100644 index 0000000000..b8fe2ae02d --- /dev/null +++ b/applications/luci-app-crowdsec-firewall-bouncer/htdocs/luci-static/resources/view/crowdsec-firewall-bouncer/form.js @@ -0,0 +1,64 @@ +'use strict'; +'require view'; +'require form'; +'require tools.widgets as widgets'; + +return view.extend({ + render: function() { + var m, s, o; + + m = new form.Map('crowdsec', _('CrowdSec'), + _('Gain <a href="http://www.crowdsec.net">crowd-sourced</a> protection against malicious IPs. ' + + 'Benefit from the most accurate CTI in the world.')); + + + s = m.section(form.TypedSection, 'bouncer', _('Bouncer')); + s.anonymous = true; + + o = s.option(form.Flag, 'enabled', _('Enable')); + o.default = '0'; + o.rmempty = false; + + o = s.option(form.Value, 'api_url', _('URL of local API'), + _('The URL of your local CrowdSec API instance.')); + o.default = ''; + o.rmempty = false; + + o = s.option(form.Value, 'api_key', _('API key'), + _('The key of your bouncer as registered on the local CrowdSec API.')); + o.default = ''; + o.password = true; + o.rmempty = false; + + o = s.option(widgets.DeviceSelect, 'interface', _('Filtered interfaces'), + _('List of interfaces with traffic to be filtered.')); + o.noaliases = true; + o.multiple = true; + o.rmempty = false; + + o = s.option(form.Flag, 'ipv6', _('Enable support for IPv6'), + _('If unchecked IPv6 will not be filtered.')); + o.default = '1'; + o.rmempty = false; + + o = s.option(form.Flag, 'filter_input', _('Filter input chain'), + _('Block packets from filtered interfaces addressed to the router itself.')); + o.default = '1'; + o.rmempty = false; + + o = s.option(form.Flag, 'filter_forward', _('Filter forward chain'), + _('Block packets from filtered interfaces addressed to devices in your network.')); + o.default = '1'; + o.rmempty = false; + + o = s.option(form.Flag, 'deny_log', _('Log filtered ip addresses'), + _('If checked, a log statement will be added to the firewall rule and blocked ' + + 'ip addresses will be logged to System Log.')); + o.default = '0'; + o.rmempty = false; + + + return m.render(); + }, +}); + |