OPNSense/core c73954dsrc/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Remove check for IPv6, always add client_id to array.
DeltaFile
+1-10src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+1-101 files

OPNSense/core 1450d95src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes HostnameField.php

mvc: HostnameField - deny whitespaces and slashes, closes https://github.com/opnsense/core/issues/8733

ref: https://bugs.php.net/bug.php?id=77331
DeltaFile
+1-1src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/HostnameField.php
+1-11 files

OPNSense/core 5f9fcabsrc/etc/inc/plugins.inc.d webgui.inc, src/etc/rc.subr.d var

webui: "non root" user mode. closes https://github.com/opnsense/core/issues/8521

Allow the webui to run as wwwonly and move related (temp) files to their own directories so we limit the choice of mangling rights.

When trying to transition back from wwwonly to root, require a file (/var/run/www_non_root) to be removed via the console as an extra barrier.

When captive portal is used, the api dispatcher is forced to use wwwonly in all situations as the number of endpoints used is small and easy to validate (no legacy impact)
DeltaFile
+57-0src/opnsense/mvc/app/library/OPNsense/System/Status/RootLockStatus.php
+19-5src/etc/inc/plugins.inc.d/webgui.inc
+10-10src/www/crash_reporter.php
+18-0src/www/system_advanced_admin.php
+11-5src/etc/rc.subr.d/var
+3-1src/opnsense/service/templates/OPNsense/Captiveportal/lighttpd-api-dispatcher.conf
+118-214 files not shown
+122-2310 files

OPNSense/core 196943esrc/opnsense/mvc/app/models/OPNsense/Base BaseModel.php

Firewall: Aliases - minor regression in https://github.com/opnsense/core/issues/8654, temp directory reference might miss a trailing slash
DeltaFile
+1-1src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php
+1-11 files

OPNSense/core fbc27ebsrc/opnsense/service/templates/OPNsense/Dnsmasq dnsmasq.conf

dnsmasq: Also handle the pure wildcard host + IP address combination with no domain specified.
DeltaFile
+7-0src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf
+7-01 files

OPNSense/core 0c7b662src/etc/inc/plugins.inc.d webgui.inc, src/etc/rc.subr.d var

webui: "non root" user mode. (https://github.com/opnsense/core/issues/8521)

Allow the webui to run as wwwonly and move related (temp) files to their own directories so we limit the choice of mangling rights.

When trying to transition back from wwwonly to root, require a file (/var/run/www_non_root) to be removed via the console as an extra barrier.

When captive portal is used, the api dispatcher is forced to use wwwonly in all situations as the number of endpoints used is small and easy to validate (no legacy impact)
DeltaFile
+57-0src/opnsense/mvc/app/library/OPNsense/System/Status/RootLockStatus.php
+19-5src/etc/inc/plugins.inc.d/webgui.inc
+10-10src/www/crash_reporter.php
+18-0src/www/system_advanced_admin.php
+11-5src/etc/rc.subr.d/var
+3-1src/opnsense/service/templates/OPNsense/Captiveportal/lighttpd-api-dispatcher.conf
+118-214 files not shown
+122-2310 files

OPNSense/core 3b95c9fsrc/etc/inc/plugins.inc.d dnsmasq.inc, src/opnsense/mvc/app/models/OPNsense/Dnsmasq Dnsmasq.php

dnsmasq: Fix wildcard host handling
DeltaFile
+17-0src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf
+6-0src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.php
+2-0src/etc/inc/plugins.inc.d/dnsmasq.inc
+25-03 files

OPNSense/core 4381fe4src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms dialogHostOverride.xml, src/opnsense/mvc/app/models/OPNsense/Dnsmasq Dnsmasq.xml

dnsmasq: Add checkbox to dialogHostOverride that can set domains as local (#8730)

Couple it with the dhcp-range domain dataset to ensure a unique dataset for all local domains.

This enables users to set domains as local in classic host overrides, if they want dnsmasq to handle this domain exclusively.

This should give flexibility for almost all DNS forwarding scenarios, even if DHCP is not used at all.
DeltaFile
+19-9src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf
+10-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/dialogHostOverride.xml
+1-0src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml
+30-93 files

OPNSense/core 17326d8src/etc/inc/plugins.inc.d dnsmasq.inc, src/opnsense/mvc/app/models/OPNsense/Dnsmasq Dnsmasq.php Dnsmasq.xml

dnsmasq: Allow either empty IP or empty hostname for dhcp-host entries. (#8713)

* dnsmasq: Allow either empty IP or empty hostname for dhcp-host entries.

* Simplify previous

* Update src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf

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

* Update src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.php

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

* Update src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.php

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

* dnsmasq: Use array_filter to remove empty strings, use else statement for host overrides

    [5 lines not shown]
DeltaFile
+15-13src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.php
+5-3src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf
+1-1src/etc/inc/plugins.inc.d/dnsmasq.inc
+0-1src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml
+21-184 files

OPNSense/core b04db17src/opnsense/mvc/app/controllers/OPNsense/Base ApiMutableServiceControllerBase.php, src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api ServiceController.php

Services: Dnsmasq DNS & DHCP - reload filter on service reload. closes https://github.com/opnsense/core/issues/8701

Add invokeFirewallReload() hook in ApiMutableServiceControllerBase similar to the interface registration one and start using it in dnsmasq.
DeltaFile
+13-0src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableServiceControllerBase.php
+5-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/ServiceController.php
+18-02 files

OPNSense/core 3d4b18dsrc/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms dialogHostOverride.xml, src/opnsense/mvc/app/models/OPNsense/Dnsmasq Dnsmasq.xml

dnsmasq: Add checkbox to hosts that can set domains as local. Couple it with the dhcp-range domain set to ensure a unique set for all local domains. This enables users to set domains as local in classic host overrides, if they want dnsmasq to handle this domain exclusively.
DeltaFile
+19-9src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf
+10-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/dialogHostOverride.xml
+1-0src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml
+30-93 files

OPNSense/core e796830src/opnsense/mvc/app/controllers/OPNsense/Trust/Api CertController.php

trust: check private key matches provided certificate data
DeltaFile
+3-2src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CertController.php
+3-21 files

OPNSense/core 6672a78src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

Unset unset
DeltaFile
+0-1src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+0-11 files

OPNSense/core 5d24c24. plist, src/etc rc.ipfw.post rc.ipfw.postload

ipfw: properly synchronize load order (#8728)

DeltaFile
+98-0src/opnsense/scripts/shaper/sync_fw_hooks.py
+39-0src/etc/rc.ipfw.post
+0-32src/etc/rc.ipfw.postload
+3-8src/etc/rc.ipfw
+2-1plist
+1-1src/opnsense/service/conf/actions.d/actions_ipfw.conf
+143-426 files

OPNSense/core 93c50d2. plist, src/etc rc.ipfw.post rc.ipfw.postload

ipfw: properly synchronize load order
DeltaFile
+98-0src/opnsense/scripts/shaper/sync_fw_hooks.py
+39-0src/etc/rc.ipfw.post
+0-32src/etc/rc.ipfw.postload
+3-8src/etc/rc.ipfw
+2-1plist
+1-1src/opnsense/service/conf/actions.d/actions_ipfw.conf
+143-426 files

OPNSense/core 86eed25src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Simplify controller, only track if IPv6 address exists before adding client_id to reservedKeys array. All hwaddr for IPv4 will be added regardless of if an IPv4 address exists, this is also in line with the expectation that a host can be created that only has a mac address and hostname (and no IP address) which is also a valid combination in dnsmasq.
DeltaFile
+13-26src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+13-261 files

OPNSense/core aca9079src/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt settings.volt

dnsmasq: Show a Search Reservation button for static leases that uses the built in initialSearchPhrase capabilities of the bootgrid to search the hwaddr for ipv6 leases and duid for ipv6 leases. Fix the initial hash handling of the settings volt template.
DeltaFile
+24-12src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+7-4src/opnsense/mvc/app/views/OPNsense/Dnsmasq/settings.volt
+31-162 files

OPNSense/core 9569b83src/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt

dnsmasq: Add formatter for reservation row to improve UX. As just boolean, it might indicate that a dynamic lease is bad, and a static lease is good. With this, we say static and dynamic literally, which creates less psychological stress
DeltaFile
+6-1src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+6-11 files

OPNSense/core d3518c9src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Skip host overrides early as they do not matter in the scope of dhcp reservations
DeltaFile
+4-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+4-01 files

OPNSense/core 7fc3eacsrc/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php, src/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt

dnsmasq: Improve logic to correctly track ipv6 and ipv6 reservations based on a combination of hwaddr and client_id with ip address family. Only pass either client_id or hwaddr in the link when creating a reservation based on same criteria. This ensures that in /most/ cases the frontend will show the correct information.
DeltaFile
+31-9src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+12-9src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+43-182 files

OPNSense/core ac689e0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php, src/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt

dnsmasq: Expose reservation status as row for more transparency
DeltaFile
+2-1src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+1-1src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+3-22 files

OPNSense/core b31c4d4src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Track is_reserved by hwaddr or client_id
DeltaFile
+13-7src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+13-71 files

OPNSense/core 3c01597src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php, src/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt

dnsmasq: Track which hosts are a dhcp reservation via their IP and hide the command button
DeltaFile
+15-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+6-1src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+21-12 files

OPNSense/core e182ddcsrc/opnsense/mvc/app/views/OPNsense/Dnsmasq leases.volt

dnsmasq: Add command to leases that calls the host dialog with a prepended URL hash
DeltaFile
+19-0src/opnsense/mvc/app/views/OPNsense/Dnsmasq/leases.volt
+19-01 files

OPNSense/core 74406d1src/opnsense/mvc/app/views/OPNsense/Dnsmasq settings.volt

dnsmasq: Add url hash event handler to prefill host dialog with parameters needed for a dhcp reservation
DeltaFile
+22-0src/opnsense/mvc/app/views/OPNsense/Dnsmasq/settings.volt
+22-01 files

OPNSense/core 5018fc8src/etc/inc filter.lib.inc

Firewall: Settings: Advanced / force gateway - Exclude interfaces with local links only when generating these rules, for https://github.com/opnsense/core/issues/8724

The intention of "force gateway" is to stick global address communication to the proper return path, but when there's no global address available, the generated rules may match traffic from other interfaces using the same link-local address.
Ideally, for ipv6, the "from" selector should match all addresses excluding link-local, but that would probably require a larger change (I couldn't find a simple alternative in pf.conf's manual) or installing additional non-quick rules matching the link-local space.
When there is a GUA, we have seen no issues with the current rule, which looks like:

pass out route-to ( pppoeX xxx:xxx:xxx::x) from {(pppoeX)} to {!(pppoeX:network)} keep state allow-opts label "" # let out anything from firewall host itself (force gw)
DeltaFile
+6-1src/etc/inc/filter.lib.inc
+6-11 files

OPNSense/core 242cc52src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Embedd searchLeaseAction into searchAction
DeltaFile
+2-10src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+2-101 files

OPNSense/core ed15729src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php

dnsmasq: Add API endpoints for searchLease and deleteLease
DeltaFile
+24-0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+24-01 files

OPNSense/core 92439c0src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api LeasesController.php, src/opnsense/service/conf/actions.d actions_dnsmasq.conf

dnsmasq: Wire the new commands to configd and slightly adjust controller to list all leases
DeltaFile
+7-1src/opnsense/service/conf/actions.d/actions_dnsmasq.conf
+1-1src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/Api/LeasesController.php
+8-22 files

OPNSense/core 11ba688src/opnsense/scripts/dhcp get_dnsmasq_leases.py

dnsmasq: Extend get_dnsmasq_leases.py, implement argparse to either return all leases, or a single lease, and allow the same to delete a single lease, or all leases.
DeltaFile
+52-6src/opnsense/scripts/dhcp/get_dnsmasq_leases.py
+52-61 files