Commit graph

36 commits

Author SHA1 Message Date
Jo-Philipp Wich
fbe18753fb
Merge pull request #6428 from stokito/luci-app-firewall
luci-app-firewall: missing variable declaration
2023-06-23 12:03:48 +02:00
Sergey Ponomarev
b5ba9c3741 luci-app-firewall: missing variable declaration
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-06-10 21:51:09 +03:00
Jonathan G. Underwood
73abc0ee6d luci-app-firewall: add ICMPv6 MLD rules
This adds entries for ICMPv6 MLD types. This fixes the ICMPv6 MLD types to be consistent with fw4.

These types were added to fw4 in this commit:

    -  e6e82a5520

But were omitted from the corresponding luci-app-firewall commit:

    - 88a016cbff

Signed-off-by: Jonathan G. Underwood <jonathan.underwood@gmail.com>
2023-05-16 20:34:55 +01:00
Jo-Philipp Wich
7a4afdcb05 application/luci-app-firewall: fix null access
Fixes: 48086e1c7b ("luci-app-firewall: Add ipset field to snats")
Fixes: d0d891c23e ("luci-app-firewall: Add ipset field to forwards (redirects)")
Fixes: f407a013ba ("luci-app-firewall: Add ipset field to rules")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-03-30 20:07:25 +02:00
Paul Dee
f407a013ba luci-app-firewall: Add ipset field to rules
Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2023-03-29 15:33:37 +02:00
Paul Dee
88a016cbff luci-app-firewall: extend icmpv6 types available
luci complement to e6e82a5520

Tested on 22.03.3

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2023-02-17 12:57:32 +01:00
Paul Dee
7bf1c2daa0 luci-app-firewall: remove the '', 'any' mapping in icmpv6 entries
This prevents its inconsistent checked/unchecked behaviour when exiting
and re-entering the dialogue.

Tested on 22.03.3

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2023-02-17 12:57:32 +01:00
Jo-Philipp Wich
0eb3aeb010 luci-app-firewall: fix misspelling of restrictions
Fixes: #5749
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-03-30 20:44:13 +02:00
Stijn Tintel
48599d8d1d luci-app-firewall: initial firewall4 compatibility
Initial changes required for firewall4 compatibility:
* depend on uc-firewall instead of firewall
* detect installed version of firewall and hide incompatible features

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
2022-01-06 15:03:57 +02:00
Jo-Philipp Wich
0b4b6380d0 luci-app-firewall: use firewall.getZoneColorStyle() in views
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-11 13:00:50 +01:00
Jo-Philipp Wich
6c96414d9b luci-app-firewall: adjust zone badge markup
No functional changes but required for styling rules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-10 11:57:43 +01:00
Paul Dee
19c66ef539 luci-app-firewall: add ipv6 exclusive ICMP types
to firewall 'Match ICMP type' field.

See issue #5213

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
2021-08-31 23:15:16 +02:00
Stan Grishin
1b4936a6e2 luci-app-firewall: replace hh.mm.ss with hh:mm:ss
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-08-04 20:16:04 +00:00
Jo-Philipp Wich
bbf1a5343f luci-app-firewall: simplify some form actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:41:50 +01:00
Florian Eckert
ab390cf94e luci-app-firewall: add tooltip on rules that have time restrictions enabled
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-01-13 12:33:29 +01:00
Robby K
43dc420864 luci-app-firewall: rules: add ICMPv6 Packet Too Big (Type 2)
The "Match ICMP type" drop-down menu was missing this ICMPv6 type. According to RFC 4890 section 4.3.1 it is essential for communications and must not be dropped. This patch allows for doing this through LuCI.

Signed-off-by: Robby K <robbyke@gmail.com>
2020-10-01 22:52:46 +02:00
Jo-Philipp Wich
3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00
Jo-Philipp Wich
9fd7e9fc23 luci-app-firewall: fix variable clash leading to incorrect family display
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-20 18:57:47 +01:00
Jo-Philipp Wich
f1771d14aa luci-app-firewall: add SNAT config migration
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-19 19:38:07 +01:00
Jo-Philipp Wich
7944b0a90b luci-app-firewall: rework rule descriptions, deduplicate code
Use a simple custom format string DSL to assemble the rule description
texts in the overview page.

Also move common code for shared, complex cbi options to the firewall
tool class.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-19 16:22:47 +01:00
Jo-Philipp Wich
0608ff09f8 luci-app-firewall: consolidate duplicate option code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 22:16:53 +01:00
Jo-Philipp Wich
28f4a9fced luci-app-firewall: support 'limit' and 'limit_burst' options
Also resync firewall translations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 21:36:39 +01:00
Jo-Philipp Wich
aa62419e5b luci-app-firewall: support 'DSCP' action and matches for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 21:00:46 +01:00
Jo-Philipp Wich
3c0fcf49d4 luci-app-firewall: support 'MARK' action and matches for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 20:35:09 +01:00
Jo-Philipp Wich
d601e79da5 luci-app-firewall: support 'helper' and 'set_helper' parameters for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 16:13:01 +01:00
Jo-Philipp Wich
267085cf2d luci-app-firewall: support 'direction' and 'device' parameters for rules
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16 15:31:01 +01:00
Jo-Philipp Wich
d07cfba160 luci-app-firewall: update rule ip hints based on address family
Fixes: #3119
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30 14:51:40 +01:00
Jo-Philipp Wich
18c60968dc luci-app-firewall: store week- and monthday restrictions as strings
Fixes: FS#2661
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2661
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30 00:08:17 +01:00
Jo-Philipp Wich
37b6092aef luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHints
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
ed8f1c4c1c luci-app-firewall: honour global default policies in per-zone settings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-14 22:58:15 +02:00
Aaron Jones
f7cb913d10
luci-app-firewall: rules: sort ICMP types alphabetically
This just makes it easier to find the type one would want.
No types were added or removed, only re-arranged.

Signed-off-by: Aaron Jones <aaronmdjones@gmail.com>
2019-08-11 06:13:15 +00:00
Aaron Jones
17f3e03930
luci-app-firewall: rules: allow ICMPv6 ND types
The "Match ICMP Type" dropdown had entries for router
solicitation & router advertisements, but not the more
generic neighbour solicitation & neighbour advertisements.

A LAN cannot function without Neighbour Discovery; this
means that setting a LAN interface default input policy to
REJECT breaks IPv6 WAN access for all hosts on that LAN;
as they can no longer discover their gateway's MAC address.
This can be fixed with appropriate rules allowing ND input,
which this patch allows one to do in LuCI.

The spelling is the same as in [1].

[1] <https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/config/firewall/files/firewall.config>

Signed-off-by: Aaron Jones <aaronmdjones@gmail.com>
2019-08-11 06:10:47 +00:00
Jo-Philipp Wich
0be4ad51a0 luci-app-firewall: fix cbi form for rules
- Set src/dest defaults only in initial section create state, otherwise it
   is impossible to specify output rules
 - Get rid of dest_remote/dest_local widget switching and implement change
   logic directly in tools.widgets.CBIZoneSelect
 - Remove leftover debug code

Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-21 22:35:24 +02:00
Anton Kikin
b15c62071c luci-app-firewall: format protocol family for forwards and rules
Fixes: #2878
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-18 12:46:00 +03:00
Jo-Philipp Wich
f970c485cf treewide: switch to shared isObject(), toArray() and sortedKeys() helpers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 20:11:35 +02:00
Jo-Philipp Wich
9c16090780 luci-app-firewall: switch to client side CBI views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:36:26 +02:00