16201 Commits

Author SHA1 Message Date
Franco Fichtner
29db6b9ff4 ui: patch all the other spots 2024-01-03 12:06:50 +01:00
Shane Lord
27dcad8403
ui: include meta tags for standalone/full-screen on Android & iOS (#6696)
Add meta tags for Android and iOS to allow the WebUI to run in fullscreen/standalone mode on mobile browsers.
2024-01-03 12:03:24 +01:00
doktornotor
44d9a11bb8
Add word break in interface_statistics.widget.php (#7106)
* Add word break in interface_statistics.widget.php

* Add word break to interface descriptions as well
2024-01-03 11:04:01 +01:00
Franco Fichtner
cd3fa5a268 firewall: redirect interface seelctor for #6158 2024-01-03 10:55:59 +01:00
Franco Fichtner
600b5bf84e firewall: binat never supported redirect target alias #6158
There were error(s) loading the rules: /tmp/rules.debug:109: invalid use
of table <__lan_network> as the redirect address of a binat rule - The line
in question reads [109]: binat on igb1 inet6 from ff00:: -> $__lan_network

That also means aliases are useless here and we need to have an interface
selector anyway.

Also pconfig_to_addr() doesn't store /128 which may cause an error in the
prefix translation at the moment.
2024-01-02 23:23:56 +01:00
Ad Schellevis
2ab6a8f188 mvc/bootgrid - increase standard search delay from 250ms to 1sec to prevent excessive command executions. closes https://github.com/opnsense/core/issues/7109 2024-01-02 15:07:30 +01:00
Franco Fichtner
6ce648d507 pkg: happy new year! 2024-01-02 10:17:35 +01:00
Franco Fichtner
d820d74a45 openvpn: style sweep 2024-01-02 08:09:27 +01:00
Ad Schellevis
2ef916de0c Services: ISC DHCPv6: Leases - regression in 5b0b4139b6 (off by 1). https://github.com/opnsense/core/issues/7107 2024-01-01 19:01:00 +01:00
Ad Schellevis
1fe104dce6 Wireguard / OpenVPN [client] - handle disabled carp vhid's by initialising to 'DISABLED' (same as 9ff64a3e41) 2023-12-31 13:34:55 +01:00
Ad Schellevis
5b0b4139b6 Services: ISC DHCPv6: Leases - cleanup get_lease6 script and fix parsing issue, closes https://github.com/opnsense/core/issues/7107 2023-12-30 22:54:50 +01:00
Ad Schellevis
c321f15e0f VPN: OpenVPN: Instances - add validation for >29 netmasks as specified in https://github.com/OpenVPN/openvpn/blob/master/src/openvpn/helper.c , excluding the p2p/net30 with tun introduced in 2758f9f649 2023-12-30 11:32:22 +01:00
Ad Schellevis
4c097be8ea Firewall: Aliases - BGP ASN + Geoip validate if target contains at least some bytes (1k) before assuming timestamp is correct. closes https://github.com/opnsense/core/issues/7075 2023-12-30 10:47:20 +01:00
Ad Schellevis
2758f9f649 VPN: OpenVPN: Instances - add workaround for net30/p2p smaller than /29 networks, this was being used in the legacy code but left out in the mvc version. At a first glance it looks like it still possible to support /30 and /31 networks although this wasn't tested yet. We should likely also add a validation to prevent > /29 tunnels from being added.
Currently when specifying a /30 network the server refuses to start anyway, but before enforcing using a validation, let's try if there are still options possible for these networks to be used given the options in the new instances intreface.
2023-12-29 16:01:08 +01:00
Ad Schellevis
d7a858de34 Auth/vouchers - fix integer validation, closes https://github.com/opnsense/core/issues/7105 2023-12-28 13:39:53 +01:00
Ad Schellevis
14f843bb2f System: Trust: Revocation - exclude ocsp signing certs. 2023-12-28 13:20:17 +01:00
Amy Nagle
f314a95a3b
Unbound / Blocklists: Replace JustDomains with Firebog (#7103) 2023-12-28 10:05:05 +01:00
Ad Schellevis
481859b412 System: Trust : Authorities - hide ocsp signing certificates from (mvc) ca selectors to avoid confusion. 2023-12-26 12:49:32 +01:00
Ad Schellevis
7a466c79c9 mvc - set a default data-size for increased readability (live-search is sometimes hidden)
.
2023-12-26 12:43:42 +01:00
Ad Schellevis
044b0d9ad9 Gateways: Single - change data length default from 0 to 1 to limit the chances of zero lentgh packets being dropped by intermediate devices. although the actual dpinger is 0, adding one byte shouldn't hurt and might prevent some issues. 2023-12-26 11:30:19 +01:00
Ad Schellevis
495d036d8d Interfaces: Overview - miinor cleanups for https://github.com/opnsense/core/issues/6832
o export full overview instead of ifconfig output, for debugging purposes its better to have the full picture
o remove json_encode() from getInterfaceAction() and let the framework do its usual thing...
2023-12-25 14:26:43 +01:00
Ad Schellevis
4d495ea6cc Interfaces: Overview - remove legacy version and its related functions and scripts. closes https://github.com/opnsense/core/issues/6832 2023-12-25 14:03:22 +01:00
Ad Schellevis
28b0ba4812 Interfaces: Overview - minor regression, array_filter() preserves keys which may cause returned values to become dictionaries in stead of lists. 2023-12-24 18:41:20 +01:00
Ad Schellevis
c9d191f10d Firewall: Shaper - missing physical_interface(), looks like a regression in a99f2600a5 , closes https://github.com/opnsense/core/issues/7096 2023-12-22 08:22:12 +01:00
Ad Schellevis
ff75146f73 System: Trust - add uniform ocsp_validate() function to check the validity of a certificate by serial for a given CA file.
This function returns an array containing an attribute "pass" explaining if we're passed the test and the corresponing ocsp result ("result"), optionally if returns the first element of the ocsp command which appears to be the cert verify output (e.g. "Response verify OK")

A certificate can be passed when :

A] no OCSP - URI is configured for the offered CA
B] when /usr/bin/openssl ocsp returns a non 0 exit code
2023-12-21 16:56:56 +01:00
Ad Schellevis
2e5f3ba214 System: Trust - cleanup and refactor authorities and certificates part 2. remove ca_inter_create() and integrate in ca_create() as both are quite similar one just has a parent and the other hasn't. Also fix the ocsp certificate type as this one depends on a parent as well (equal to an intermediate). 2023-12-21 16:44:06 +01:00
Franco Fichtner
add38843fb system: zero-fill the resulting hash to 8 characters
This is what certctl does and it was rightfully flagged as
"missing files" in the health audit, e.g.

/etc/ssl/blacklisted/80911ac.0 (wrong)

vs.

/etc/ssl/blacklisted/080911ac.0 (correct)
2023-12-21 08:24:30 +01:00
Franco Fichtner
e44ad35ebe system: adjust implied checkbox values to expected model values 2023-12-20 10:24:04 +01:00
Franco Fichtner
dd92fe4ed5 dhcp: do not clobber $range_to / $range_from with the legacy test merge #7046
The merge is used as a test if a prefix is set at all (the legacy input
required a "prefix" but it was actually a suffix and verified as such)
but now that we prevent merging without a leading "::" the final compress
moves the compressed format from the front to the end because that sequence
is longer but the next merge doesn't like that.  Do the test merge without
storing the result as we do not need it anyway.
2023-12-19 22:47:38 +01:00
Ad Schellevis
5cf738f6e7 System: Trust - cleanup and refactor authorities and certificates, closes https://github.com/opnsense/core/issues/7088
This commit is a bit of an overhaul to add some functionality to test OCSP for https://github.com/opnsense/core/pull/7082.

o add "authorityInfoAccess" extention to add OCSP uri in authorities and certificates.
o remove some code duplication in both legacy files, requires 52fe119e0c
o trust/authorities: prevent certificate deletion when dropping a ca
o trust/authorities: add info button to check the CA contents, helps debugging issues
o trust/authorities: add camethod "Create an OCSP signing certificate" to create an ocsp signing cert
o trust/authorities: prefil dn fields when changing CA for ocsp and intermediate certs
2023-12-19 21:41:04 +01:00
Franco Fichtner
192ef7f6da mvc: copyright header style and copy/paste issues 2023-12-19 15:41:00 +01:00
Franco Fichtner
8226c84a2f web proxy: move all files to plugin #7030 2023-12-19 15:11:20 +01:00
Ad Schellevis
52fe119e0c ui/legacy - support key/value combinations for error messages in do_input_validation() while keeping the old behavior ($reqdfieldsn contains only descriptions for required fields) intact. 2023-12-19 12:06:32 +01:00
Franco Fichtner
db8317cfaf firmware: geez, deal with injection of ".pkgsave" files
I don't really know what the plan is here other than breaking
existing pluggable directories and wasting space.

We do clean this up but we can't stop and clean up all becase
we can't trust pkg doing the right thing right away?
2023-12-19 11:37:05 +01:00
Franco Fichtner
ebd5696f1c firmware: lock down FreeBSD repo and fix minor annoyance 2023-12-19 10:51:25 +01:00
Franco Fichtner
a695054644 mvc: copyright year seems sus 2023-12-19 10:39:13 +01:00
Franco Fichtner
c770e7c953 firmware: make firmware scripts pluggable
For testing convenience you can run the scripts separately and
add standard output and only standard error will be reported
once included in system_firmware_configure() or

    # pluginctl firmware_reload
2023-12-19 10:38:36 +01:00
Franco Fichtner
c2f7998c70 dhcp: allow saving with invalid range when IPv4 server is disabled; closes #7085
In this post-valdation after passing validation we should make sure to prevent
validtion if not enabled.  Contrary to IPv6 the range from/to is mandatory but
doesn't always match especially when changing the IP range or switching interface
assignments.
2023-12-19 09:21:31 +01:00
Franco Fichtner
927c37c135 firmware: exclude overridable files from audit
They will also be removed from update sets.
2023-12-19 08:57:11 +01:00
Ad Schellevis
1cac50b4ac Firewall/Alias - fix traceback (wrong return type on empty response)
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/filter/update_tables.py", line 85, in <module>
    alias_content = alias.cached() if use_cached(alias_name) else alias.resolve()
  File "/usr/local/opnsense/scripts/filter/lib/alias/__init__.py", line 180, in resolve
    for address in address_parser.iter_addresses(item):
  File "/usr/local/opnsense/scripts/filter/lib/alias/auth.py", line 71, in iter_addresses
    self._update()
  File "/usr/local/opnsense/scripts/filter/lib/alias/auth.py", line 53, in _update
    for server in ovpn_status.get('server', None):
TypeError: 'NoneType' object is not iterable
2023-12-18 15:43:08 +01:00
Ad Schellevis
089612dd5c auth - minor stylefix in configd configuration. 2023-12-18 15:14:26 +01:00
Franco Fichtner
f6d8a2d834 firmware: TLS 1.3 works now on our mirrors so limit to this one 2023-12-18 11:47:01 +01:00
doktornotor
4e4f28bf09 Make the GUI interfaces selection actually honored by ntpd
Without the "interface ignore wildcard" directive, the service still listens on wildcard.
2023-12-18 10:15:35 +01:00
Franco Fichtner
35548cee4f src: style sweep 2023-12-14 21:24:56 +01:00
Franco Fichtner
60b262bcaf pkg: fix plist 2023-12-14 21:24:45 +01:00
Ad Schellevis
a1b0dd8071 configd - support optional configd config additions. This can for example be used to enforce a custom proxy or overwrite default settings specified in configd.conf
Additions may be written inside opnsense/service/conf/configd.conf.d/ using a name ending in .conf

Another use-case it to "lock-down" configd access by default using a newly default action, e.g.:

[action_defaults]
allowed_groups = wheel
2023-12-14 11:25:23 +01:00
Ad Schellevis
3e49c338b2 Core/Firmware - add audit messages for firmware actions. 2023-12-14 11:05:25 +01:00
Franco Fichtner
80b24b547b interfaces: change default port to a hint in latest VXLAN addition 2023-12-14 08:34:08 +01:00
Ad Schellevis
72dfc48866 core / ManuSystem - obey group sequence when specified for interfaces (moving them to top in the requested order). When no sequence is specified ordering remains unchanged. 2023-12-13 20:51:33 +01:00
Ad Schellevis
dea5f295ac Interfaces: Other Types: VXLAN - add optional local/remote port. closes https://github.com/opnsense/core/issues/7047 2023-12-13 19:39:19 +01:00