14578 Commits

Author SHA1 Message Date
Franco Fichtner
c40fc4d44d unbound: cache dump is also part of stop duty 2022-10-20 12:45:23 +02:00
Franco Fichtner
208db02afa unbound: wait for lock to release before stopping #6028
This could under the worst case cause the system to hang forever,
but for the time being in development it would be better to find
the issue than glossing over with a -w 30 or so...
2022-10-20 11:28:09 +02:00
Franco Fichtner
5899fca4bb dnsmasq: use service_log() #6099 2022-10-20 11:11:14 +02:00
Franco Fichtner
867766b154 rrd: use service_log() #6099 2022-10-20 11:08:00 +02:00
Franco Fichtner
e556d48577 webgui: use service_log() 2022-10-20 10:59:09 +02:00
Franco Fichtner
8f5bd0d36e unbound: stop seems to flip this on its head
Restructure again, not really knowing why 61c6bfa6be4d07df was done.
There is no reference to it, but it might have to do with blocklist
behaviour...
2022-10-20 10:27:16 +02:00
Franco Fichtner
45ebdd5320 unbound: repair stop/generate order and style cleanups 2022-10-20 10:18:51 +02:00
Franco Fichtner
1388f28006 unbound: make start script never fail early 2022-10-20 09:45:53 +02:00
Ad Schellevis
ea2337b6d1 Services: Unbound DNS - minor start/stop changes
simplify previous and make stop behaviour consistent for unbound_configure_do
2022-10-20 09:36:03 +02:00
Ad Schellevis
c20fd9a47a Services: Unbound DNS - minor start/stop changes
o make sure we are not going to exit the start script if rm fails for whatever reason
o add stop action which stops the service and unmounts volumes mounted by start, the current state only kills unbounds primary pid (without optional dhcp integration or mountpoints)
2022-10-20 09:08:13 +02:00
Ad Schellevis
d01df31304 Firewall: Diagnostics: Aliases - Minor sorting bug in aliases list, natural sorting not being applied. closes https://github.com/opnsense/core/issues/6090 2022-10-19 21:30:26 +02:00
Franco Fichtner
2671d49ff3 system: write a boot log using the embedded configuration messages 2022-10-19 21:01:42 +02:00
Ad Schellevis
2b77e049ff MVC / default template - remove duplicate JS import 2022-10-19 20:46:46 +02:00
Ad Schellevis
8827c390ea MVC / default template - missing comments in previous 2022-10-19 20:22:49 +02:00
Ad Schellevis
fe2f96d267 MVC / default template - move javascript and css imports to base controller so derivatives are able to extend the list easily (and still use our standard default.volt) 2022-10-19 17:25:13 +02:00
Ad Schellevis
3d1cc3c1e2 Firewall: Shaper - Allow the use of "dynamic" interface types, like enc0 and ipsecXXX. 2022-10-19 11:43:15 +02:00
Ad Schellevis
528474372b MVC - Boorgrid / form control minor additions.
o When row-id isn't specified on a "edit" target, use an empty string
o On form <input> tags support the "type_formatter" attribute, which defines the function to call in order to convert data before sending it to the server. This eases type conversions when needed (e.g. '1' --> 1 using a wrapper which uses parseInt())
o Add support for list type <select> content which offers a sorted list of key,value,selected attributes in addition to the current named array store.

Full example to offer properly typed integers to a backend:

    function form_format_integer(payload)
    {
        if (/^[+-]?[0-9]*$/.test(payload)) {
            return  parseInt(payload);
        } else {
            return payload;
        }
    }

<input type="text" type_formatter="form_format_integer" id="myform.quantity">

Sample data for list type <select> options:

"status":[{"key":null,"value":"-","selected":0},{"key":"PEN","value":"Pending","selected":1}]
2022-10-18 21:49:44 +02:00
Ad Schellevis
ac73ab9021 MVC - prevent UserExceptions to end up in the crash reporter. closes https://github.com/opnsense/core/issues/6098 2022-10-18 21:39:40 +02:00
Franco Fichtner
fcbceadb76 Scripts: improve license parsing for odd names 2022-10-18 14:19:26 +02:00
Daniel Aleksandersen
fcbf3b15d8
Unbound: Clarify “Verify CN” option field (#5897) 2022-10-18 13:51:11 +02:00
Daniel Aleksandersen
3654c94572
Change system domain name suggestions (#5898)
* Don't suggest using unreserved top-level domains.
* Use the reserved example.com|net domains for other examples.
* Encourage adoption of the special-purpose internal/site home.arpa (RFC 8375) domain.
2022-10-18 13:48:41 +02:00
Johnny S. Lee
ab9eb70d25 dnsmasq: DNSSEC: Remove expired root trust anchor
See: https://data.iana.org/root-anchors/root-anchors.xml
2022-10-18 13:09:59 +02:00
Franco Fichtner
d4ba371139 openvpn: ifctl does pfctl internally 2022-10-18 12:26:13 +02:00
Franco Fichtner
bb9abf86a4 firewall: remove ip_change_kill_states mechanic; closes #6092 2022-10-17 13:48:42 +02:00
Franco Fichtner
dfadc8190e console: store UUID for VLAN device #6086 2022-10-17 12:07:12 +02:00
Franco Fichtner
5d62b395d1 unbound: fix bail on python glue chown (read-only error) 2022-10-17 11:04:51 +02:00
Ad Schellevis
3edd472aaa Services: Unbound DNS - remove 127/8 from private-address block when rebind protection is enabled as advised by unbound (https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html#term-private-address-IP-address-or-subnet) and make the default items configurable via the advanced page. closes https://github.com/opnsense/core/issues/5871 2022-10-16 18:31:02 +02:00
Ad Schellevis
926a4c8e68 MVC : UIBootgrid - enforce json request data (set content and data type) instead of form encoded data.
o fixes some bugs in default form handling (UIModelGrid), get() vs getPost()
o when properly encoded, sort is an empty array in ApiControllerBase->searchRecordsetBase()
2022-10-15 20:22:33 +02:00
Stephan de Wit
d14ffae466
unbound: rework DNSBL implementation to python module (#6083)
Replaces the current blocklist implementation to use python instead of relying on unbound-control. The latter had the drawback of a very long execution time to administrate the local-data entries both locally and in Unbound. The memory footprint was also considerably larger due to unbound internals, while the python module keeps it all in memory in a simple dictionary - reducing the total amount of memory consumption by more than a factor of 10. A drawback is a potential decrease in performance of ~15%, although most setups shouldn't be affected by this as most hardware which is capable of running this should be scaled towards its intended use.

The option of returning NXDOMAIN has also been added (fixes #6027), which in this implementation is a lot easier than what we would have to do if local-data were to be used.
2022-10-14 17:02:23 +02:00
Franco Fichtner
e2c182bd4b system: wait 1 second for configd socket to become available; closes #6012 2022-10-14 16:55:03 +02:00
Franco Fichtner
47bef28ae3 unbound: error while opening DoT page
This is due to e5bace2969c, but since we view the overview page here
I'm not even sure the decision about forward/dot can be correct since
there will be no POST data about 'dot' or the type.

[14-Oct-2022 08:28:20 Europe/Berlin] Exception: Error at /usr/local/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/SettingsController.php:67 - Trying to access array offset on value of type null (errno=2) in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:159
Stack trace:
2022-10-14 08:48:48 +02:00
Franco Fichtner
13391b3c7c ui: fix previous 2022-10-14 08:35:45 +02:00
Ad Schellevis
41911f8a85 MVC : UIBootgrid - various improvements
o minor style fixes and more strict json handling
o easier handle to add commands using a commands named array

$().UIBootgrid({
   ....
   commands: {
      myaction: {
         method: function(){};
         classname: 'fa fa-fw fa-remove',
         sequence: 10
      },
      copy: {
         classname: undefined // hide button
      }
   }
});
2022-10-13 20:52:37 +02:00
Ad Schellevis
d854e59771 VPN / IPsec - migrate ipsec.conf to swanctl.conf (https://github.com/opnsense/core/pull/6076).
remove legacy files unconditionally as pkg creates the directory structure anyway it seems.

discussed with @fichtner
2022-10-13 16:00:06 +02:00
Ad Schellevis
c730ce2023 Firewall: Log Files: Live View - possible race condition when changing limit, make sure the fetch before the change isn't populated into the grid. 2022-10-13 15:56:36 +02:00
Franco Fichtner
edd0d25423 firewall: off-by-one in regex for target port range parse
PR: https://forum.opnsense.org/index.php?topic=30652.0
2022-10-13 11:03:33 +02:00
Franco Fichtner
8d50193182 firmware: remove faulty changelog to force a clean refetch 2022-10-12 10:01:45 +02:00
Franco Fichtner
edb286cf6a mvc: translate base field error
Without gettext() wrapping we never produce a string in the
translation for it.  It gets passed to gettext() twice then
but that is matters not as the target string cannot be translated
again when called a second time.
2022-10-10 20:23:53 +02:00
Franco Fichtner
f70b71ce12 ipsec: style sweep 2022-10-10 20:23:26 +02:00
Ad Schellevis
0adf843ff6
VPN / IPsec - migrate ipsec.conf to swanctl.conf (#6076)
* VPN/IPsec - work in progress refactoring ipsec.conf to swanctl.conf for https://github.com/opnsense/core/issues/5636

Wrap the following blocks in functions:

o generation of strongswan.conf
o write and cleanup IPsec's CA database
o write certificates used by IPsec
o write RSA Key Pairs
o construct ipsec.secrets for swanctl, combining different sources, phase1 PSK's, certificates, keypairs
o replace VPN: IPsec: Lease Status with new mvc version that uses swanctl underneath

Remap ipsec.conf to swanctl.conf attributes using https://wiki.strongswan.org/projects/strongswan/wiki/Fromipsecconf

Remove lifetime defaults from phase 1 and 2 so new connections will use Strongswan's defaults and move the option in phase above Margintime/Rekeyfuzz as these combined are being migrated (see margintime in Fromipsecconf doc).

Restructure used path directives so we can use the default structure as descried in https://docs.strongswan.org/docs/5.9/swanctl/swanctlDir.html and installed via ports.

IPsec status overview needs a small fix as well (passthrough network seems to be returned by vici, but doesn't contain a class (which crashes list_status.py).)

While here, also remove some php warnings.
2022-10-10 19:52:36 +02:00
Ad Schellevis
385d182798 Firewall: Aliases - support Maxmind's unclassified EU (region, country unknown) as country selector EU
6255148,en,EU,Europe,,,0

Although the same applies for Asia, we can't use AS as country code here, so we do have to skip this for now until we find a better alternative.

6255147,en,AS,Asia,,,0

closes https://github.com/opnsense/core/issues/6063
2022-10-10 18:24:32 +02:00
Franco Fichtner
6a2190695d ipsec: ACL fix for sessions users #6067 2022-10-09 09:28:07 +02:00
Ad Schellevis
6f53ca0b22 MVC / form validation handling - when multiple messages are returned, wrap each message in a div. closes https://github.com/opnsense/core/issues/6073 2022-10-08 08:47:17 +02:00
Ad Schellevis
a31a21bd93 Interfaces: Other Types: VLAN - show attached interface on device, for https://github.com/opnsense/core/pull/6074 2022-10-07 19:55:50 +02:00
Franco Fichtner
26a0bf2337 interfaces: fix validation the way it was intended 2022-10-07 13:44:10 +02:00
Ad Schellevis
054a7ee834 Interfaces: Other Types: VLAN - setItemAction() loop variable issue, overlapping with requested node leading to faulty validation results. 2022-10-07 11:05:08 +02:00
Franco Fichtner
6798d9a438 interfaces: also fix the help text 2022-10-07 10:44:44 +02:00
Franco Fichtner
46657fcc67 interfaces: simplify and tighten the matching 2022-10-07 10:31:40 +02:00
Franco Fichtner
6f83fd8eff interfaces: tweak device name validation messages 2022-10-07 10:01:45 +02:00
Ad Schellevis
91d8b7f8bf MVC - ApiControllerBase.php / fix typo in searchRecordsetBase() 2022-10-06 22:16:28 +02:00