1308 Commits

Author SHA1 Message Date
Ad Schellevis
3c59ca1269 Firewall / Aliases - change log level on geoip download to notice (it's message, not an error) 2022-04-16 02:56:57 +02:00
Franco Fichtner
83779cd324 firmware: list locked packages in health audit
Might be relevant to update issues as reported via Reddit.
2022-04-14 12:57:00 +02:00
Franco Fichtner
c5fc553ecf firmware: force all should indicate base/kernel reinstall; closes #5701 2022-04-13 08:32:55 +02:00
Franco Fichtner
2a3f201d38 firmware: use isolated directory for database update check
Otherwise we end up trashing our main package database.

PR: https://forum.opnsense.org/index.php?topic=27875.0
2022-04-12 10:25:39 +02:00
Franco Fichtner
248664c816 system: protect -n test with quotes, shell style while at it 2022-04-05 10:05:01 +02:00
Ad Schellevis
e0f9acc76a Reporting -> Health -> System -> CPU Temp - add temperature sources to rrd collection. closes https://github.com/opnsense/core/issues/5601
Always prefer cpu temp as before, when not available consider the folowing options

o hw.acpi.thermal.tz0.temperature --> ACPI temp
o hw.temperature.CPU --> apparantly used for arm devices.
2022-04-05 09:57:43 +02:00
Ad Schellevis
ad9b7b1f40
Firewall / Aliases - various usability and visibility improvements (#5668)
Firewall / Aliases - various usability and visibility improvements

o change /api/firewall/alias/listNetworkAliases endpoint to return name and address
o add alias description as subtext in network group dropdown
o exclude row buttons for internal aliases
o support nesting of external aliases
o attach statistics to external aliases (like bogons and new interface network types)
o add preprocess in alias to handle non gui defined types
o network aliases will flush :network into the table
o aliases which aren't managed via configured settings will be fetched for nesting
o gather pf tables which aren't generated into filter_tables.conf as being external so the new imported static_aliases are usable without the need to import the settings in the template language
o initial work to support interface networks, register internal types and flush to alias template
o support imported static aliases using json definitions and move core aliases in there
2022-04-03 16:25:08 +02:00
Franco Fichtner
383561b6f1 system: simplify previous a bit
We can set gateway to null as it is ignored when setting host
route.  Also adhere to logic for interface selection in both
DNS modes, but only exclude from configuration list for dynamic
ones.

For the time being we don't need static/dymanic annotation
as the system doesn't care by design and we don't filter it
anywhere else.  Might be something for the status page, but
that's a larger change to level expectations vs. dyamic
connectivity properties.

A couple of style issues here and there as well.
2022-03-28 11:59:31 +02:00
Stephan de Wit
8d3584be16 get_nameservers(): also return manual dns entries to simplify code elsewhere 2022-03-28 09:25:25 +02:00
Franco Fichtner
0d5d9f9ba9 firmware: exclude revision to match release during hotfixes 2022-03-25 15:13:48 +01:00
Ad Schellevis
fcbca64262 logging - fix for clear single log target keeps clog file, closes https://github.com/opnsense/core/issues/5644 2022-03-24 14:11:14 +01:00
Franco Fichtner
aa3c27df0b src: witespace sweep 2022-03-23 14:50:19 +01:00
Stephan de Wit
b4adcee862
unbound: prefer system nameservers if forwarding is enabled and only run unbound-anchor when necessary (#5625) 2022-03-23 11:21:33 +01:00
Stephan de Wit
6832fd75a0
unbound: implement custom forwarders over current dot setup (#5606)
This PR pulls query forwarding over the current dot setup, so visually nothing changes.

All API calls are redirected to new Forward functions, which slightly modifies what is returned based on whether "Query Forwarding" or "DNS over TLS" is selected from the menu. This way backwards compatibility is preserved.

As an addition, a user is now able to specify a specific domain for a forward zone as well. Meaning that queries for this specific domain will skip a catch-all (".") domain (if specified), and instead use the server specified for this domain.

Entering a forward zone with a catch-all domain (".") in both Query Forwading and DNS over TLS is considered a duplicate by Unbound, so a static warning for this has been attached in the grid - however, it might be possible for a user to be warned dynamically over this.
2022-03-22 13:38:26 +01:00
Franco Fichtner
20ae548f62 interfaces: more PPP changes for ifctl ##5565 2022-03-22 08:02:33 +01:00
Franco Fichtner
96039560ad interfaces: detach newwanip call as discussed 2022-03-18 08:28:04 +01:00
Ad Schellevis
797c186419 dhclient-script: prevent the removal of default routes as rc.newwanip is responsible for calculating the correct active default.
Ideally rc.newwanip should be as lightweight as possible, with 8c49c7bfdd in place normal execution doesn't take much time, but it likely doesn't make sense to hook gif|gre interfaces either when nothing has changed.

closes https://github.com/opnsense/core/issues/5624
2022-03-16 20:44:37 +01:00
Franco Fichtner
ca73304d6a firmware: minor issue here 2022-03-16 13:59:21 +01:00
Franco Fichtner
b07d403b9f interfaces: ifctl now lists available files for -i use 2022-03-14 08:56:57 +01:00
Franco Fichtner
c39ef68e58 interfaces: add ifctl -r and -p for router and prefix files
We add this here to ensure consistency between the functionalities
of these interface helper files.  Not all instances have been
converted, but they can be as time permits.  Tested on IPv6.

While here settle on "prefix" for pdinfo as a thing since we
renamed it already anyway.
2022-03-11 15:39:45 +01:00
Franco Fichtner
6446a4ccfa interfaces: ifctl link for nameserver.sh
Not sure about nameserver.sh name and scope yet so try to
hide it under a link.  We can always change the name later
although having .sh suffix helps us lint the script more easily.
2022-03-11 10:50:04 +01:00
Franco Fichtner
bc7a646aef interfaces: "_" prefix means only call internally
Also now we can grep for "interfaces_vlan_configure" to see both
and "interfaces" is the actual prefix to be used from interfaces.inc.

Later we should try to avoid calling "_" prefix functions from code
not in interfaces.inc.
2022-03-11 09:09:54 +01:00
Franco Fichtner
68454bd30c src: style sweep 2022-03-10 08:38:04 +01:00
Franco Fichtner
e00a9a2031 dhcp: use opnsense-log -n for prefix reads 2022-03-10 08:32:17 +01:00
Ad Schellevis
71a8da452c DHCPDv6: stream read log and leases files for "dhcpd update prefixes" action, see https://forum.opnsense.org/index.php?topic=27319.msg132541#msg132541 2022-03-04 19:42:48 +01:00
Franco Fichtner
1bec5fad0f firmware: update work in progress for upgrade handling
We can now safely check packages kernel and base set version from
opnsense-update.  The basic idea is still that a packages set marker
is included now so we can refrain from updating packages once we
are crossing over a major version barrier using said packages set.
2022-03-02 09:30:03 +01:00
Franco Fichtner
cdd35ab6cb Firmware: make the connectivity audit more robust
Change the ping to size 1500 to emulate a typical download
scenario.  Sometimes small pings will respond but not the
larger fetch.

Secondly, do a separate IPv4 and IPv6 update of the repository
depending on whether we got a corresponding address from the
host.  It should clear up the question if IPv4 or IPv6 or both
is broken/defunct/disabled.
2022-03-01 08:52:08 +01:00
Franco Fichtner
9eaa897ed1 firmware: emit changelog URL for testing 2022-03-01 08:47:38 +01:00
Franco Fichtner
b8bdb8deb7 interfaces: add proper argument parsing, simplify invokes #5565 2022-02-25 10:49:51 +01:00
Franco Fichtner
bf484cbcf2 firmware: check repository and plugin state in health audit
More often than not this is useful to know.
2022-02-25 08:24:49 +01:00
Franco Fichtner
652ae0881c interfaces: add nameserver script to contain the situation #5565
Routes only get added in system_resolvconf_generate() now where
the DNS override is properly checked.  The nameservers are added
through the new script for convenience and removed from there as
well.  As a bonus we still scrub the routes from the nameserver
file removal to avoid creating "state" about what was done elsewhere.

This is still subject to a lot of funky races for overlapping host
routes either by ISP, manual DNS, gateway monitors or static routes.
2022-02-24 15:00:05 +01:00
Ad Schellevis
463696a23d Interfaces: Other Types: VLAN - refactor to MVC framework in preparation for https://github.com/opnsense/core/issues/5560
o wrap vlan set pcp in new function legacy_vlan_pcp()
o add legacy_vlan_remove_tag() to detach our vlan
o use legacy_vlan_remove_tag() + legacy_vlan_tag() to update vlan interfaces, in which case configuration remains as it was which would make future modifications which don't rely on "logical" names easier.
2022-02-23 11:54:44 +01:00
Franco Fichtner
61445fc13d src: style issue with $((...)) use 2022-02-23 10:23:28 +01:00
Franco Fichtner
3900d7a5fc interfaces: style sweep 2022-02-22 20:10:31 +01:00
Ad Schellevis
88c27bfe4c Interfaces: Other Types: VLAN - refactor to MVC framework detaching configuration using configd while. In preparation for https://github.com/opnsense/core/issues/5560 2022-02-22 15:58:25 +01:00
Ad Schellevis
92352ec4fa Reporting: Traffic - use async resolver to reverse lookup addresses. closes https://github.com/opnsense/core/issues/5536 2022-02-20 20:14:46 +01:00
Ad Schellevis
171fd93167 Firewall / Aliases - minor cleanup, removing unused loop parameter 2022-02-20 19:02:49 +01:00
kulikov-a
542dbbba84 logging - squidExtLogFormat : typo (#5580) 2022-02-16 19:51:53 +01:00
Franco Fichtner
481c6f943f interfaces: PATH is not complete in dhclient-script
PR: https://forum.opnsense.org/index.php?topic=26995.0
2022-02-16 16:21:01 +01:00
Franco Fichtner
789b777d46 system: try to boot without kernel message mute relics
They don't seem to work in some cases and aren't used a lot.
2022-02-15 09:48:48 +01:00
Franco Fichtner
b342645e7c dhcp: add missing copyright
File created in 092462dc10d1a4 by Seth Mos in 2012.
2022-02-14 08:48:41 +01:00
Ad Schellevis
edeec7d621 Firewall - Aliases: local file corruption might prevent alias to be loaded. closes https://github.com/opnsense/core/issues/5525 2022-02-13 11:30:45 +01:00
Franco Fichtner
02dc1ebd93 interfaces: prevent DHCP from installing nameservers when not allowed
This was refactored previously and all the logic should live outside
dhclient-script but it seems it's only loosely handled over there.
For now put a check back in the old way and rework this later correctly
from the system.inc point of view: we do want to register nameserver
and searchdomain in the cache files, but should not add a route if
those are not required.  It would be helpful to show them in the overview
regardless (as for DNS servers) but with a hint that they are not being
used.

PR: https://forum.opnsense.org/index.php?topic=26765.0
2022-02-05 08:16:43 +01:00
Franco Fichtner
6c12235b07 dhcp: typo 2022-02-03 07:47:45 +01:00
Franco Fichtner
00a86f74db interfaces: shorten list() action where we can 2022-02-02 22:58:39 +01:00
Franco Fichtner
18e87a510b interfaces: forgot these support returning the bits as well
Avoids having to do the split afterwards.
2022-02-02 22:43:11 +01:00
Franco Fichtner
ef9a2e9330 dhcp: quick pass over prefixes.php to support non-clog finally 2022-02-02 09:07:50 +01:00
Franco Fichtner
41ab7fb9f5 system: several improvements to tunables; closes #5504
o Merge defaults and requirements.
o Get rid of get_default_sysctl_value().
o Manually set 'type' for e.g. boot enviroment tunables.
o Cache sysctl map once per boot.
o Edit system defaults for easier override.

While sysctls might change when (un)loading kernel modules the
risk of missing something vital is not given.  We could always
flush the cache file in that case later.
2022-02-01 12:23:00 +01:00
Markus Reiter
2bf4f44c4a
Fix EmergingThreats documentation URL. (#5530) 2022-01-31 14:06:39 +01:00
kulikov-a
f530e4fb4b
Logs: add backward compatibility (#5522) 2022-01-30 14:05:28 +01:00