13963 Commits

Author SHA1 Message Date
Ad Schellevis
8a3040fecd Dashboard/OpenVPN - missed a spot in 4978b067d5 closes https://github.com/opnsense/core/issues/6516 2023-04-21 20:34:25 +02:00
Ad Schellevis
f0fd1dc6c0 Services: Intrusion Detection - implicit typecase (warnings in debug mode) 2023-04-21 18:29:16 +02:00
Stephan de Wit
41728b7901 unbound: dnsbl_module: (test-mode) assume a query can pass if a blocklist file is empty 2023-04-21 10:09:25 +02:00
Franco Fichtner
a6268ecc27 firmware: revoke 22.7 fingerprint 2023-04-21 07:36:27 +02:00
Ad Schellevis
f09e9d05de configd - reorganise action types, use ActionFactory to offer the requested type which decents from BaseAction.
All supported types have been copied (more or less without modifications) from processhandler.py and ph_inline_actions.py. Ideally the inline part should be restructed at some point as well, one class per type is more clean, but to limit impact this only moves our options around.
2023-04-20 21:48:42 +02:00
Ad Schellevis
c9e36ef230 devd - carp : add INIT as status to catch events for. https://github.com/opnsense/core/issues/6506 2023-04-20 18:14:27 +02:00
Franco Fichtner
d7caf0a667 unbound: fix netmask on IPv6 localhost 2023-04-20 13:06:32 +02:00
Franco Fichtner
0ffc686066 openvpn: fix a warning by passing a desirable empty input with a slash 2023-04-20 12:57:20 +02:00
Franco Fichtner
baa81987b0 dhcp: provide run task to avoid polluting different plugins
Remove require_once and (most) internal knowledge about the data
fetch.  If dhcpd was not there or another provider existed (e.g.
a different DHCP server) we can now grab all of its data at the
same time.  Might also be needed when we move away from isc-dhcp.
2023-04-20 12:48:25 +02:00
Franco Fichtner
8c9866fdaf system: finish simplifying plugins_run()
We don't need to mask parameters here.  The providers should
use the same argument count or default parameters if needed.
A single call cannot pass different arguments for different
providers of the same run task.

For most cases a single provider is set anyway or the data is
simple enough.

The reason this code existed was because plugins_run() was once
copied from plugins_configure() which may require this behaviour
but also has no return data.
2023-04-20 12:47:37 +02:00
Franco Fichtner
85116f7bc3 src: style sweep 2023-04-20 10:19:59 +02:00
Ad Schellevis
e9dc687553 Interfaces: Other Types: VLAN - prevent self-assignments. closes https://github.com/opnsense/core/issues/6509 2023-04-20 09:38:18 +02:00
Franco Fichtner
71e28c519c firmware: update these numbers 2023-04-19 10:16:56 +02:00
Franco Fichtner
4e8235c737 network time: do not pass defaults 2023-04-19 09:39:53 +02:00
Ad Schellevis
e2a1e8c312 VPN: OpenVPN: Clients - When receiving carp events for client mode openvpn instances, treat INIT the same as BACKUP as both modes aren't active. experiment for https://github.com/opnsense/core/issues/6506 2023-04-19 09:09:29 +02:00
lin-xianming
8f9d7e823b
webgui: prevent PHP session gc from running early (#6499)
With the default PHP settings, there is a 1% chance for the session gc
to trigger upon the start of a session, removing session files with
modification times older than 24 minutes. This can cause sessions to
timeout earlier than indicated by the webgui settings.
2023-04-18 18:23:15 +02:00
Ad Schellevis
86e48d3e45 configd: cleanup and style fixes, closes https://github.com/opnsense/core/issues/4150
This commit offers support for deeper nested commands by simplifying the call flow of configd. Eventually we should try to make the action types more modular, but before doing that it makes sense to cleanup up what we have now first. Remove csconfigparser.py as we should be able to pass "optionxform" without wrapping the class as well.
2023-04-17 21:32:42 +02:00
Ad Schellevis
03a5637d1f VPN: IPsec: Advanced Settings - isset() vs !empty() and 0 [basic] options for log levels. closes https://github.com/opnsense/core/issues/6500 2023-04-17 21:09:45 +02:00
Stephan de Wit
e6f806e240
Unbound: ACLs: Migrate to MVC (#6474)
- The "internally generated" ACL entries have been removed in favor of a wildcard (well, a wildcard and localhost)
- Users can now change the default action used by the wildcard: either allow, deny or refuse.
- The legacy implementation wasn't very strict (you could add an entry without any input), this does at least require a name and at least one network. To facilitate the migration, if the 'name' property was empty, it will be set to 'Unnamed ACL'. Entries without defined networks will be discarded without notice.
2023-04-17 11:17:39 +02:00
Franco Fichtner
97d10e1ed3 interfaces: remove indirection for #6489 2023-04-17 08:36:46 +02:00
Nicolas Thumann
4bccc6b4dd
firewall/alias: Fix progress bar default value (#6495) 2023-04-16 19:32:53 +02:00
Ad Schellevis
8ed07a052b Interfaces: Diagnostics - replace empty($result['validations']) for $result['result'] != 'failed' as failed calls to setAction() are not guaranteed to contain validation errors. (for example when not calling via POST) 2023-04-16 15:05:14 +02:00
Ad Schellevis
327334b0fb Interfaces: Diagnostics: Port Probe - replace with MVC version.
This appears to be the last one in Interfaces: Diagnostics, it's a simple and small netcat user interface to check if a remote host+port is accessible.
2023-04-16 14:57:28 +02:00
Ad Schellevis
e75c7a60cb Interfaces: Diagnostics: Trace Route: minor model validation message fix 2023-04-16 13:56:24 +02:00
Franco Fichtner
2f11cf9e59 interfaces: run it 10 times in the background -.- 2023-04-16 08:52:10 +02:00
Franco Fichtner
e604a9397f interfaces: try to run the "fix" in the loop to make it "more reliable"
This is practically impossible to get right the way mpd5/netgraph
fail to deal with this on their own.
2023-04-16 08:35:21 +02:00
Ad Schellevis
cfd70c71b1 Interfaces: Diagnostics: Trace Route: migrate to MVC, closes https://github.com/opnsense/core/issues/6399 2023-04-15 19:03:48 +02:00
Nicolas Thumann
2ff2989f72
netflow: Fix incorrect interface index (#6490) 2023-04-15 18:51:28 +02:00
kuya1284
b85f3d0ed1
Firewall Schedules - cleanups 2023-04-15 17:32:21 +02:00
Bi0T1N
9927f3d49a
proxy: allow more signs for username and password (#6477)
- eliminate the artificial limit of length and
signs which does not exist in squid
- allow in particular @ to support first.last@mycompany.com as username
- all other characters can be used via URL escaping (i.e. %20 for
spaces) but this also means % must be written as %%

see http://www.squid-cache.org/Doc/config/cache_peer/

Co-authored-by: Bi0T1N <Bi0T1N@users.noreply.github.com>
2023-04-15 16:31:40 +02:00
Franco Fichtner
089230252e interfaces: can break after a try 2023-04-14 11:30:35 +02:00
Franco Fichtner
e7aaf497a0 interfaces: whoops 2023-04-14 11:12:28 +02:00
Franco Fichtner
947ed4925a interfaces: ensure PPP netgraph node has the proper name #4696 2023-04-14 11:06:47 +02:00
Franco Fichtner
cc297e741b reporting: more name clearing for safety
See: https://github.com/opnsense/src/commit/499f60b10b6
2023-04-14 10:03:52 +02:00
Stephan de Wit
55dacd0f84 dhcp: add missing double quotes, likely fixes https://github.com/opnsense/core/issues/6428 2023-04-14 09:10:45 +02:00
Franco Fichtner
d195cd2e8a interfaces: also set PCP value on IPv4 DHCP traffic
This requires to set up the VLAN priority field of the
DHCPv4 settings as well as removing the vlan-pcp option
which is redundant now.  This way we have a simpler
approach to finding the correct value while not borrowing
from IPv6 or parsing the advanced options for vlan-pcp.

Leaving the old vlan-pcp in place should not matter.
The last value is ours and this one should be used.

PR: https://forum.opnsense.org/index.php?topic=33376.0
2023-04-13 15:54:45 +02:00
Ad Schellevis
f4081dfcdf Services: Unbound DNS: DNS over TLS - minor improvements to handle "Dot" endpoints and make sure the page actually calls them cc @swhite2
Some small fixes to prevent referer magic to determine he dot endpoint (searchDotAction, getDotAction, ...), since __call() will only be triggered for non existing endpoints (https://www.php.net/manual/en/language.oop5.overloading.php#object.call), we need to set the default to the methods that do exist. Next we can filter and change the target accordingly. The volt template should figure out where it lives, we could have passed this in the ui controller as well, but as these are only two templates and a single page, javascript will do.
2023-04-13 09:22:30 +02:00
Stephan de Wit
0da84ef19f MVC: headers: set pointer cursor 2023-04-12 09:16:55 +02:00
Stephan de Wit
33e5a9ad33 MVC: headers: remove fade and add standard collapse for base_dialog 2023-04-12 08:58:38 +02:00
Franco Fichtner
3518119bbe pkg: sneak an extra space into mtod when appropriate; closes #6479 2023-04-12 08:40:22 +02:00
Franco Fichtner
5835eedf37 openvpn: style sweep 2023-04-12 08:03:01 +02:00
Ad Schellevis
011f1eebe4 VPN: OpenVPN: Client Specific Overrides: Migrate to MVC closes https://github.com/opnsense/core/issues/6381
o add new mvc module
o migrate existing data
o add getOverwrite() in OpenVPN model to retrieve data structured as legacy data to make this an easy drop-in
2023-04-11 21:42:36 +02:00
Alexander O'Mara
ffcd35ff3f Use a data attribute to find existing rows, avoiding special character problems 2023-04-11 10:41:41 +02:00
Franco Fichtner
9d950c8631 ipsec: visible name is visible 2023-04-08 18:57:03 +02:00
Ad Schellevis
621d1b015b VPN: IPsec: Mobile Clients - move Xauth out of "IKE Extensions" block. closes https://github.com/opnsense/core/issues/6481
Since "strongswan.conf" applies to both type of tunnels, make sure we can configure some shared settings for both options here (tunnels/connections). Eventually more settings might move out of the "IKE Extension" block, but for now it should be enough to isolate Xauth. The impact of configuring xauth when not being used is likely small, so when connections are used we always provide xauth-pam settings (the connection determines if it's actually used).

Removed the "is mobile" enabled in Auth/Services/IPsec.php, when only legacy is used, the behaviour should be the same (as xauth-pam isn't configured).
2023-04-08 13:55:56 +02:00
Stephan de Wit
7e877412c1 MVC: base_form: allow forms to hide by default 2023-04-07 17:15:39 +02:00
Stephan de Wit
1cd2811382 MVC: base_dialog: apply collapsible table headers to the standard dialog form as well. 2023-04-07 16:51:36 +02:00
Stephan de Wit
0a0b961e61 MVC: base_form: default to collapsible headers 2023-04-07 16:43:23 +02:00
Stephan de Wit
19094b1c3e unbound: advanced: make headers collapsible 2023-04-07 11:29:56 +02:00
Stephan de Wit
07ce32139e MVC: base_form: allow collapsible headers 2023-04-07 11:26:39 +02:00