Maintained by: NLnet Labs

Unbound not returning MX record from NSD

Ichigo Kurosaki
Thu Sep 14 07:41:51 CEST 2017


I have master slave setup of NSD and Unbound, which is running just fine
for the most part except that machines making use of the DNS is unable to
retrieve the MX record.

Both master and slave NSD runs on port 8053, while Unbound is on port 53,
see config gist below.

#Unbound conf
        verbosity: 2
        port: 53
        do-ip4: yes
        do-ip6: no
        do-udp: yes
        access-control: allow
        access-control: allow
        access-control: allow
        access-control: allow
        root-hints: "/var/lib/unbound/root.hints"
        #auto-trust-anchor-file: "/var/lib/unbound/root.key"
        hide-identity: yes
        hide-version: yes
        harden-glue: yes
        harden-dnssec-stripped: yes
        cache-min-ttl: 3600
        cache-max-ttl: 86400
        private-domain: ""
        do-not-query-localhost: no
        prefetch: yes
        logfile: "/var/log/unbound/unbound.log"

local-zone: "" nodefault


# Remote control config section.
        control-enable: yes

# Stub zones.
        name: ""
        stub-addr: at 8053
        stub-addr: at 8053

        name: ""
        stub-addr: at 8053
        stub-addr: at 8053

# NSD zone file

;## NSD authoritative only DNS

$TTL 86400      ; 1 day
@       IN SOA  nsd1.example. (
                                2017081004 ; serial number date plus last
two digit increment
                                86400      ; refresh (1 day)
                                3600       ; retry (1 hour)
                                604800     ; expire (1 week)
                                3600       ; minimum (1 hour)
; Name Servers
        IN      NS
        IN      NS

; A Records for Name Servers
nsd1    IN      A
nsd2    IN      A

; MX Record

        IN      MX      10

; A Records L20 servers
mail                    A
www                   A
webmail             CNAME   mail

When I try to query for the MX record of e.g., $ dig mx  +short, it does not return anything. The above zone file was copied
from a working old BIND, the same query still works for the latter.

Hope someone could point the fix.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>