Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionHusam Ahmed Chaudhary
2021-01-29 18:14:50 UTC
Description of problem :
For a DNS Caching only mode of unbound-anchor is not mandatory. In an internal DNS setup without perfect DNSSEC the unbound-anchor connects to the internet for the root servers on port 53.
These Internet connecting requests show up in the Firewall for every server and is a security risk.
Request :
In unbound.service systemd unit add support for an environment variable DISABLE_UNBOUND_ANCHOR set in /etc/sysconfig/unbound that would then conditionally disable the current pre-start line.
~~~
ExecStartPre=-/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem -f /etc/resolv.conf -R
~~~
This is similar code that already exists in the bind package provided named unit that already supports disabling the check_conf line using DISABLE_ZONE_CHECKING
Example :
~~~~
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_UNBOUND_ANCHOR" == "yes" ]; then /usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem -f /etc/resolv.conf -R; else echo "Updates of root keys with unbound-anchor is disabled"; fi'
~~~~
I ran into the same situation in an environment where DNSSEC is not supported, so `unbound.service` spends upwards of 20s on each start/restart unnecessarily running `unbound-anchor` while DNS requests are not served.
The workaround I came up with is to just override the systemd unit to remove that `ExecStartPre` line. This can be done by setting the following in `/etc/systemd/system/unbound.service.d/override.conf`:
```
[Service]
ExecStartPre=
ExecStartPre=/usr/sbin/unbound-checkconf
```
...then running `systemctl daemon-reload`. The second line blanks out the `ExecStartPre` directives set in the RPM-managed unit file, and the second line restores the config check that you DO still want to run.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (unbound bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:4194