180 Commits

Author SHA1 Message Date
Ad Schellevis
b52ce9da7b Firewall: Rules - limit number of sources/destinations, closes https://github.com/opnsense/core/issues/8334 2025-02-17 08:38:19 +01:00
Ad Schellevis
e248e4517f Firewall: Rules - properly unpack multiple source/destination items. closes https://github.com/opnsense/core/issues/8321 2025-02-12 18:57:52 +01:00
Ad Schellevis
e4b6ec183b Firewall: NAT: Port Forward - fix unassociated rule, closes https://github.com/opnsense/core/pull/8198
It's probably still best to prevent editing associated rules as we can not guarantee settings stick, for unassociated rules, we should be able to edit them.
Fixes missing type in the process here (on firewall rules).
2025-01-23 11:23:21 +01:00
Franco Fichtner
65a8435df8 system: migrate system booting banner to notifications
Refactor leftovers while here.
2024-08-22 12:07:24 +02:00
Franco Fichtner
9240c5a15c firewall: show inspect in xs, it does show two columns
PR: https://forum.opnsense.org/index.php?topic=41882.0
2024-08-01 08:10:13 +02:00
Jason Fayre
fa2bf112fb
firewall rules page accessibility fixes (#7588)
* Firewall:  Added aria-labels to buttons
2024-07-01 20:52:15 +02:00
Ad Schellevis
ceb51410ba Firewall: Rules: XXX - show automation rules in their own section as they are sorted in the same area as interface rules.
This is a side affect of 1c96851043 , which changed the rule priority to match the manual (legacy) rules.

closes https://github.com/opnsense/core/issues/7367
2024-04-08 11:24:46 +02:00
lin-xianming
b7136e75c3
firewall/rules: fix display of ICMP tooltip (#7289)
The tooltip was missing when the ICMP type is all.
2024-03-04 09:25:34 +01:00
lin-xianming
c9e9606b2d
firewall/rules: fix floating rule display (#7283)
1. For a floating rule with a single interface group, the interface
count and tooltip did not show when viewed from an interface rules page.

2. For a floating rule with an interface group and at least one other
interface or interface group, the entire rule did not show when viewed
from an interface rules page for which the interface is contained in one
of the interface groups.
2024-02-27 08:50:23 +01:00
Franco Fichtner
fdc8cc34fa firewall: move click() from tr to button #6991
Plus minor cleanups.
2023-11-15 10:15:06 +01:00
Ad Schellevis
5aaada600a Firewall / Rules - add section for automatic rules being added at the end of the ruleset. Although technically the presentation is not 100% accurate (shown before rules, after groups), the text should be clear enough now. closes https://github.com/opnsense/core/issues/6991 2023-11-15 09:58:33 +01:00
Ad Schellevis
be0b18930f Firewall: Rules: Floating - add "Interface / Invert" to the list, which will invert the "on" clause of the rule. To prevent future tickets when selecting multiple interfaces and invert, we'll add a validation to only allow single inverts.
When multiple interfaces are selected, these will render into separate rules in which case it might not be clear what the outcome would be, specifically when choosing something else than "pass" (pass lan,wan would lead to two rules which match either lan or wan, block lan, wan would lead to random behavior for example).

For https://github.com/opnsense/core/issues/6902
2023-10-02 14:36:28 +02:00
Franco Fichtner
6256ea2e50 firewall: fix a couple of warnings on the rules page 2023-08-02 08:01:38 +02:00
Franco Fichtner
0e1aa4bcca firewall: two more group issues 2023-08-01 12:24:55 +02:00
Franco Fichtner
8eaa7adfe6 src: fix deprecations on PHP 8.2 2023-07-19 11:04:33 +02:00
Ad Schellevis
3725d70732 Firewall: Rules - missing [!] on inverted aliases. 2023-03-10 07:48:22 +01:00
Ad Schellevis
48bdf53cda Firewall: Rules - refactor soure/destination (port) rendereing and align it with manual rules underneath, while here also hide group items when in a group. closes https://github.com/opnsense/core/issues/6403 2023-03-08 11:53:16 +01:00
Stephan de Wit
27f4c6fa6f Firewall: Rules: spelling 2023-02-06 11:01:39 +01:00
Franco Fichtner
0c92ec5935 firewall: roll this back for now
The problem is htmlspecialchars() most likely and html_safe() is fixed now.
2023-02-02 12:20:57 +01:00
Ad Schellevis
19f8cf5755
Firewall/Rules - show all applicable rules when showing an interface (#6285) 2023-01-30 14:08:14 +01:00
Ad Schellevis
a9f4b4b520 Firewall: Rules: Floating - show automated "port 0" rule as port "0". closes https://github.com/opnsense/core/issues/6215 2022-12-27 09:11:41 +01:00
Ad Schellevis
81a355b5c0 Firewall: Rules: LAN - Move Inspect action into it's own async api action to prevent long page loads on large setups. 2022-06-05 15:55:57 +02:00
kulikov-a
d387c59f5e
Firewall - categories - check state before select (#5538)
Dont select disabled checkboxes
2022-02-03 15:23:07 +01:00
Ad Schellevis
43b7f1eb7f Firewall: Diagnostics: States Dump - refactor to MVC.
o fix minor regression duplicating records (only flush on last content line)
o add link to firewall / rules page
2021-06-21 19:37:27 +02:00
Franco Fichtner
5399473a2b firewall: remote use of $main_buttons for #4216 2021-06-16 16:25:42 +02:00
kulikov-a
b8276e774b
firewall_rules.php: Icon color after toggle fix (#4773) 2021-03-03 17:18:04 +01:00
ElJeffe
a75adc7388
Fix Icon Toggle for Block & Reject (#4640) 2021-01-26 08:56:46 +01:00
Ad Schellevis
10dc80f54f Firewall / NAT: support category filters : add color selection and display for https://github.com/opnsense/core/issues/4587 2021-01-19 11:48:41 +01:00
Ad Schellevis
224dfb0a36 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
refactor javascript code and move it into opnsense_legacy.js for reuse. while here add a standard controller we can use to query existing categories and allow usage from the components in scope of this change.
Keep current selection in the user session so selections are sticky among tab changes and edits. The previous "hack menu" was a bit impractical to expand to other components as well.
2021-01-13 17:06:39 +01:00
Ad Schellevis
416fc37ee9 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
o replace type ahead with tokenizer (mutli select) while here, since the type ahead needed fixes which we rather don't copy to the other firewall sections
o we might want to change the model serializeToConfig() and reload and send it to a separate function in config.inc later to ease migration later. Part of it could be separated with a callback, but it's not super needed
o hook categories into model for firewall rules
2021-01-12 18:14:50 +01:00
Ad Schellevis
2bed9fa877 firewall_rules.php: cleanup 2021-01-07 09:10:37 +01:00
Ad Schellevis
f0b79d0b53 filter: category selector missing caption 2021-01-06 16:41:47 +01:00
Ad Schellevis
285f7c65ed Firewall -> Rules, checkbox input ignores visibility setting. for https://github.com/opnsense/core/issues/4020 2020-04-06 07:09:20 +02:00
Ad Schellevis
211fd8dfb3 firewall: for automatic rules, floatind means either all interfaces (empty) or more than one selected. for https://github.com/opnsense/plugins/issues/1720 2020-03-09 15:13:02 +01:00
Ad Schellevis
ac5dd9f4c2 Firewall rule stats not visible when using html escapable characters. closes https://github.com/opnsense/core/issues/3620 2020-01-30 15:36:22 +01:00
Franco Fichtner
b83cb18e76 firewall: nicer toggle; closes #3700 2019-09-17 16:34:21 +02:00
Ad Schellevis
af7d7236df firewall, rules. use same message as other legacy pages, which also informs the user about HAsync when needed. The background note is not very relevant anyway. 2019-08-07 17:03:30 +02:00
Ad Schellevis
d2fc3c2567 firewall, rules. refactor message dialog to show after toggle. ref https://github.com/opnsense/core/pull/3605 2019-08-07 10:32:03 +02:00
Ad Schellevis
c8b57d0bfe firewall/rules, toggle enabled/disabled, log on/off via ajax call, as discussed https://github.com/opnsense/core/pull/3605 2019-08-06 13:09:11 +02:00
johnaheadley
acfc9f636f
Logging toggle v2 2019-08-04 11:03:55 -07:00
John Headley
50fbe6ca79 Merge remote-tracking branch 'opnsense/master' into logging_toggle
# Conflicts:
#	src/www/firewall_rules.php
2019-08-04 10:23:13 -07:00
Ad Schellevis
7edd851e20 Firewall overview, minor alignment fix. closes https://github.com/opnsense/core/issues/3619 2019-08-01 11:09:14 +02:00
Ad Schellevis
01c16b0a86
Firewall, allow quick and direction on interface rules, closes https://github.com/opnsense/core/issues/3594
Currently the direction of the traffic can only be chosen in floating rules, but in some scenario's it's much easier to create outbound rules (only inbound is supported now).

When using a lot of interfaces, which should all be allowed to access devices on one specific interface, this would save quite some rules and is easier to track for the administrator.

This feature adds direction as on option and while already changing these pages, also allow to create "non quick" rules on interfaces.
Functionally the "regular" rules would be more aligned with the "floating" rules as we have now, with the exception that you can't add multiple interfaces in a normal rule due to the inability to reorder a single rule in multiple rulesets (rules are positional).

Policy based routing on outbound rules is not supported on the interface rules for now, since it would probably lead to confusion.
The old configuration defaults still apply, when writing an entry, both quick and direction are saved as well (default quick + in).
2019-08-01 09:37:24 +02:00
Ad Schellevis
534f3c870e Filter, rule overview, show automatic rules targetting all interfaces in Floating section (slightly related to https://github.com/opnsense/core/issues/3594) 2019-07-30 14:04:19 +02:00
johnaheadley
6fec8fc6a5
Added logging toggle for firewall rules 2019-07-27 10:47:33 -07:00
Ad Schellevis
8aedc0f0d3 filter, rules page. html escape dynamic entries to display aliases. ref https://github.com/opnsense/core/issues/3581 2019-07-18 12:59:35 +02:00
Ad Schellevis
7665d2bc7f filter, rule overview. guess ipproto when not set, closes https://github.com/opnsense/core/issues/3581 2019-07-18 08:54:45 +02:00
Franco Fichtner
5184400115 firewall: change this back #3497 2019-05-23 08:30:32 +02:00
Franco Fichtner
135305347d firewall: use "*" in automatic rules for schedule as well
Although "N/A" is true, "*" is more consistent.
2019-05-11 13:03:46 +02:00
Franco Fichtner
abe6b092e0 firewall: kill hover, we have proper striping now 2019-05-09 11:28:22 +02:00