583 Commits

Author SHA1 Message Date
Ad Schellevis
b9a1633a18 VPN: OpenVPN: Connection Status - refactor to MVC closes https://github.com/opnsense/core/issues/6382
o rename virtual_addr --> virtual_address in status call out
o add new endpoints to search connections and routes, kill sessions and service control
o remove old status page status_openvpn.php and change ACL and Menu registration
o offer two tab view on sessions / routes
o service controls (restart/start/stop) are shown for non client based records (p2p and client mode) or when no clients are connected.
2023-03-21 15:25:59 +01:00
Ad Schellevis
83ccec4330 Interfaces: Diagnostics: Ping - refactor diagnostics tool (https://github.com/opnsense/core/issues/6378) 2023-03-16 20:23:22 +01:00
Stephan de Wit
5492d4477c
Unbound: migrate General page to MVC (#6418) 2023-03-15 13:00:22 +01:00
Franco Fichtner
03ac997fa4 system: migrate services page to MVC #6376
Widget is next.  While here set configd to 'locked'.
2023-03-15 12:29:07 +01:00
Franco Fichtner
9b41ff8aff pkg: fix plist 2023-03-09 18:10:01 +01:00
Franco Fichtner
4c65524322 firmware: use model for more generic set and validation #4881
We do have to jump through a few hoops to make this work.  First and
foremost during validation the model should have a "cleansed" view
of its data which means we add the subscription as a separate field
and append it to the mirror after validation.

It might be good to straighten this out later, also in the get path
so that we can hide all required translation in the controller until
we can move this to a standard GUI component and straighten out the
mirror read on the other end when subscriptions are required (but
currently no appended).
2023-03-08 17:03:58 +01:00
Franco Fichtner
9187fe78bf firmware: migrate old flavour entries #4881
While here tweak the GUI a little.
2023-03-08 10:21:10 +01:00
Franco Fichtner
88a8a9754c src: style sweep 2023-03-01 14:51:23 +01:00
Ad Schellevis
ac876fbdfc fix plist 2023-02-26 15:28:36 +01:00
Stephan de Wit
09f40f0e33
Unbound: blocklists: allow scripts to extend blocklist functionality (#6350) 2023-02-24 15:39:40 +01:00
Franco Fichtner
06416714cf pkg: fix plist 2023-02-24 08:58:16 +01:00
Franco Fichtner
c56ad1f065 pkg: fix plist 2023-02-23 12:41:28 +01:00
Franco Fichtner
718fde2f29 pkg: fix plist 2023-02-22 09:38:40 +01:00
Franco Fichtner
a9dcd3f825 ipsec: migrate duplicated cron job; closes #6309 2023-02-08 17:11:15 +01:00
Franco Fichtner
d017169a7e system: configctl plugins configure %s %s is too broad and unused 2023-02-08 16:16:09 +01:00
Franco Fichtner
02a05a4d4c src: style et al 2023-02-08 07:07:15 +01:00
Ad Schellevis
1e28d5b352 VPN:OpenVPN: Servers - deferred authentication, work in progress for https://github.com/opnsense/core/issues/6293
This initial commit focusses on structuring the event flow around user and client registration, moving events to our new ovpn_event.py handler.
By supporting both deferred and direct authentication in user_pass_verify.php, we should be able to start with a cleanup patch for OpenVPN 2.5.x and work our way up to
a smaller fix for 2.6.x.

In preperation for 2.6, this commit also moves --cipher to --data-ciphers-fallback as suggested by the warning "DEPRECATED OPTION: --cipher set to '' but missing in --data-ciphers". Rename the option in the gui while there and add a note in the help text.
2023-02-07 19:26:29 +01:00
Stephan de Wit
6c29e9535c Unbound: blocklists: add SafeSearch option 2023-01-25 16:57:55 +01:00
Franco Fichtner
86e1cb936f system: also add zpool-trim command
Background both commands to avoid spurious timeouts.
We do not process output anyway.

PR: https://forum.opnsense.org/index.php?topic=31143.0
2023-01-16 13:43:16 +01:00
Ad Schellevis
759dd48aed VPN/IPsec - add event handler for manual spd entries if reqid is set. 2022-12-28 22:09:46 +01:00
Franco Fichtner
75e428f8a2 pkg: fix plist 2022-12-21 14:08:56 +01:00
Stephan de Wit
a4ae646327
unbound / overview: migrate to duckdb (#6182)
* unbound / overview: migrate to duckdb

* unbound: make ajax calls concurrent, no need to wait on each other

* unbound / overview: adjust to DataFrame optimization

While previous insert statements with SQLite had to be rate limited to prevent blocking on the
side of the logger, this limitation can be ditched entirely with the approach of appending DataFrames.

Also, the client chart expects timestamps for the entirety of the dataset, so make use of
the NaN value.

* unbound / overview: connection can be none

* unbound / overview: include DNSSEC and timing information and refactor logger

The logger was lacking some error handling due to it being daemonized. On a restart the process
will still produce a core dump likely associated with daemonization, but this will be addressed in a separate issue

To accomodate future additions, DNSSEC and RTT information is now also included in the data set.

* remove leftover syslog message

* unbound / overview: add UUID as well

* unbound / overview: account for null return_msg objects

* unbound / overview: Move DNS statistics to reporting->dns, add detailed grid

This also introduces the option to clear the DNS data. Also restructure the data to a more sensible flow representation.
2022-12-15 10:45:16 +01:00
Franco Fichtner
5169315bf2 firmware: add fingerprint for 23.1 2022-12-14 12:41:38 +01:00
Ad Schellevis
5b03e8cca9 plist 2022-12-13 13:40:24 +01:00
Franco Fichtner
8ae6f43876 ipsec: style sweep 2022-12-12 10:48:38 +01:00
Stephan de Wit
b20ddbe00f
unbound: add overview dashboard (#6101)
Adds a reporting backend for Unbound as well as a dashboard showing an overview of interesting statistics:

    Total DNS queries (over a maximum period of 7 days)
    Blocked queries
    Cache hits
    local-data hits
    A traffic graph with variable intervals
    top N passed/blocked domains (with associated blocklist)

There are a couple of hardcoded values:

    The underlying database is kept up-to-date for the last 7 days.
    The ring buffer used to decouple unbound from the logging backend has a size of 100000 entries.
    In very busy networks, db commits are done for a max of 4000 entries, which according to testing seems to be a good break-even point for DNS throughput vs. insert performance. Everything below this is flushed to the database every 5 seconds.
    To facilitate the variable interval traffic graph, multiple views with varying detail in time slots are created: 1, 5 and 30 minute buckets. These can easily be extended should different intervals be necessary.
2022-11-25 11:42:38 +01:00
Franco Fichtner
3472a7833d health: move one more file #5877 2022-11-04 10:00:22 +01:00
Franco Fichtner
7994adf792 health: rename backend actions #5877 2022-11-04 09:50:09 +01:00
Franco Fichtner
fe21864884 health: clean up scripts/systemheath location #5877
Unfortunately this requires relocating the logging plugins to its
proper location which also affects plugins using that location.
2022-11-04 09:45:10 +01:00
Ad Schellevis
4b4572c159 fix plist 2022-11-02 14:50:39 +01:00
Ad Schellevis
f573082418
Virtual IP MVC/API conversion (#6105) (#6109)
Refactor status page, replace menu registration and add ACL
2022-10-29 14:22:45 +02:00
Ad Schellevis
7d4597efe5
Virtual IP MVC/API conversion (#6105)
closes #5984 refactors legacy pages, includes the following:

o remove type field as this seems to be redundant and confusing
o input form additions (show hide related fields)
o add button for carp type to select first unused vhid
o implement configure action, caching removed addresses in /tmp/delete_vip_{$uuid}.todo files (by the controller)
o add mode filter to search action and complete with relevant fields for our grid
o fix warning in interfaces.inc (interface_proxyarp_configure()), array creation issue
o add validation for addresses used in port forwards and outbound nat rules. previous version tried to rename forwards, we choose to be consistent when it comes to edit/delete.
o change ACL to use the new endpoints, remove "show only" ACL. we can always consider putting it back later, but the experience of only able to reach the grid likely won't be practical.
o remove old firewall_virtual_ip*.php files
2022-10-26 16:42:46 +02:00
Franco Fichtner
2643985eb0 unbound: start dnsbl script earlier to stay clear of carp/cron 2022-10-21 08:58:31 +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
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
9448b0cacc IPSec: move user PSK and legacy PSK items to new PSK mvc module. closes https://github.com/opnsense/core/issues/4614
There is some overlap in https://github.com/opnsense/core/issues/5636 as this cleans-up ipsec.conf further.
2022-10-02 19:49:21 +02:00
Stephan de Wit
346cc08c99
Unbound: addition to advanced rework (#6053)
Small addition to https://github.com/opnsense/core/pull/6050:

- Move private/insecure domains to advanced as its intended use has a larger scope than DNSBLs only. Fixes https://github.com/opnsense/core/issues/5256
- Extends the migration to also include these domains.
- leftover cleanup of legacy settings in migration.
- Adds the `serve-expired-reply-ttl`, `serve-expired-ttl`, `serve-expired-ttl-reset`, `serve-expired-client-timeout` options. These options are hidden until the `serve-expired` checkbox is checked, and indented to signify a relationship.
- Removes all dropdowns and instead provides numeric fields to input raw values for more control and less "guessing" of what is acceptable.
- Removes default settings to prevent mismatches with upstream in the future. It's probably best to refer to the Unbound documentation in our own documentation.
- Previously, `rrset-cache-size` and `outgoing-range` were implicitly set. These are now input fields. The migration code will take care of legacy setting assumptions.

Fixes https://github.com/opnsense/core/issues/5978
Fixes https://github.com/opnsense/core/issues/5795
2022-09-30 17:08:34 +02:00
Franco Fichtner
65be7fb0a8 system: remove legacy syslog file 2022-09-28 14:47:49 +02:00
Stephan de Wit
33a253a748 unbound: finish up unbound/advanced MVC conversion 2022-09-27 14:34:02 +02:00
Stephan de Wit
d2b18299b4 unbound: advanced page MVC migration prep 2022-09-27 14:34:02 +02:00
Franco Fichtner
08e39cb0df src: style sweep 2022-09-01 12:41:26 +02:00
Stephan de Wit
cc6efa4a16
Reporting / Traffic: Upgrade chart.js to v3.9.1 and improve UX (#6000)
* Reporting / Traffic: Bump chart.js version and improve UX
2022-09-01 10:21:15 +02:00
Ad Schellevis
d0ea4449b2 plist 2022-08-30 17:36:14 +02:00
Franco Fichtner
7601e9cab3 pkg: fix plist 2022-08-28 20:51:12 +02:00
Ad Schellevis
92910cb4e8 fix plist 2022-08-28 15:47:13 +02:00
Ad Schellevis
f78e8fa229 fix plist 2022-08-27 21:53:01 +02:00
Franco Fichtner
e6ef454fa8 interfaces: signal address flush through rc.newwanip #5933 2022-08-15 12:14:48 +02:00
Franco Fichtner
e688d3b6fa firmware: revoke 22.1 fingerprint 2022-08-08 11:17:38 +02:00
Franco Fichtner
cf88dbbdd7 pkg: fix plist 2022-07-31 20:46:39 +02:00