Difference between revisions of "Setting up unbound DNS server"

From Alpine Linux
Jump to: navigation, search
m (Set auto-start, start and test the daemon)
Line 53: Line 53:
{{Cmd|rc-update add unbound
{{Cmd|rc-update add unbound
rc-service unbound start}}
rc-service unbound start}}
Test, for example:
{{Cmd|dig nl.alpinelinux.org @}}
{{Cmd|dig nl.alpinelinux.org @}}
{{Cmd|nslookup www.google.cz @}}

Revision as of 20:42, 11 November 2013

Unbound is a validating, recursive, and caching DNS resolver that supports DNSSEC.


Install the unbound package:

apk add unbound


The following configuration is an example of a caching name server (in a production server, it's recommended to adjust the access-control parameter to limit access to your network). The forward-zone(s) section will forward all DNS queries to the specified servers.

  • /etc/unbound/unbound.conf
        verbosity: 1
## To listen on all interfaces use the following line instead
#       interface:
        do-ip4: yes
        do-ip6: no
        do-udp: yes
        do-tcp: yes
        do-daemonize: yes
        access-control: allow
## Other access control examples
#access-control: action
## 'action' should be replaced by any one of:
#deny (drop message)
#refuse (polite error reply)
#allow (recursive ok)
#allow_snoop (recursive and nonrecursive ok).
        control-enable: no
##enable to not answer id.server and hostname.bind queries. 
        hide-identity: yes
##enable to not answer version.server and version.bind queries. 
        hide-version: yes
## Note for forward zones, the destination servers must be able to handle recursion to other DNS server
## Forward all *.example.com queries to the server at
#        name: "example.com"
#        forward-addr:
## Forward all other queries to the Verizon DNS servers
        name: "."
# Level3 Verizon

Set auto-start, start and test the daemon

Set to auto-start then start unbound:

rc-update add unbound rc-service unbound start

Test, for example:

dig nl.alpinelinux.org @


nslookup www.google.cz @