14803 Commits

Author SHA1 Message Date
Ad Schellevis
5586e49d86 VPN: OpenVPN - add daemon name "openvpn_%", closes https://github.com/opnsense/core/issues/6156 2022-11-25 20:36:55 +01:00
Stephan de Wit
36c358ea3b unbound: safeguard usage of DNSSEC 2022-11-25 13:50:53 +01:00
Franco Fichtner
a68700be02 src: style sweep 2022-11-25 12:57:45 +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
Ad Schellevis
d4e6378061 VPN: OpenVPN: Servers - remove unused "pool_enable" attribute, originally introduced as unused setting in d799787e49 2022-11-24 18:13:14 +01:00
kulikov-a
5cd36a1322
typo (#6153)
consider precedence
2022-11-23 19:20:42 +01:00
Ad Schellevis
d55e5d50b6 VPN: IPsec: Tunnel Settings - add Unique selection so people can easily revert to Strongswan's default (no) if they want.
Not going to backport this, but in 22.7.x unique was called uniqueids and forcefully set to "yes", which according to the documentation (https://wiki.strongswan.org/projects/strongswan/wiki/connsection) is not compatible with a closeaction as this might lead to an avalanche of reconnecting children for the same connection. Although swanctl (https://docs.strongswan.org/docs/5.9/swanctl/swanctlConf.html) doesn't explicitly mention an incompatibility, our defaults are different than the ones being configured nowadays. Adding the option does seem to make sense.
2022-11-23 17:31:03 +01:00
Ad Schellevis
7333aa9c40 MVC / ApiMutableModelControllerBase - minor addition to 47eac7dbf8 preventing upsert when non uuid string is provided. 2022-11-23 11:35:38 +01:00
Franco Fichtner
2d93449f88 interfaces: fix ACL and migrate a few registrations #6151 2022-11-23 10:52:56 +01:00
Franco Fichtner
d4db4023e6 interfaces: use get_interface_list() to identify hardware
Media settings probe is suboptimal for hardware detection and
interfaces_hardware() already uses the function to decide where
to enforce hardware settings.

PR: https://forum.opnsense.org/index.php?topic=30923.0
2022-11-22 16:42:43 +01:00
Ad Schellevis
f291908c7b UI - Javascript (setFormData) - prevent "Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string" when a form contains file inputs 2022-11-21 20:40:30 +01:00
Ad Schellevis
a37303a46c MVC / UIBootgrid - add support for title property on custom commands (used in tooltips) 2022-11-21 16:36:56 +01:00
Franco Fichtner
49f63e8082 firewall: whitespace 2022-11-21 12:49:34 +01:00
Ad Schellevis
6ac82416d7 MVC - minor bugfix in ApiControllerBase->parseJsonBodyData() when $jsonRawBody isn't of array type we should skip merging entries. 2022-11-20 20:05:33 +01:00
Ad Schellevis
47eac7dbf8 MVC/Core - setBase() : Convert setBase() to an upsert operation. if we don't know the uuid, it's ok to create it.
this eases scriptable actions where a single unique entry should be pushed atomically to multiple hosts.

e.g. the below would add/set an alias named api_test_001 :

r = requests.post(
    'https://192.168.1.1/api/firewall/alias/setItem/9a8fc804-0000-0001-99cb-283ca2d04e58',
    verify=False,
    auth=(api_key, api_secret),
    json={'alias':
              {
                  'enabled': '1',
                  'name': 'api_test_001',
                  'type': 'external',
                  'counters': '0',
                  'description': 'api_test_001'
              }
    }
)

print(r.text)
2022-11-16 21:35:01 +01:00
Ad Schellevis
da9c21c550 Firewall: Log Files: Live View - lookup hostnames may result in http 431 ( Request Header Fields Too Large ). Split requests in cycles of 50, closes https://github.com/opnsense/core/issues/6139 2022-11-16 18:14:34 +01:00
Ad Schellevis
e85f1d74b2 Firewall: Diagnostics: Aliases - minor cleanup, sequenced array doesn't need to extract values 2022-11-16 11:11:50 +01:00
Ad Schellevis
c929c73a50 core - change default sorting to case-insensitive. 2022-11-16 09:07:44 +01:00
Franco Fichtner
272c231c70 src: fix a few minor coverty reports 2022-11-15 10:19:19 +01:00
Franco Fichtner
c1347533c1 system: typo 2022-11-14 14:45:23 +01:00
Franco Fichtner
68ab55bf98 system: empty() is enough in these checks 2022-11-14 14:43:38 +01:00
Franco Fichtner
a6b2711779 dpinger: second try on previous
There are still unhandled 'gateway' access cases but this
really has been the case forever.  No need to safeguard
these at the moment.
2022-11-14 12:14:33 +01:00
Franco Fichtner
b9badcdb90 Revert "dpinger: php warning raised, not sure if correct this way"
This reverts commit a92960829811115994820b01a256a35c428321a9.
2022-11-14 08:00:23 +01:00
Franco Fichtner
a929608298 dpinger: php warning raised, not sure if correct this way 2022-11-14 07:57:54 +01:00
Franco Fichtner
d463abc80f dpinger: style issue 2022-11-13 11:33:53 +01:00
Franco Fichtner
0e86e27eb9 interfaces: add internal interface name to description 2022-11-13 11:22:44 +01:00
Franco Fichtner
39f8a1b6b1 system: simplify slightly #5989
In theory we should be able to move the host routes for 6rd and 6to4
easily without repercussion, unless some part of the system tries to
reload the interface without calling system_routing_configure().
2022-11-11 15:54:43 +02:00
Franco Fichtner
422b68f6c2 system: add option to skip monitor host route #6002 2022-11-11 12:30:34 +02:00
Franco Fichtner
a61afc7f46 system: inline system_staticroute_configure() #5989
Only used once.
2022-11-11 12:04:32 +02:00
Franco Fichtner
edc42e0e80 plugins: drop empty run result 2022-11-11 11:47:27 +02:00
Franco Fichtner
2c588a4bc0 dpinger: looks like we need this #5989 2022-11-11 11:44:52 +02:00
Franco Fichtner
9c647131eb system: prevent directly-connected host routes last minute #5989
They are not necessary.
2022-11-11 11:41:58 +02:00
Franco Fichtner
20d31f92b0 dpinger: use same exclusion magic here for now #5989 2022-11-11 10:51:21 +02:00
Franco Fichtner
f93c287472 system: collect all host routes in a single run #5989
If this works we can use it to also generate the host routes during
the routing table reconfiguration.
2022-11-11 10:46:21 +02:00
Franco Fichtner
0d3b70f4d3 system: extract monitor instance read #5989
While here simplify the host route creation as we want to split
this out for a clean reset during a full routing table reload so
we can be sure all stale and disabled instances are removed anyway.
2022-11-11 10:25:56 +02:00
Franco Fichtner
dc1f19ebed system: shorten dpinger code for #5989 2022-11-11 09:52:15 +02:00
Franco Fichtner
fb872c8f2e ipsec: remove ancient side effect host route removal 2022-11-11 09:25:07 +02:00
Ad Schellevis
a2112455a3 System / Auth - enforce config reload to fetch group membership in case authenticate() made changes. 2022-11-10 16:09:27 +01:00
Ad Schellevis
ef0da3ea59 System / Auth / Radius - add group (class) sync and user creation for RADIUS, closes https://github.com/opnsense/core/issues/6111 2022-11-10 15:29:50 +01:00
Ad Schellevis
2a5510a9d8 System / Auth - safeguard index_users to prevent php warnings 2022-11-10 15:29:50 +01:00
Ad Schellevis
a8bd3379b1 System / Auth - move policy (user, group membership enforcement) to authentication base class to make this re-usable. bugfix previous 2022-11-10 15:29:50 +01:00
Franco Fichtner
7f4ab564a4 dashboard: separate interface type icon from name column
PR: https://forum.opnsense.org/index.php?topic=30983.0
2022-11-10 15:46:29 +02:00
Ad Schellevis
5a6aaeda33 System / Auth - move policy (user, group membership enforcement) to authentication base class to make this re-usable. 2022-11-10 11:12:49 +01:00
Franco Fichtner
17ec3264a4 firewall: fixup #5284 2022-11-09 17:40:37 +02:00
Franco Fichtner
f7e64baa5c firewall: fix translation #5284 2022-11-09 17:38:54 +02:00
Franco Fichtner
b7a9d0b41f firewall: allow external dynamic address in NPT #5284 2022-11-09 17:29:19 +02:00
Franco Fichtner
32c783ca32 firewall: refine npt binat rule generation 2022-11-09 15:42:41 +02:00
Stephan de Wit
fae02022ca unbound: safeguard dnsbl load on missing config data
fixes https://github.com/opnsense/core/issues/6129
2022-11-09 12:00:08 +02:00
Franco Fichtner
02f159599f README: add coverty badge 2022-11-09 11:51:40 +02:00
Franco Fichtner
fc2c82ce4f interfaces: cleanup in linkup script 2022-11-09 10:05:11 +02:00