16830 Commits

Author SHA1 Message Date
Stephan de Wit
3c2ad5d6b3 ipsec: add DH Group 2 for basic Azure VPN gateway compatibility
While insecure, this is the best possible proposal combination out
of the list provided by Microsoft: https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices#ike-phase-1-main-mode-parameters
2025-04-25 09:43:59 +02:00
Franco Fichtner
2a935b7afa
system: states kill checkbox clarification (#8578)
Co-authored-by: Stephan de Wit <stephan.de.wit@deciso.com>
2025-04-24 16:27:37 +02:00
Ad Schellevis
727967ed6d
Services: ISC DHCPv6 - show "tracking" interfaces when enabled and offer an explicit disable (#8576)
* Services: ISC DHCPv6 - show "tracking" interfaces when enabled an offer an explicit disable option for the service in question so someone could use dnsmasq or kea instead.

To avoid large changes, we opt for a  minimal set here.
In services_dhcpv6.php, we add a separate form and handler in case tracking (without dhcpd6track6allowoverride) is set, which either flushes the unused isc-dhcpv6 server configuration when enabled (default) or writes a small section only including ['enabled' => -1].
For visibility, we show the calculated range as would be set by dhcpd_dhcp6_configure() when tracking is used.

The backend code then double checks the services which er explicitly disabled (-1) and skip processing for these (not enabled).

In order to make people aware of the fact that an isc-dhcpv6 server could be running, make sure the menu system also reflects reality.

Since router advertisements are stored within the same container and will need a toggle as well, keep the value of ramode so we have a way to intervene in a similar way as for dhcpv6.
One small side affect of this commit is that it will show "Services: Router Advertisements" for the tracking interface, which we need to implement later.

One of the building blocks for: https://github.com/opnsense/core/issues/8528

* Update src/www/services_dhcpv6.php

Co-authored-by: Franco Fichtner <franco@opnsense.org>

* Services: Router Advertisements: show "tracking" interfaces when enabled an offer an explicit disable option for the service in question so someone could use dnsmasq instead.

More or less the same construction as added for dhcpv6, using the ramode field to switch between types (disabled or assisted).

While here, also bugfix fieldname in services_dhcpv6.php

also for https://github.com/opnsense/core/issues/8528

---------

Co-authored-by: Franco Fichtner <franco@opnsense.org>
2025-04-24 16:23:32 +02:00
Franco Fichtner
35f46bbb11 firewall: remove unused function...
... imported into pfSense in 2007... unused ;)

https://github.com/pfsense/pfsense/commit/615b27bc267a98e72
2025-04-24 10:49:56 +02:00
Franco Fichtner
39d5ff1a26 interfaces: allow the unused function script to find these 2025-04-24 10:05:41 +02:00
Franco Fichtner
b2a6288437 ipsec: remove two unused functions 2025-04-24 09:37:05 +02:00
Franco Fichtner
b1a84fc5b9 system: remove unused check_subnets_overlap() 2025-04-24 09:31:28 +02:00
Franco Fichtner
17134aef77 system: remove unused subnet_size() 2025-04-24 09:30:38 +02:00
Franco Fichtner
30343809e9 system: remove unused format_bytes() 2025-04-24 08:59:26 +02:00
Franco Fichtner
54629f459d system: remove unused cert_get_subject_array() 2025-04-24 08:58:13 +02:00
Franco Fichtner
51dcbcc39e config: remove unused config_restore() 2025-04-24 08:39:52 +02:00
Franco Fichtner
5aa8d206e6 interfaces: remove unused is_interface_assigned() 2025-04-24 08:16:17 +02:00
Franco Fichtner
4ce4450537 openvpn: remove is_interface_assigned() so it can be removed 2025-04-24 08:15:41 +02:00
Franco Fichtner
f31d7a8aa6 interfaces: remove is_interface_assigned() use from wlan 2025-04-24 07:48:39 +02:00
Franco Fichtner
f30f0f05a0 interafaces: reduce diff between rc.newwanip scripts a little
The goal is still to merge these eventually.  ;)
2025-04-23 11:10:04 +02:00
Franco Fichtner
f5352f841e interfaces: do group sync for IPv6 just in case 2025-04-23 10:55:31 +02:00
Franco Fichtner
f9ea24113a system: move get_country_codes() to only caller
Also cleans up the last raw use of $contribDir which neatly lands
in the file that was already modified.
2025-04-23 09:41:26 +02:00
Freddie Sackur
a819b91049
Add contribDir to app config (#8567) 2025-04-23 09:34:41 +02:00
Franco Fichtner
bdb3f73315 reporting: header style 2025-04-23 08:45:01 +02:00
Ad Schellevis
b83cc529eb Firewall: multiselect for icmptype for both legacy and icmp. closes https://github.com/opnsense/core/issues/8513 2025-04-22 21:17:52 +02:00
Ad Schellevis
bf14a0a2e3 Firewall: prevent source/destination inversion when multiple nets are selected. closes https://github.com/opnsense/core/issues/8559 2025-04-22 20:37:56 +02:00
Ad Schellevis
9c50cbfcb8
Services: Kea DHCP: Kea DHCPv6 - add new option based on v4 (#8571)
This contains roughly the same configuration items as our current isc-dhcp6 alternative, with the exception of not trying to implement dynamic ranges based on data received from dhclient6.
In terms of target audience, dynamic environments (receiving their "wan" type addressess via dhcp), should logically use dnsmasq for client configuration. Large (enterprise) setups usually are static by nature and may require prefix deligation to routers behind the primary one. In these cases Kea will be the tool of choice.

Both v4 and v6 share the same rc scripts underneath, which means reconfiguration happens per package (eventhough two services are registered).
Existing hooks for v4 have been extended with v6 data (firewall rules and staticmaps).

Advanced configurations can still opt out of config file generation and supply their own json config, same as implemented for v4.

The lease view still needs to be implemented, but that's likely a minor addition.
2025-04-22 17:43:27 +02:00
Stephan de Wit
25e5341dd4 captive portal: exclude portal table in destination (https://github.com/opnsense/core/issues/8564) 2025-04-22 15:07:13 +02:00
Ad Schellevis
7beec43db9 Services: Dnsmasq DNS & DHCP - fix validation for static ipv4, closes https://github.com/opnsense/core/issues/8568 2025-04-20 10:55:21 +02:00
Monviech
5636079c16
auth: Implement base_bootgrid_table in user, group and priv templates (#8529) 2025-04-17 11:48:13 +02:00
Franco Fichtner
302ed6b037 ipsec: fix trimming NULL values
Not sure how I managed to misconfigure this but since the
function relies on returning null make the trimming conditional.
2025-04-17 10:00:24 +02:00
Ad Schellevis
e09112ab45 System/Trust - fix scoping issue in CertificatesField causing issues for consumers of ArrayFields in migrations, closes https://github.com/opnsense/core/pull/8546 2025-04-17 09:44:45 +02:00
eopo
c53dc21190
Add field boottime to api/system/systemTime (#8557) 2025-04-16 20:03:12 +02:00
Ad Schellevis
5d0007a023 Interfaces: Diagnostics: Packet Capture - fix wrapping as suggested in https://github.com/opnsense/core/pull/8554 2025-04-16 19:58:22 +02:00
Franco Fichtner
4d20b54aa5 interfaces: make this return explict 2025-04-16 15:13:37 +02:00
Ad Schellevis
1e37f6a7fc Interfaces: Diagnostics: Packet Capture - more strict jQuery selector for "(de)select all" button. for https://github.com/opnsense/core/pull/8554 2025-04-16 15:10:24 +02:00
Stephan de Wit
27fdbd950f diagnostics: ARP: wire up refresh button 2025-04-16 14:25:57 +02:00
Monviech
e72077c376
dnsmasq: Improve interface/tag selectpicker (#8560)
* dnsmasq: Add button to quickly clear the tag/interface filter

* dnsmasq: Autofill filter selectpicker choices in add dialog
2025-04-16 13:12:09 +02:00
Franco Fichtner
045dec233a system: add logging to state kills and polish comments #8548 2025-04-16 10:34:14 +02:00
Franco Fichtner
927bda891f firewall: improve labels in pf debug setting
The level key words are easy to find in the source code, but knowing
which verbose description they belong to is difficult without pulling
up our source code as well.  Make it explicit.
2025-04-16 10:33:12 +02:00
Ad Schellevis
4f3db31351
System: Gateways - kill opposite states when a gateway "up" is triggered (#8548) 2025-04-16 09:40:36 +02:00
Ad Schellevis
6d579db491 VPN: IPsec: Mobile & Advanced Settings - copy "Split DNS name" to undocumented "25", closes https://github.com/opnsense/core/issues/8552
* https://docs.strongswan.org/docs/latest/plugins/attr.html
* https://lists.strongswan.org/pipermail/dev/2019-May/001994.html
2025-04-15 14:10:34 +02:00
Ad Schellevis
b87eba3085 Services: Intrusion Detection: Administration - template style cleanups 2025-04-15 13:31:04 +02:00
Franco Fichtner
f30c28ca79 mvc: allow referencing disabled interfaces in LinkAddressField
This prevents validation errors when interfaces are temporarily
disabled.  Other device components received similar fixes in the
past due to this "glitch" of not offering valid devices and selectpickers
would lose their correct value on save too (the field is a bit different
here but the same principle applies).
2025-04-15 12:36:04 +02:00
Franco Fichtner
25585eb6b9 interfaces: consider tracked interface's linked devices on reload #7713
When attaching a GIF tunnel to an IPv6 device it's more likely a LAN
device but that is being missed when WAN is reloaded here.  Much of the
other code still accounts for this so this merely goes with the flow
and since we only operate in IPv6 scope that is ok.
2025-04-15 11:00:54 +02:00
Ad Schellevis
6a89c8968b Services: Intrusion Detection: Administration - our fix in the reverse log reader (7446f8cbbf) caused a regression in the alert view. closes https://github.com/opnsense/core/issues/8550
It looks like this worked by accident, since we started with the wrong offset, we accidentally hit the right record.
2025-04-15 10:49:32 +02:00
Ad Schellevis
d0f745a70e Services: Captive Portal - fix display issue for pass rule when client not in zone
inverse rules unfortunately contain some mappings, which means we need to map them differently for legacy and mvc code.
2025-04-14 17:09:39 +02:00
Franco Fichtner
5ad41a236c system: typo 2025-04-14 12:39:07 +02:00
Ad Schellevis
0d6aa56527 Services: ISC DHCPv4: hide menu items when dnsmasq is enabled to improve "out of the box" experience. closes https://github.com/opnsense/core/issues/8329 2025-04-14 10:34:22 +02:00
Ad Schellevis
413f49c3ef Services: Captive Portal - configd actions should use long opts (fix regression in 7e838c6d92)
argparse needs long params too..
2025-04-14 09:47:50 +02:00
Alex Goodkind
02e511091d
DHCP6: use lease_type to key lease map in addition to iaid_duid (#8492)
* dhcp6: key lease map by type in addition to duid

* Update src/opnsense/scripts/dhcp/get_leases6.py

Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>

---------

Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>
2025-04-11 18:54:15 +02:00
Stephan de Wit
4567021437 captive portal: remove interfaces_inbound option (https://github.com/opnsense/core/issues/8326)
In the old situation, one would need explicit pf rules on top of
this feature to make this work. With the removal of IPFW,
those rules are now enough to make the same happen.
2025-04-11 09:25:06 +02:00
Franco Fichtner
d81b2eec9d dnsmasq: move default setting to where dhcp disappeared before 2025-04-11 09:15:07 +02:00
Franco Fichtner
5a2e399586 ipsec: settings page also unaccounted for
PR: https://forum.opnsense.org/index.php?topic=46595.0
2025-04-11 09:02:45 +02:00
Franco Fichtner
54fed30cf1 ipsec: fix more ACLs related to individual IPsec page use
PR: https://forum.opnsense.org/index.php?topic=46595.0
2025-04-11 08:43:31 +02:00