-
Notifications
You must be signed in to change notification settings - Fork 296
Improvements on unbound's configuration loading #316
Description
I have recently setup this container on my network, and i wanted to allow DNS rebinds for my domain like already mentioned in issue #139. The proposed solution there doesn't quite work, given that Unbound is configured to load specifically the pi-hole.conf file.
| /usr/sbin/unbound -d -c /etc/unbound/unbound.conf.d/pi-hole.conf & |
This will override the default's Unbound configuration found at /etc/unbound/unbound.conf, especially preventing the line that loads the files under the unbound.conf.d folder from being read (specifically the last one include-toplevel: "/etc/unbound/unbound.conf.d/*.conf").
This means that, in order to allow rebinds for a specific domain, we have to overwrite the pi-hole.conf file completely.
To solve the problem, i adopted the following (lazy) solution:
- Copy over the original configuration in a new file and append the following line:
private-domain: "your.domain"- Add the following volume mount to your existing mounts to include the newly created file in the container:
- <path/to/the/custom/conf/file.conf>:/etc/unbound/unbound.conf.d/pi-hole.confIf this doesn't work you could try to disable on the PiHole's web UI the setting Never forward reverse lookups for private IP ranges. You can find it under Settings > DNS > Advanced DNS settings after enabling the "Expert" mode by clicking the top right green switch.
In the eventuality that even this doesn't work, you could try mounting a .conf file in the /etc/dnsmasq.d container's path with the following content:
rebind-domain-ok=/your.domain/