1301 Commits

Author SHA1 Message Date
Maurice Walker
d582435b4b interfaces: add support for SLAAC WAN interfaces w/o DHCPv6 #5862; closes #5883
New script to be invoked by rtsold when Router Advertisements with
RDNSS / DNSSL information are received. Uses ifctl to create the
/tmp/$if_routerv6 file and creates the /tmp/$if_defaultgwv6 file
directly. Fixes the issue that these files don't get created when
the M and O flags in RAs are not set. Also, passes RDNSS / DNSSL
info from RAs to ifctl.
2022-07-22 09:20:12 +02:00
Stephan de Wit
30f499e89e
Firewall: add general firewall log for alias and filter syslog messages (#5894) 2022-07-21 16:11:32 +02:00
Ad Schellevis
7fe76b2239 Firewall: Diagnostics: Sessions - ignore age/expire when not provided / empty 2022-07-20 15:57:41 +02:00
Franco Fichtner
483048b9e6 dhcp: upgrade the prefix watcher to production level #5876
Just make a MD5 sum of the file and change polling to 20 seconds.
Call backend on first run as well without waiting.  Interval could
be lower still, but as said earlier it doesn't matter much all
things considered.
2022-07-20 14:24:26 +02:00
Franco Fichtner
643328486b dhcp: tabs are okay 2022-07-20 13:19:56 +02:00
Franco Fichtner
856574bbef dhcp: use a simple periodic update for now; closes #5876
Gets rid of package dependency which for dhcpleases6 simply
listens on the DHCPD lease file and runs the prefix.php command
unconditionally.

For now emulate this by issuing the command every 60 seconds
which can be adjusted later if someone complains, but seeing
how many bugs this script has had vs. how many people noticed
it (basically none) I doult this will have much impact overall.
2022-07-20 11:37:18 +02:00
Franco Fichtner
5ce587cee8 dhcp: we seem to keep repairing this script... #5876
'prefix' was never a key so this got never executed for whatever reason.
It remains broken in other projects and the question is if this script
really has any useful value.
2022-07-20 11:15:07 +02:00
Ad Schellevis
868c9531cd system: remove last bits of clog (circular logging) support, closes https://github.com/opnsense/core/issues/5892 2022-07-19 20:13:00 +02:00
Josh Soref
efb4eb3f8f firewall: fix "statistics" spelling in function and file name 2022-07-18 17:03:54 +02:00
Josh Soref
3b7453ca2b system: fix spelling in key name 2022-07-18 15:54:44 +02:00
Josh Soref
20a3c3da38
Spelling (#5885) 2022-07-18 13:59:03 +02:00
Franco Fichtner
48e5f9f2ab reporting: legacy log no longer exists 2022-07-18 13:51:29 +02:00
Franco Fichtner
8edb37042c interfaces: remove inconsistencies regarding ping utility 2022-07-18 09:16:11 +02:00
Franco Fichtner
31f3e82c6b unbound: ignore CalledProcessError and make a note about it 2022-07-15 13:48:10 +02:00
Franco Fichtner
b7de99e08b dnsmasq: add dnsmasq watcher; closes #5119 2022-07-15 12:16:36 +02:00
Franco Fichtner
d7ade48769 system: move script to proper location 2022-07-15 10:29:13 +02:00
Franco Fichtner
f44dbecd79 dnsmasq: roll this back a bit #5119 2022-07-15 10:26:54 +02:00
Franco Fichtner
b1c7f44102 dnsmasq: make room for dhcpleases obsoletion #5119 2022-07-15 10:08:38 +02:00
Franco Fichtner
8d56b78153 firmware: provide upgrade log "audit" for #5855 2022-07-14 15:18:06 +02:00
Franco Fichtner
bad28afe70 system: render interfaces in convert_config() #5768
This brings it in line with migrations although both hinge on
the idea that rc.configure_firmware is called to execute this
code.  Both need a better integration but bringing them to the
same level seems to make the most sense.

After reboot the config is in a consistent state now too...

Remove previous plugins_interfaces() call and always use full
path to pluginctl like most spots already do.
2022-07-12 20:41:52 +02:00
Ad Schellevis
3726f67882 VPN: IPsec: Security Association Database - refactor to MVC and extend functionality.
o provide option to delete entries
o show Ikeid and Reqid including optional phase[1|2] description when provided
o extend fields with data provided from setkey -D
2022-07-07 18:47:29 +02:00
Ad Schellevis
023d8e4a35 VPN: IPsec: Security Policy Database - refactor to MVC and extend functionality.
missed a spot in the previous commit, make sure we're not omitting host entries as they skip a subnet definition
2022-07-07 11:40:58 +02:00
Ad Schellevis
434a0a80e8 VPN: IPsec: Security Policy Database - refactor to MVC and extend functionality.
o add a remove button hooking spddelete to remove entries when not cleanedup correctly for some reason to ease maintenance
o add reqid to IPsec phase 2 tunnel view for clarity so we can easily inspect if traffic is trying to pass the right policy
o show Ikeid and Reqid including optional phase[1|2] description when provided
o extend fields with data provided from setkey -DP, but keep them  deselected in the default view (e.g. Upperspec, Mode, Type, ..)
2022-07-06 17:36:07 +02:00
Ad Schellevis
becf4e9342 VPN: IPsec: Status Overview - cleanup, remove vici library in favour of port package 2022-07-05 11:11:53 +02:00
Franco Fichtner
b6167bfd90 system: move add_user script out of shell scripts
Shell scripts are for opnsense-shell.
2022-07-05 08:54:45 +02:00
Franco Fichtner
16042fe283 firmware: missing echo in previous 2022-07-01 10:40:51 +02:00
Franco Fichtner
b79153342c firmware: make sure to use the right approach #5537 2022-07-01 09:52:09 +02:00
Franco Fichtner
7d81b8ff16 firmare: first make sure we can grab an update version for #5537
Displaying changelogs requires a different menu flow but for now focus
on providing a changelog opportunistically before performing the update,
but intentionally after starting it to keep previous flow for now.
2022-07-01 09:50:15 +02:00
Franco Fichtner
5121b8a6d4 interfaces: fix truncation of IPv6 addresses and consistency for PTR 2022-06-30 08:12:16 +02:00
Ad Schellevis
f159f68f97 Interfaces: Diagnostics: DNS Lookup - replace with MVC version. 2022-06-29 21:32:50 +02:00
Franco Fichtner
7eadf5f447 openvpn: hardcode the RFC 7919 DH parameter #4722
This allows us to remove all DH handling remnants.  If people
want to use a separate content they will have to let us know,
but it seems unlikely.  The only impact seems to be a security
bump from 2k to 4k default.
2022-06-29 20:04:07 +02:00
Franco Fichtner
2d2b025a5f dhcp: fix weirdness in prefix crawler
PHP complains about unknown access, but the script is
even weirder with unused $active, storing null values
etc.
2022-06-16 13:23:01 +02:00
Franco Fichtner
3a5484dcd5 system: if no temperature sysctls are exposed do nothing
Likely cause for syntax error in user report.

PR: https://forum.opnsense.org/index.php?topic=28684.0
2022-06-10 13:50:01 +02:00
Ad Schellevis
84b6d07558 Firewall / Aliases: fix alias removal, closes https://github.com/opnsense/core/issues/5807
as the previous version already build files in /var/db/aliastables and therefor future cleanup work, there might be some noise when patching this without a reboot (empty bogons or other external aliases). Without this patch the issue is only that aliases aren't removed, which doesn't make this a super high priority in my humble opinion.
2022-06-05 14:26:47 +02:00
Ad Schellevis
9db6ca2fad Firewall / Rules, Livelog : performance improvements
o Since our filterlog does contain labels nowaydays (https://github.com/opnsense/core/issues/5014), we can stop parsing pfctl which can be quite time consuming
o Rate limit "filter rule stats" configd action to prevent excessive pfctl access on filter pages
2022-06-03 21:05:05 +02:00
Ad Schellevis
021786612c Firewall / Alias - when reading current alias content using pfctl, make sure to ignore empty lines. closes https://github.com/opnsense/core/issues/5788 2022-05-26 10:53:44 +02:00
Stephan
292b701ca8 Unbound: do not compare identity when checking exit code 2022-05-18 13:56:59 +02:00
Franco Fichtner
c0cd729060 src: style sweep 2022-05-09 16:35:22 +02:00
Stephan de Wit
1f1502acf4
Unbound blocklists / OPNsense UI: strengthen error handling (#5761)
* Unbound blocklists / OPNsense UI: strengthen error handling

Also changes the OPNsense UI error handling routine to display a 'status_msg' if provided. Otherwise just display 'status' to preserve backwards compatibility.
2022-05-09 16:27:20 +02:00
Stephan de Wit
73a062c6cb
unbound: make blocklist additions/removals dynamic to prevent a restart (#5747)
* unbound: make blocklist additions/removals dynamic to prevent a restart

This commit contains an optimization for the way unbound can be updated in its' configuration
without the need for restarting Unbound and by extension a loss of internet connectivity.

Hopefully this will pave the way for optimizations on other aspects of Unbounds' configuration as well.
We could for example look into making the provided wrapper function more generic.

The GUI has also been modified slightly to inform the user of the amount of RRs added/removed.

* Services: Unbound DNS: Blocklist, review comments for https://github.com/opnsense/core/pull/5747

Changed the following minor items:

o gettext() for human readable reponse message
o simplify comparison loop (only new or diff are actually the same operation)
o replace one-liner split into a loop with validation in case an empty record exists (or something that doesn't fit the pattern)
o remove optional (but always) set -f option

* unbound: blocklists: minor style fix and strip more agressively

Co-authored-by: Ad Schellevis <ad@opnsense.org>
2022-05-09 11:23:15 +02:00
Franco Fichtner
f59b133b01 dhcp: fix plist and add .php suffix for clarity
(it's easier to syntax check scripts with a file suffix)
2022-05-06 08:50:19 +02:00
Ad Schellevis
eb0eb519db Services: DHCPv4 : leases - Move delete action to separate script in configd and offer the ability there to cleanse leases file for duplicate static leases. Since remove a single address or a list of (mac) addresses are two sides of the same coin it seems to make sense to add a script responsible for dhcpdv4 lease cleanup.
Hooking this into dhcpd_dhcp_configure before startup also closes https://github.com/opnsense/core/issues/5724
2022-04-28 14:30:46 +02:00
Ad Schellevis
43958b00cc Services / Unbound DNS / Blocklist - add custom "Destination Address" as advanced option, closes https://github.com/opnsense/core/pull/5736 2022-04-22 21:25:11 +02:00
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