1188 Commits

Author SHA1 Message Date
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
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