18010 Commits

Author SHA1 Message Date
Franco Fichtner
034fe656fd openvpn: style 2025-03-05 21:46:05 +01:00
Ad Schellevis
01ceab0f02 openvpn: fix regression in dd999d732c, advanced toggle's id changed 2025-03-05 21:02:56 +01:00
Ad Schellevis
eb6e9a9fcf VPN: OpenVPN: Instances - add basic http client option, closes https://github.com/opnsense/core/issues/8342 2025-03-05 20:58:19 +01:00
Ad Schellevis
e7ad0a4fcb VPN: OpenVPN: Instances - only show "Compression migrate" and "Persist address pool" in server mode, minor change for https://github.com/opnsense/core/pull/8396 2025-03-05 20:25:02 +01:00
Ad Schellevis
4d9739d68a VPN: OpenVPN: Instances - add dco validation for fragment size, closes https://github.com/opnsense/core/issues/7989 2025-03-05 20:12:57 +01:00
Ad Schellevis
3e6467758a OpenVPN: add token generation button for "Auth Token secret" input as implemented in https://github.com/opnsense/core/pull/8396 , also fix a minor glitch around advanced options. 2025-03-05 20:04:02 +01:00
Marius Halden
2178e59f05
OpenVPN: Add support for various options (#8396)
Add support for auth-gen-token renawal time.

Add support for auth-gen-token-secrets to allow failover between
servers.

Add support for pushing inactive to clients to have them disconnect
after being idle for a set time.

Add support for explicit-exit-notify and for pushing it. This will allow
UDP connection to notify peers that they are going away.

Add support for ifconfig-pool-persist, which will allow smoother roaming
combined with auth-gen-token since client will keep their ip address.

Add support from compress migrate. This option will conditionally use
stub compression for clients announcing they have compression enabled
while leaving it of for all other clients.
2025-03-05 20:03:42 +01:00
Franco Fichtner
6b4c98726d system: tweak UX of tunables; closes #7440
Build a formatter for the empty default and hide the
virtual fields from the default dialog by default.

The cloning doesn't make a lot of sense here so remove
it completely.

Delete only if in config.
2025-03-05 17:57:00 +01:00
Franco Fichtner
85319e2501 system: migrate 'default' tunable value to empty one #7440
After a bit of back and forth and issues reported with
bootstrapping it's better to get rid of the old keyword
which unifies the default selection under the empty value.
2025-03-05 14:17:58 +01:00
Ad Schellevis
06184a0619 Services: Dnsmasq DNS & DHCP - missing tag: prefix for interfaces 2025-03-05 13:22:18 +01:00
Ad Schellevis
3185ba9cf0 tunables: empty values are defaults in our new mvc model, prevents "sysctl: empty numeric value" messages during boot. 2025-03-05 11:01:31 +01:00
Stephan de Wit
e1a0278b17 shaper: regression in d08addc25c, import removed 2025-03-05 10:32:56 +01:00
Ad Schellevis
e9047fa003 Services: Dnsmasq DNS & DHCP - only add default dns when not already specified, avoids duplication warning message for https://github.com/opnsense/core/issues/8329 2025-03-04 21:05:07 +01:00
Franco Fichtner
8c0ef7c3ac mvc: style sweep 2025-03-04 20:35:17 +01:00
Ad Schellevis
719aed032e Services: Dnsmasq DNS & DHCP - add nosync grid formatter for https://github.com/opnsense/core/issues/8329 2025-03-04 20:34:28 +01:00
Ad Schellevis
d343bdf8ce Services: Dnsmasq DNS & DHCP - allow ipv6 dhcp leases as described in https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html for https://github.com/opnsense/core/issues/8329 2025-03-04 20:16:00 +01:00
Franco Fichtner
b514aafac6 src: overzealous end of statement 2025-03-04 19:19:57 +01:00
Ad Schellevis
c93e0ac745 mvc: merge NetworkValidator into NetworkField to ease extensibility and add unit test
also needed for https://github.com/opnsense/core/issues/8329
2025-03-04 16:16:21 +01:00
Franco Fichtner
bb37fa89e7 interfaces: kill another "realif" side effect
This inline-assign shouldn't happen anymore (likely a very early version
using the wlan device name implicitly).  Maybe for 25.7, needs a tiny code
audit at one point but since the other cruft changes are in 25.1.3 this
makes sense to push.
2025-03-04 15:46:04 +01:00
Franco Fichtner
a0e6d92fa3 ui: whitespace 2025-03-04 15:19:40 +01:00
Franco Fichtner
50ed8aeae3 system: remove unused next[gu]id 2025-03-04 15:09:51 +01:00
Franco Fichtner
c41ede0343 mvc: header style 2025-03-04 15:06:39 +01:00
Ad Schellevis
1d591469f4 mvc: fix unit tests for model relation fields. 2025-03-04 14:49:17 +01:00
Franco Fichtner
3eb14bf941 backend: allow pluginctl to filter on -x/-X option 2025-03-04 14:44:42 +01:00
Franco Fichtner
58c5185b51 system: skip time servers in wizard
First these are sane defaults, second they always belonged to NTPd which
we do not configure in the wizard.  The settings are now contained
within network time/ntpd and just need a proper migration when the MVC/API
conversion for that component begins.
2025-03-04 14:17:06 +01:00
Franco Fichtner
3089115076 network time: xmlrpc definition to correct file 2025-03-04 14:10:40 +01:00
Franco Fichtner
1f19c232d0 system: pad motd a tiny bit more 2025-03-04 12:30:22 +01:00
Franco Fichtner
c8e8b49db1 config: typo 2025-03-04 11:47:21 +01:00
Franco Fichtner
bf4c93f6b0 system: remove xmlparse.inc now since it's mostly unused
Keep the dreaded listtags() around, but it's already pretty
sparsely used.  A brave new world.
2025-03-04 11:40:12 +01:00
Ad Schellevis
a0fca2cc2f Services: Dnsmasq DNS & DHCP - reorganize general dhcp settings, add nosync to it and ranges so we can test the new nosync approach. for https://github.com/opnsense/core/issues/8329 2025-03-04 11:32:39 +01:00
Ad Schellevis
f569ead1a5 mvc: BooleanField defaults to 0 on creation, this will not change any empty node, just changes how these are being created for the first time. 2025-03-04 11:32:39 +01:00
Franco Fichtner
bbe8cbb49a src: style sweep 2025-03-04 11:03:10 +01:00
Ad Schellevis
8e64f0dffb xmlrpc: extend nosync support to keep backup items for new cases, closes https://github.com/opnsense/core/issues/8394
We never rely on xml ordering, which means a "nosync" can always be appended or prepended into an existing dataset (as long as uuid's don't overlap, but that's a bit of a corner case).

This commits tracks the nosync items inside the dataset to sync and prepends them to the new target set, so all nosync items on the back remain where they belong.
2025-03-04 10:57:20 +01:00
Franco Fichtner
c864f9f3b0 system: align dnsallowoverride* flags with MVC store approach
Also change the default config.xml to avoid new install side effects.
2025-03-04 10:47:10 +01:00
Ad Schellevis
fc6e169a47 xmlrpc: time for some spring cleaning before working on https://github.com/opnsense/core/issues/8394
The $sync_full  construct always looked a bit weird, certainly as different other comparable config sections don't seem to have the same issue as mentioned in the original commit (1b99e1e53a). Tried the nat rules on an existing setup after this change, which still works like a charm.
2025-03-04 09:57:59 +01:00
Ad Schellevis
8c63dad2f3 xmlrpc: stop pushing nextuid and nextgid as these don't exist anymore. 2025-03-04 09:45:05 +01:00
Ad Schellevis
03577ba3ca Services: Unbound DNS - fix model migration, between versions the "domain" container was moved to "dots", which means we can only move items into the new spot during migrations of old configurations. closes https://github.com/opnsense/core/issues/8395
This is certainly a downside of data migrations in general, when looking at the actual target, we don't have all the versions in between available. which means breakage is possible when skipping a lot of versions on our end.
2025-03-04 09:32:24 +01:00
Ad Schellevis
64c55b7afb dnsmasq: fix typo in previous for https://github.com/opnsense/core/issues/8329 2025-03-04 09:06:01 +01:00
Franco Fichtner
190131ed75 src: style sweep 2025-03-04 08:31:06 +01:00
Ad Schellevis
968e5f9d9a dnsmasq: Backend migration and add dhcp support for https://github.com/opnsense/core/issues/8329
missed a couple of spots, options specified but not implemented.
Also add dhcp-reply-delay for dhcp scope splits.
2025-03-03 21:25:48 +01:00
Franco Fichtner
16b23493f0 wizard: menu flipping 2025-03-03 16:50:05 +01:00
Franco Fichtner
4c8fc82a1d mvc: wizard style sweep 2025-03-03 16:46:25 +01:00
Ad Schellevis
eb2af7f2fd Services: Dnsmasq / add dhcp option 114 for captive portal (https://github.com/opnsense/core/issues/8329) 2025-03-03 16:11:35 +01:00
Ad Schellevis
592a62b0df
wizard: reimplement system setup (#8378)
* wizard: reimplement system setup, for https://github.com/opnsense/core/issues/8352

This commit implements our replacement for the setup wizard. The questions are roughly the same as in the legacy version.
Some less relevant options have been removed (pppoe ondemand for example) and isc-dhcpd has been replaced with dnsmasq.

Only standard tools have been used, a memory model to validate the data and simple input forms in tabs.

The in memory model acts as a wrapper around a legacy configuration data and a couple of component models to apply the requested settings.

Some legacy settings using isset() have been altered to use their empty() equivalent.

* wizard: as we're changing to dnsmasq as default, we need to make sure the console setup configures the same (https://github.com/opnsense/core/issues/8352)

Fix some small php arnings in the process, but further than that just rewrite the dhcpd console handling to use dnsmasq instead of isc.
Eventually we will need to rewrite the console tools as well, but let's try to keep this compatible with minimal impact.

* wizard: change other occurrences of isset($config['dnsallowoverride']) for https://github.com/opnsense/core/issues/8352

* wizard: sort listtags() and some other minor review comments for https://github.com/opnsense/core/issues/8352
2025-03-03 15:26:16 +01:00
Franco Fichtner
d32ec31f79 mvc: reformat header 2025-03-03 12:20:27 +01:00
Franco Fichtner
ffc5d4ae65 src: style sweep for cp changes 2025-03-03 12:04:58 +01:00
Ad Schellevis
9a250a26f3 Services: Dnsmasq DNS & DHCP - misinterpreted mode tag, for flexibility reasons best implement 'static' within 'mode' selection so we have room to add the ipv6 ones ( https://github.com/opnsense/core/issues/8329)
For ipv4 there only appears to be a static mode type, ipv6 will extend the options. If we don't want to risk needing a checkbox for each of them, it's better to implement this as a mode dropdown.
2025-03-03 11:44:38 +01:00
Monviech
2c3482e774
interface/vip: Adjust help text for nosync option for https://github.com/opnsense/core/issues/8387, due to fix of behavior in 03f96eb008 (#8392) 2025-03-03 10:58:59 +01:00
Stephan de Wit
d08addc25c
Captive Portal: migrate to pf (#8368)
* Captive Portal: WIP for migration to pf (https://github.com/opnsense/core/issues/8326)

Captive Portal: cleanup references to ipfw

Captive Portal: move accounting deletion to get action, update references and descriptions

Captive Portal: remove note

Captive Portal: move accounting to pf match rules

Captive Portal: cleanup and shorten code

Captive Portal: parser issue after refactor

Captive Portal: update logo in default login page

* Captive Portal: internal alias should not be editable

* Captive Portal: move to periodic accounting sync

* Captive Portal: update lighttpd zone config

* Captive Portal: ether rules for accounting

* Captive Portal: safe accounting fetch

* Captive Portal: move counter calculation to bgprocess

* Captive Portal: remove nested anchors, match anchors on interfaces as well

* Captive Portal: move service logic to captiveportal.inc

* Captive Portal: leftover test statement

* Captive Portal: properly initialize accounting result

* Captive Portal: cleanup sql

* Captive Portal: Implement backend requirements for RFC 8908

While here, the zoneid is provided to the client, even though there
there is no need to do so. Instead let lighttpd forward the
request with an added header containing the zoneid of the client

* Captive Portal: review feedback

* Captive Portal: from_not case
2025-03-03 10:48:57 +01:00
Ad Schellevis
03f96eb008 Interfaces: Virtual IPs / xmlrpc - skip nosync processing on vips, for https://github.com/opnsense/core/issues/8387 2025-03-02 17:05:33 +01:00