609 Commits

Author SHA1 Message Date
Franco Fichtner
ad76fb312b firmware: revoke 23.1 fingerprint 2023-08-01 14:53:57 +02:00
Franco Fichtner
dad8bd7543 system: add opnsense-crypt utility #6133 2023-07-24 09:38:13 +02:00
Ad Schellevis
57077b83f5 Interfaces: LAGG: migrate to MVC closes https://github.com/opnsense/core/issues/6384
Migrate ui to MVC, wrap model around existing configuration area to remain backward compatibility.
To avoid laggs configured via console not being reachable from the gui, add a uuid to it.
2023-07-19 11:27:21 +02:00
Franco Fichtner
74b8f028f5 pkg: fix plist 2023-07-18 09:43:44 +02:00
Franco Fichtner
497e46956a pkg: fix plist 2023-07-18 07:38:28 +02:00
Stephan de Wit
4ea46ea21c
MVC: allow new services to hook into ApiMutableServiceController (#6663)
To allow legacy services without a model to hook into the `ApiMutableServiceController`, we define a protected `serviceEnabled` function that by default checks the given `internalServiceEnabled` property to see if a service is enabled, but allows derived classes to override the functionality. We loosen the property restrictions in `initialize()` by moving the checks to their runtime implementations.

DHCPv4/v6 is modified here to hook into this change, but since the `actions_services` requires the keyword `service`, which isn't used by the mutable service controller, we define start/stop/restart/status actions in the `actions_dhcpd.conf` and the new `actions_dhcpd6.conf` files.
2023-07-12 14:21:28 +02:00
Stephan de Wit
dba5d12324 dhcp4: adjust directory structure as with dhcpv6 2023-07-12 10:51:21 +02:00
Stephan de Wit
67c9c597e4 fix plist 2023-07-12 09:41:21 +02:00
Stephan de Wit
58387deddb fix plist 2023-07-06 10:01:55 +02:00
Stephan de Wit
4b7a1ce85b
dhcp: migrate leases page to MVC (#6643)
- reworks the get_leases.py script to accomodate the "last declaration is the current one" logic from dhcpd.leases(5). (neither core nor plugins is currently using this action)
- includes binding states for failover setups in dhcpd.py lease file parsing. These are included in the leases page if show inactive is selected.
- adds small utility function in Firewall/Utility to check wheter a given IP (4 or 6) is within the bounds of a given CIDR block. Needed to bind a lease declaration to an interface in the front end.
- remove dhcpleaseinlocaltime property from services_dhcp.php. dhcpd.py works with epochs, so we only need to convert to a sensible local date in the controller.
- implements multiselect lease deletion
- implements multiselect interface filtering
- does not yet hook into ApiMutableServiceControllerBase, since the legacy configuration makes it a bit tricky.
2023-07-05 10:02:13 +02:00
Franco Fichtner
5f9b8c70fe unbound: cleanup old files 2023-06-29 09:20:28 +02:00
Ad Schellevis
db9abc9276
VPN: OpenVPN: Instances (MVC) (#6636)
* VPN: OpenVPN: Instances (MVC)

bugfixes and additions:

o fix lookup in tls_verify.php
o add auth attribute
o fix connection status reporting non existing clients

* VPN: OpenVPN: Instances (MVC)

bugfixes and additions:

o add missing syshook for startup at boot
o show instances in connection states when not connected
2023-06-27 13:55:39 +02:00
Franco Fichtner
962c388c58 src: style sweep 2023-05-31 16:29:30 +02:00
Franco Fichtner
9a1adab6c8 src: style sweep 2023-05-17 21:08:47 +02:00
Franco Fichtner
a2bc2705ea system: move gateway monitor trigger to separate script #6231
1. The process runs forever to retain proper state, periodically
   syncing the configuration data in order to react correctly.
2. Missing gateways are not an issue.  They will not alert or stick
   to their last verified value.
3. We stop reacting unless a default gatway switch action will follow
   or the gateway is part of a gateway group.  Triggers are not refined
   for now so we just let it run in full processing if a candidate.
4. Emulate the strange monitor alarm output although I don't see the
   use for all of this cryptic goo.  The alarm state (0, 1) was changed
   to reflect the observed transition causing the alarm script to run.
5. Move the action for the script alarm to the script itself.  Requires
   a bit of backend shuffling as well.
6. Only create one script to watch all monitors.  Easier to manage and
   to present as service (which can be stopped and started if needed).
2023-05-17 10:36:37 +02:00
Franco Fichtner
58528970e0 pkg: fix plist 2023-05-08 15:17:56 +02:00
Franco Fichtner
80af1c5ae9 firmware: move sets.sh into more portable query.sh and add tiers fetch #6374 2023-04-26 09:36:58 +02:00
Franco Fichtner
a6268ecc27 firmware: revoke 22.7 fingerprint 2023-04-21 07:36:27 +02:00
Franco Fichtner
9a0da8d50b pkg: fix plist 2023-04-21 07:25:14 +02:00
Franco Fichtner
680ca88259 pkg: fix plist 2023-04-19 09:40:20 +02:00
Stephan de Wit
e6f806e240
Unbound: ACLs: Migrate to MVC (#6474)
- The "internally generated" ACL entries have been removed in favor of a wildcard (well, a wildcard and localhost)
- Users can now change the default action used by the wildcard: either allow, deny or refuse.
- The legacy implementation wasn't very strict (you could add an entry without any input), this does at least require a name and at least one network. To facilitate the migration, if the 'name' property was empty, it will be set to 'Unnamed ACL'. Entries without defined networks will be discarded without notice.
2023-04-17 11:17:39 +02:00
Franco Fichtner
6fd0bc54e2 pkg: fix plist 2023-04-17 07:56:30 +02:00
Ad Schellevis
059b55b7a4 plist 2023-04-15 19:04:23 +02:00
Franco Fichtner
947ed4925a interfaces: ensure PPP netgraph node has the proper name #4696 2023-04-14 11:06:47 +02:00
Ad Schellevis
011f1eebe4 VPN: OpenVPN: Client Specific Overrides: Migrate to MVC closes https://github.com/opnsense/core/issues/6381
o add new mvc module
o migrate existing data
o add getOverwrite() in OpenVPN model to retrieve data structured as legacy data to make this an easy drop-in
2023-04-11 21:42:36 +02:00
Stephan de Wit
d0b821f404 pkg: fix plist 2023-04-04 16:43:30 +02:00
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