17235 Commits

Author SHA1 Message Date
Franco Fichtner
ecf987820d reporting: style sweep 2024-09-02 21:06:03 +02:00
Ad Schellevis
895e58ff25
Reporting / rrd - refactor existing code (#7836)
Add RRD package with a simple factory class and a basic construct to define different rrd output types we support.
This package contains the following:

* RRD/Types -- Output definitions, responsible for generating RRD structures and feeding data
* RRD/Stats -- Statistics gathering classes
* Factory -- binds types and statistics together. 

On my end on a simple test this is roughly 40% faster than running /var/db/rrd/updaterrd.sh, which makes caching of metadata (config access) less relevant.

The new script should be able to replace all existing rrd cruft and supports a debug mode to find discrepanties between defined outputs in types and collected data in stats.

```
Usage: updaterrd.php [-h] [-d]
            -d debug mode, output errors to stdout
```
2024-09-02 16:40:47 +02:00
Franco Fichtner
54ccb747cd system: handle stale "pfsyncinterfaces" and improve workflow
PR: https://forum.opnsense.org/index.php?topic=42549.0
2024-09-02 12:03:24 +02:00
Franco Fichtner
4c07de7e34 interfaces: remove deprecated "vpn" event
Everything has been converted and plugins do not ship with a
"vpn" event.  "newwanip" is similar and the plugins have been
ensured to be moved to the new one in 24.7.3 already.
2024-09-02 09:25:58 +02:00
Ad Schellevis
f29d93198d System: Trust: Certificates - map derivative field cert_type to expose purpose to the userinterface. closes https://github.com/opnsense/core/issues/7835 2024-09-02 09:18:30 +02:00
Franco Fichtner
0e2812220d interfaces: drop the unmapped events from newwanip scripts 2024-09-02 09:17:29 +02:00
Franco Fichtner
f24d93b8ea openvpn: forgot to switch to mapped event 2024-09-02 09:16:50 +02:00
Franco Fichtner
c17d021b4c interfaces: add proper validation for 6RD and 6to4
Also bring in 947e61b1a5e6fe5 done on stable and refine it further.
So it turns out these run on IPv4 but are immune to "IPv4 connectivity"
switch for better or worse.

PR: https://forum.opnsense.org/index.php?topic=42081.msg211015#msg211015
2024-09-02 09:04:30 +02:00
Ad Schellevis
7d5d2f26b5 VPN: OpenVPN: Connection Status - add username field to the grid, closes https://github.com/opnsense/core/issues/7834
Although we recommend using matching CN's and usernames, it is possible to share a certificate. Since the datafeed already contains the username, let's add the field to the grid.
2024-09-01 21:05:53 +02:00
Ad Schellevis
0227780bbe Reporting / rrd - remove non existing 3g statistics 2024-09-01 14:00:54 +02:00
Franco Fichtner
919fc15fe7 interfaces: rename this correctly, strictly part of pf(sync) 2024-09-01 10:54:46 +02:00
Franco Fichtner
ab3bf029ca interfaces: another cleanup 2024-09-01 10:51:23 +02:00
Franco Fichtner
a3400ea974 interfaces: same same 2024-09-01 10:50:01 +02:00
Franco Fichtner
82397315c0 interfaces: rename two variables for clarity 2024-08-31 13:23:36 +02:00
Ad Schellevis
8d4c1108bf Services: Intrusion Detection: Administration - reorganise settings page with headers (https://github.com/opnsense/core/pull/7775) 2024-08-31 09:33:25 +02:00
Toby Chen
ee15b216aa
IDS: Support configurating eve-log for HTTP and TLS (#7775)
Add the appropriate front end controls and backend template for setting up TLS and HTTP monitoring for Suricata's eve-log.
2024-08-31 09:32:58 +02:00
Franco Fichtner
296399a741 dhcp: fix v6 similar to v4 in c2f7998c70e7a5; closes #7828 2024-08-30 20:39:12 +02:00
Ad Schellevis
9f43314246 Services: Intrusion Detection: Administration - fix regression in https://github.com/opnsense/core/pull/7667, closes https://github.com/opnsense/core/issues/7826 2024-08-29 21:09:14 +02:00
Ad Schellevis
4ee5390318 System: Settings: Administration - SSL Ciphers. When only selecting TLS1.3 ciphers, make sure to only allow 1.3 as well (otherwise default !TLS1.3 will be accepted as well). 2024-08-29 17:00:16 +02:00
Stephan de Wit
7f21da5d0d dashboard: use built-in controller logic for JSON decoding 2024-08-29 13:27:24 +02:00
Franco Fichtner
090c6518d7 interfaces: fix issue with PPP port not being posted; closes #7823
Unify the situation for 'ppp_port' vs 'ports' use by using the latter
as is.  One of the issues of this page always was inconsistency after
all.  Then also zap the validation that causes the changes not to be
accepted.  In theory it's posted anyway but that has been the case for
PPPoE/L2TP/PPTP since the fork.
2024-08-29 09:29:53 +02:00
Franco Fichtner
ba72ab76d3 system: remove (inconsistent) prefix from default snapshot names
Also want to avoid confusion about "BE" meaning business edition.
2024-08-29 08:47:39 +02:00
Nigel Jones
5e5cab98b4
unbound: discard-timeout (#7512)
* unbound: discard-timeout

Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>

* Update src/opnsense/mvc/app/models/OPNsense/Unbound/Unbound.xml

Co-authored-by: Franco Fichtner <franco@lastsummer.de>

* unbound: update field help text

---------

Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
Co-authored-by: Franco Fichtner <franco@lastsummer.de>
Co-authored-by: Stephan de Wit <stephan.de.wit@deciso.com>
2024-08-28 14:40:29 +02:00
Franco Fichtner
95ad427723 src: style sweep 2024-08-28 14:38:19 +02:00
Stephan de Wit
186cc36a14 dashboard: fix ACL check on dashboard restore and add safety check for save action
Parsing the persisted dashboard requires decoding it, which by extension means we don't need to encode it anymore when returning the dashboard. In all cases, this commit now makes sure that dashboard is filtered according to access rights.

While here, invalid input can be filtered out partly by check the result of json_decode(), so do this when saving the widgets.
2024-08-28 14:16:57 +02:00
Franco Fichtner
ce9ed275d0 system: fix PHP error and annotate a tiny bit more #7027 2024-08-28 11:42:42 +02:00
Franco Fichtner
c0bee56c10 system: manual gateway switch via cron for #7027 2024-08-28 10:13:34 +02:00
Franco Fichtner
0b42c910c4 firmware: typo 2024-08-27 12:20:39 +02:00
Franco Fichtner
8b7510a3a6 firmware: use full plugin names now and make sure to zap whitespace; closes #7818 2024-08-27 12:10:41 +02:00
Franco Fichtner
d1c7ed00ab firmware: collect plugin conflicts and remove them #7818
Also let conficts generate with its sibilings so we can remove
all of that code from the register script.  Most things are
fixed automatically now.
2024-08-27 11:01:48 +02:00
Franco Fichtner
7dc89a322d firmware: make conflicts known, better way for #7195 via #7818 2024-08-27 09:42:11 +02:00
Franco Fichtner
ccac4779b7 interfaces: introduce vpn_map event
There appear to be no callers in plugins.  We could argue
that the vpn/vpn_map event isn't really needed as it brings
just OpenVPN, IPsec and WireGuard to the table, but we can
decide on this later.
2024-08-26 23:29:32 +02:00
Franco Fichtner
0e4cb12f3f ipsec: unfortunately the previous was never empty()
PR: https://forum.opnsense.org/index.php?topic=42407.0
2024-08-26 20:26:26 +02:00
Franco Fichtner
1717cf05b5 system: in style we trust 2024-08-26 19:57:12 +02:00
Franco Fichtner
178ef826f7 ipsec: fix off-by-section in ipsec migration
PR: https://forum.opnsense.org/index.php?topic=42407.0
2024-08-26 19:56:10 +02:00
Ad Schellevis
7993a82e84 VPN: IPsec: Advanced Settings - minor regression in https://github.com/opnsense/core/issues/7648 , ike_name and log_level should be moved to daemon section. 2024-08-26 16:15:10 +02:00
Franco Fichtner
ce81a38831 system: default to vm.numa.disabled=1
NUMA has performance drawbacks and seems incomplete too.
We're going to assess impact hereby on the general approach,
but from early testing this increases network throughput
considerably in some scenarios.
2024-08-26 15:12:37 +02:00
Franco Fichtner
c296ddeaaa interfaces: return uppercase interface name as per decription rule 2024-08-26 15:04:01 +02:00
Franco Fichtner
fb29ce6917 system: call blur() on service widget button click 2024-08-26 13:58:41 +02:00
Franco Fichtner
8b5a9a172a system: fix messing with fa-spinner in dashboard
fa-stack unused too?
2024-08-26 12:58:53 +02:00
Franco Fichtner
6b412360ea unbound: add hints the new way 2024-08-26 11:58:28 +02:00
Ad Schellevis
9123ae397c mvc: when a hint is provided, one would expect it to be shown when no items are seleced. closes https://github.com/opnsense/core/issues/7800
The current implementation only takes tokenizers into account, by adding data-none-selected-text we would treat selectpickers in a similar way (https://developer.snapappointments.com/bootstrap-select/options/)
2024-08-26 11:45:39 +02:00
Franco Fichtner
9fb4149530 interfaces: unify PPP linkup/linkdown scripting 2024-08-26 11:05:57 +02:00
Ad Schellevis
1be6303460 System: Trust: Certificates - link certificates by subject on import, closes https://github.com/opnsense/core/issues/7813
It looks like we only linked certificates on CA import, move that code into the Cert model and improve it a bit, also trigger when importing a new certificate manually now.
To improve the matching, we search for subjects that match best based on item length now (e.g. a dn ZH,NL should precede one with only NL)
2024-08-26 11:02:42 +02:00
Franco Fichtner
db58e04ac3 system: adjust wording on log history search
Discussed with: @adschellevis
2024-08-26 10:11:20 +02:00
Ad Schellevis
268ec80690 System/Logging - cleanup parameter handling in LogController.
Since we already escape arguments when passing them to configd (0adece8d3e/src/opnsense/mvc/app/library/OPNsense/Core/Backend.php (L131)),
we can safely skip sanitation here.

Fix minor issue in last commit (misplacement of $validFrom)
2024-08-25 11:28:06 +02:00
Ad Schellevis
0adece8d3e System/Logging - add log search time constraint (valid_from) to limit searches when only a few lines match.
When searching large log files for messages that do not frequently occur, there is a large risk of reading all collected lines before returning the first results.
In most cases recent items are required, in which case going back for days of logs might not make sense.

This commit adds a simple "history" selection which translates into a "valid_from" filter on the log data. When timestamps are not parseable for whatever reason, the filter is ignored.

Only small downside is that we do need to translate timestamp again, when needed we could improve performance a bit by storing the original datetime value in NewBaseLogFormat so we don't have to parse it twice.
2024-08-24 20:55:12 +02:00
Ad Schellevis
798170b612 System/Logging - unify how search clauses work, when multiple clauses are specified, we should perform a lowercase compare on each clause (AND).
With this change in place, search behavior should be equal to model searches and searchRecordsetBase() consumers.
2024-08-24 18:12:25 +02:00
Franco Fichtner
0c9d8c9404 system: recover stuck monitors only #7027 2024-08-23 22:01:50 +02:00
Franco Fichtner
f9b83a9585 dnsmasq|unbund: unify this code
It only matters for lighttpd preventing a bug but since this could
be copied and some service being added has the same issue make sure
the code is always the one that's least problematic which means
putting "lo0" as the first explicit (and automatic) interface.
2024-08-23 22:01:50 +02:00