Add Unbound on Debian hosts
After reinstalling the home firewall, I wanted to add some dns cache to local domain on each rented servers. For this usage, I installed unbound on Debian and ordered it to redirect local queries to my home dns server.
Unbound local cache and forwarder
- First, let’s install the package
- Configuration of Unbound.
Welcome to Debian… Debian likes to break configuration on small files, even when the rest of the world is not doing so. To comply to Debian file structure, we will modify the following files:
- /etc/unbound/unbound.conf.d/localbind.conf
- /etc/unbound/unbound.conf.d/remotecontrol.conf
- /etc/unbound/unbound.conf.d/stubzone.conf
The file localbind.conf will control the bind address and the access controls. The file remotecontrol.conf is used to access remote control from localhost. The file stubzone.conf will describe all local zones that needs to be redirected.
- Local bind: /etc/unbound/unbound.conf.d/localbind.conf
- Remote control: /etc/unbound/unbound.conf.d/remotecontrol.conf
- Stub zone definition: /etc/unbound/unbound.conf.d/stubzone.conf
- Reload configuration