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.
Bug 1922448 - [RFE] Allow disabling unbound-anchor during startup
Summary: [RFE] Allow disabling unbound-anchor during startup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: unbound
Version: 8.3
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: aegorenk
QA Contact: František Hrdina
URL:
Whiteboard:
Depends On:
Blocks: 1951923
TreeView+ depends on / blocked
 
Reported: 2021-01-29 18:14 UTC by Husam Ahmed Chaudhary
Modified: 2024-12-20 19:35 UTC (History)
5 users (show)

Fixed In Version: unbound-1.7.3-16.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1951923 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:05:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4194 0 None None None 2021-11-09 18:05:37 UTC

Description Husam 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'
~~~~

Comment 6 Rick White 2021-04-20 18:56:52 UTC
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.

Comment 16 errata-xmlrpc 2021-11-09 18:05:30 UTC
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


Note You need to log in before you can comment on or make changes to this bug.