Commit Graph

64 Commits

Author SHA1 Message Date
Eric Luehrsen 3d67dcd3cb unbound: fix SLAAC DNS inference
Bug: If DHCPv4 MAC are used to infer SLAAC and the forth position of
the subnet /64 is 0 (X:X:X:0::/64), then DNS records where malformed.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2018-03-19 23:14:00 -04:00
Eric Luehrsen 8b616efb10 unbound: add domain resolution control options
- Add domain_forward to permit designated domains to forward instead
  of recurse as listed in resolve.conf.auto from DHCP WAN client
- Update rebind_protection and add rebind_interface to protect IP6
  GLA locally just like RFC 1918 protection
- Rename trigger to trigger_interface with backwards compatability
- Update odhcpd script for efficiency handling many clients

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2018-03-18 14:48:50 -04:00
Eric Luehrsen 0776f28b37 unbound: update to 1.7.0
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2018-03-18 14:48:50 -04:00
Eric Luehrsen d12d2e31d3 unbound: update to 1.6.8 for CVE-2017-15105
A vulnerability was discovered in the processing of wildcard synthesized
NSEC records. While synthesis of NSEC records is allowed by RFC4592,
these synthesized owner names should not be used in the NSEC processing.
This does, however, happen in Unbound 1.6.7 and earlier versions.
(see https://unbound.net/downloads/CVE-2017-15105.txt)

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2018-01-19 20:11:49 -05:00
Daniel Gimpelevich 379e28880b unbound: fix crash when using odhcpd w/o dnsmasq
When using the configuration under "Unbound and odhcpd" in the package's
README.md, the scripts generated a malformed config file for unbound, due
to an "ip route" command giving extra output lines with the string
"anycast" where the awk script expects an address. These are now filtered.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
2018-01-18 04:22:12 -08:00
Matthias Schiffer 00fce347a5
treewide: fix incorrect *_BUILD_DEPENDS
Build depends refer to source package names, not binary package names.

In many cases, PKG_BUILD_DEPENDS simply duplicated runtime dependencies of
a source package's binary packages; as the corresponding source packages
are implicitly added as bulid dependencies, PKG_BUILD_DEPENDS can simply be
dropped in these cases. In the other cases, *_BUILD_DEPENDS is fixed to
refer to the correct source package name.

Dependency of mysql-server is adjusted from libncursesw to libncurses
(as libncursesw is a virtual package provided by libncurses), so the build
dependency on ncurses is emitted unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-09 16:36:02 +01:00
Eric Luehrsen aa1a835807 unbound: fix uci for option domain-insecure:
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2018-01-09 00:21:42 -05:00
Eric Luehrsen e59bc86e21 unbound: update to 1.6.7
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-10-11 00:12:48 -04:00
Eric Luehrsen e7f5bbc65e unbound: update options for remote-control
Enhance the 'control' option to allow using SSL
to connect to the server. Add the 'extended_stats'
option to match 'extended-statistics: yes.'
Document the 'extended_luci' option; it does not
control Unbound, but changes the LuCI tabs.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-09-22 22:54:32 -04:00
Eric Luehrsen d61a16ca11 unbound: update to 1.6.6
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-09-21 22:54:35 -04:00
Eric Luehrsen 92c4fa477b unbound: update to 1.6.5
This fixes the root.key file if created when unbound is installed between sep11 and oct11 2017

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-08-21 23:24:23 -04:00
Eric Luehrsen 3dbd00df3c unbound: update to 1.6.4
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-06-27 23:47:46 -04:00
Paul Oranje 39322d45b0 unbound: manage resolv.conf iff when listening on 127.0.0.1#53
With this patch the unbound init routines manage resolv.conf if and only if
when unbound will listen on 127.0.0.1#53 and dnsmasq is not.

Also logs some cases where config values are overriden with sane defaults.

Fixes (partially) LEDE FS#785
Fixes openwrt/packages#4487

Signed-off-by: Paul Oranje <por@xs4all.nl>
2017-06-20 16:31:09 +02:00
Eric Luehrsen 9d96dfd468 unbound: add option for dhcp UCI domain mx srv and cname
Base LEDE/OpenWrt UCI for dnsmasq provides for DNS override in
/etc/config/dhcp. It is desired to be able to use dnsmasq and
Unbound as transparently as possible. Option 'add_extra_dns'
will pull 'domain', 'mxhost', 'srvhost, and 'cname' from base.

netifd/procd have an interaction with DHCPv6/RA on WAN (FS#713).
Minor IP6 parameter updates can cause Unbound reload events every
few minutes. List option 'trigger' selects which interfaces may
cause reload. For example 'lan', 'wan' but not 'wan6'.

Squash other cosmetics.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-05-23 00:14:33 -04:00
Eric Luehrsen a7c293fe3a unbound: update to version 1.6.2
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-04-25 20:42:15 -04:00
Eric Luehrsen e6520cf249 unbound: improve interface trigger behavior
procd interface triggers may be busy. Unbound hard restarts will
flush the cache. This might happen frequently depending on how
interface triggers occur.

Change the procd trigger to reduce occurences. Load this trigger
prior to netifd (START=20), but only truly start Unbound from
the trigger rather than immediately in init. Clean up log entries
in scripts after Unbound, NTP, and DNSSEC are established.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-03-26 02:05:46 -04:00
Eric Luehrsen 5f86d50de9 unbound: support copy without dash update
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-03-21 21:54:25 -04:00
Eric Luehrsen afa56a6002 unbound: fix hotplug iface and ntp restarts
Unbound is configured to restart on hotplug/iface but this can result
in numerous restarts at boot. Unbound also has a restart for NTP.
This was observed to generate trouble and even with procd robustness
too many crashes might occur (rare). Unbound would not be running.

Give more care to /var/lib/unbound/root.key during restarts. Use procd
for iface restarts. Check pidof() to wait one more second for Unbound.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-03-17 23:16:49 -04:00
Eric Luehrsen a6e8e5384b unbound: bugfix init race condition invalid FQDN
options 'add_local_fqdn' and 'add_wan_fqdn' can be affected
by race conditions when they are at level 4. Interface name
may not be returned by network tools. The conf file has bad
record formats and Unbound just will not load. Detect this
and fall back to only the host FQDN (level 3).

squash: improve documentation wording and format codes.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-03-12 22:39:45 -04:00
Audric Schiltknecht 8f9479f433 unbound: fix odhcpd trigger script
Read UNBOUND_TXT_DOMAIN from main unbound configuration.
This prevents records to be added into Unbound in the default 'lan' zone.

Signed-off-by: Audric Schiltknecht <storm+github@chemicalstorm.org>
2017-03-12 22:39:21 -04:00
Eric Luehrsen a4f23e52bf unbound: improve maintenance of trust anchor
Unbound UCI tries to protect embedded flash from excess
use. Unbound RFC5011 KSK tracking can rewrite root.key
every few minutes to an hour. It also writes and destroys
files in the same directory during the process.

Recommended UCI delays for copying busy work in /var/
back to /etc/ may be too conservative. These are all
changed from 28 to 9 days.

The RFC5011 KSK results were also destroyed by an
init.d restart, even if /var/ is mounted on persistent
storage like USB drive. /var/lib/unbound/root.key is
now preserved during this process, unless a newer key
is installed in /etc/ manually or package update.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-03-02 00:55:16 -05:00
Eric Luehrsen f85b021eaf unbound: Update to 1.6.1 with 2017 trust anchor
Unbound 1.6.1 has a few bug fixes for resource leaks,
configuration robustness, compile environment interaction,
and maintaining the trust anchor. The 2017 trust anchor
(DS) is built into unbound and unbound-anchor.

File /etc/unbound/root.key holds 2010/2017 DS record until 2018
https://www.icann.org/resources/pages/ksk-rollover
https://www.iana.org/domains/root

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-25 23:36:21 -05:00
Eric Luehrsen f62a049ca1 unbound: bugfix add_local_fqdn with empty ULA
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-25 23:09:22 -05:00
Eric Luehrsen 1993983320 unbound: improve robustness with dhcp scripts
When for example 'package/net/adblock' and DNSSEC vs NTP robustness
is enabled, significant restart thrashing can occur at boot up. DHCP
lease triggers may be occuring at the same time. Unbounds DNS-DHCP
may be incomplete until new DHCP solicit events. Solve this by
leaving a passive but complete host conf file during lease trigger.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-11 19:26:19 -05:00
Eric Luehrsen c43d48e313 Unbound: bug fix odhcpd and add auto adblock
Bug fix dhcp4_slaac6 option was adding to all IP6 routes.
Filtering was added to this process to only include addresses
served from "this dhcp interface."

adblock 2.3.0 file output is now detected and automatically
integrated into Unbound local-zones. adblock deposites its
block site zone-files into /var/lib/unbound. If this is not
desired, then disable adblock or reconfigure to avoid Unbound.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-06 00:05:38 -05:00
Eric Luehrsen cc1eb16c42 unbound: error in README.md for unbound+dnsmasq 2017-01-24 00:14:16 -05:00
Eric Luehrsen de1198d54d unbound: expand UCI to cover some popular dnsmasq features
Unbound+DHCP (server of your choice) should be able to replicate
a lot of what dnsmasq provides. With this change set Unbound
still works with dnsmasq, but also it can work with a plain
DHCP server. Features have been added within the UCI itself
to act like dnsmasq.

- alone: name each interface relative to router hostname
- alone: prevent upstream leakage of your domain and '.local'
- dnsmasq: use dnsmasq UCI to configure forwarding clauses
- dhcp: work with odhcpd as example of companion DHCP-DNS
- dhcp: convert DHCPv4 leases into EUI64 SLAAC for DNS records
- all: enable encrypted remote unbound-control using splice conf
- all: allow user spliced conf-files for hybrid UCI and manual conf
-- 'unbound_srv.conf' will be spliced into the 'server:' clause
-- 'unbound_ext.conf' will add clauses to the end, example 'forward:'

README HOW TO for dnsmasq-in-serial, dnsmasq-in-parallel, and
unbound-with-odhcpd have better/added UCI starters. HOW TO for
including unbound_srv.conf and unbound_ext.conf are added.
Document new UCI: add_local_fqdn, add_wan_fqdn, dhcp4_slaac6,
dhcp_link, domain, and domain_type

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-01-22 20:53:04 -05:00
Eric Luehrsen 89e7bb8f38 unbound: expand UCI support for odhcpd DHCP-DNS
This is bare minimum change in 'unbound.sh' and
'dnsmasq.sh' to migrate the UCI option set for
more flexibility. The boolean(s) to link to
dnsmasq are being changed to a state to include
odhcpd. It is executable but a small step for
clear change management.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-01-22 20:53:04 -05:00
Eric Luehrsen c7684b9f70 unbound: add odhcpd specific scripts to link DHCP-DNS
The UCI for Unbound already links to dnsmasq, but what
if with Unbound, we want to configure a plain dhcp server.
Most servers can call a script for lease events. That
script can then formulate DNS records and load them
with unbound-control (dependency).

The files added here work with OpenWRT/LEDE odhcpd, such
that it can be run alone. They can be used as examples
for any dhcp server. 'odhcpd.sh' is to be called by
odhcpd when a lease event occurs. 'odhcpd.awk' is called
internal to the shell script. The awk script handles
any tricky reformating that may be required.

/etc/config/dhcp
config odhcpd 'odhcpd'
  option leasetrigger '/usr/lib/unbound/odhcpd.sh'

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-01-22 20:53:04 -05:00
Eric Luehrsen ee8b15cad2 unbound: improve NTP hotplug behavior when Unbound is disabled
If Unbound was disabled and at later time enabled, then it
would operate in DNSSEC less-secure mode. When NTP hotplug
was called, the timestamp file was not updated. This was
found testing Unbound vs other tools (bind, dnsmasq).

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-01-22 20:53:04 -05:00
Eric Luehrsen 82c2368177 unbound: UCI updates to take advantage of 1.6.0
- UCI to take advantage of "qname-minimisation-strict:"
- UCI to block chaos reponses bind, server, and version
- UCI to limit or prefer recrusion over IP4 or IP6

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-12-18 22:38:19 -05:00
Eric Luehrsen c0a630001b unbound: bugfix for UCI script typos
- UCI option dnsmasq_gate_name typo in few locations
- NTP hotplug to check /etc/init.d/unbound not ..dnsmasq

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-12-18 22:38:19 -05:00
Eric Luehrsen e9226f1d26 unbound: update 1.6.0
- future opportunity: added "views:" clause
-- consider won't need UCI for security instances
-- consider access lists, forwards, views, and tags
-- consider query denial for DNS amplification defense
- future opportunity: thrifted "local-zone:" memory bloat
-- consider adblock package to feed thru unbound-control
-- consider access lists, forwards, views, and tags
-- consider offering LuCI parental controls or other

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-12-18 22:38:19 -05:00
Eric Luehrsen c189596a4a Unbound: added UCI support for DNS64
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
Signed-off-by: Dan Luedte <mail@danrl.com>
2016-12-12 08:12:26 +01:00
Eric Luehrsen 1ed2270670 Unbound: fix regression of manual conf for power user
- History: prior to package 1.5.10-3 /var/lib/unbound was not used
- History: prior to package 1.5.10-4 no UCI scripts were provided
- Problem: UCI 'option manual_conf 1' only copied unbound.conf and root.key
- Problem: power users that had complex file nests cannot use this
- Fix: README.md includes instructions for /var/lib/unbound jail
- Fix: unbound.sh copies ALL of /etc/unbound for 'option manual_conf 1'

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-12-08 00:57:28 -05:00
Eric Luehrsen c9e5929ff9 Unbound: Update scripts to build conf file from UCI
-unbound.sh implements the majority of requirements in README.md
-rootzone.sh reloads a small subset for alternate trigger maintenance
-unbound.init sets procd triggers on Unbound and dnsmasq (dhcp) UCI
-two part commit squashed with Makefile included

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-11-29 20:49:46 -05:00
Eric Luehrsen e8efcadcd5 Unbound: Add files to enable forward link to dnsmasq
-dnsmasq really provides nice local DHCP-DNS records
-Unbound host records would be clumsy to update
-Unbound can be configured to forward to dnsmasq
-iptools provided to facilitate PTR records
-flexible ipv6 colon notation is a bit complex

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-11-29 20:49:46 -05:00
Eric Luehrsen 2202548ff0 Unbound: Add UCI primer files
-README.md to describe the UCI in detail
-unbound.uci to get you started

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-11-29 20:49:46 -05:00
Eric Luehrsen 416534f95d Unbound: Add hotplug/ntp script to request restart
-DNSSEC needs time, time needs ntp, or power off RTC
-Many consumer routers are cost thrifted without RTC
-Conf "val-override-date: -1" disables time inside DNSSEC
-Need restart as option is not dynamically switchable
-hotplug/ntp is used to set file /var/lib/unbound/unbound.time
-UCI will add or remove option depending on flag-like-file

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-11-29 20:49:46 -05:00
Eric Luehrsen 8dfd5d0b84 Unbound: Incorporate hotplug/iface and root.key in tmpfs
-Patch for /etc/unbound/unbound.conf
--All work done in /var/lib/unbound/
--chroot or jail to /var/lib/unbound/
-Init script points to /usr/lib/unbound.sh
-Makefile to install new scripts in the package

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-10-30 00:22:53 -04:00
Eric Luehrsen cb56829c98 Unbound: Add scripts to manage root.key in tmpfs
-Unbound RFC 5011 is busy and writes frequently
-RFC 5011 creates working files in same directory
-DNSSEC root.key managed in /var/lib/unbound
-Protect against flash ROM wear out in /etc/unbound
-Scripts will copy back every 7 days instead

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-10-30 00:22:53 -04:00
Eric Luehrsen b228d5e969 Unbound: Add hotplug/iface script to request restart
-Rebind to new interfaces cleanly
-Detach from old interfaces cleanly
-Some conf options do not reload dynamically
-Unbound grows some and this will shrink it

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-10-30 00:22:53 -04:00
Eric Luehrsen 3bd81acfb4 Unbound: Give USERID explicit numbers for clean install
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-10-20 21:52:22 -04:00
Eric Luehrsen acf40cf6ae Unbound: Group patch work for example.conf.in
-Remove interlaced configuration changes
--Less sensitive to upstream example.conf changes
--Easier to read patch-of-patch work for maintenance
-Use MEMORY CONTROL EXAMPLE from http://unbound.net/
--Review and rework with respect to previous pacakge
--Effectively the same configuration as previous package
-Disable DNSSEC by default due to real-time chicken-n-egg
--Many OpenWrt target devices have no power-off clock (reboot)
--User choice of work around should be conscious
--Initial install should not fail reboot with DNSSEC default
-Add some defaults explicitly to prevent surprises

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2016-10-20 21:52:22 -04:00
Hannu Nyman 524e19171c unbound: fix whitespace
* Fix upstream whitespace change in the patch.
* Minor cleanup to the header.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-10-18 18:24:17 +03:00
Stijn Segers 56891725c1 unbound: update to 1.5.10
Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2016-10-18 18:22:37 +03:00
Michael Hanselmann 263e8eaaa2 net/unbound: Change maintainer to Eric Luehrsen
Eric has offered to take over maintainership for the net/unbound
package.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2016-10-16 19:44:48 +02:00
Stijn Segers cb794b4fcd unbound: enable pthreads, disable deprecated ciphers
Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2016-09-11 14:11:21 +02:00
Michael Hanselmann 414eaacd90 unbound: Switch to non-privileged user
Until now unbound was always running as root by default. A DNS resolver can
easily run under a non-privileged user.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2016-06-14 22:09:39 +02:00
Michael Hanselmann 28945ea398 unbound: Rewrite init script to use procd
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2016-06-14 22:09:31 +02:00