So I pulled master since a long time to get all the latest improvements. But it broke my mailinabox. In /admin status checks report DNS issues like:
Nameserver glue records are incorrect. The ns1.box.fuess.nl and
ns2.box.fuess.nl nameservers must be configured at your domain name registrar as having the IP address 149.210.177.248. They currently
report addresses of [Not Set]/[Not Set]. It may take several hours for public DNS to update after a change.
And:
This domain must resolve to your box's IP address (149.210.177.248) in public DNS but it currently resolves to [Not Set]. It may take several hours for public DNS to update after a change. This problem may result from other issues listed here.
This was all working before. I’m at commit 43fe2fe
What’s wrong here?
Stopping bind9 and then starting nsd results in (in syslog):
Aug 30 16:57:09 box nsd[22217]: can't bind udp socket: Invalid argument
Aug 30 16:57:09 box nsd[22217]: server initialization failed, nsd could not be started
It’s the machine’s IPv6 address on the local network, which is auto-detected (in setup/functions.sh) by running:
ip -6 -o route get 2001:4860:4860::8888 | sed “s/.* src ([^ ])./\1/”
It should match something in the output of ifconfig.
If it is a valid local IPv6 address, I don’t know why nsd won’t bind to it. IPv6 is weird.
Maybe the solution is to not have nsd listening on IPv6 addresses for now (in management/dns_update.py) I think it really only has to listen on the IPv4 address anyway since that’s the address used in our DNS settings for nameservers.
That explains why my machine broke after initially working.
I now had to add some lines (with customized paths in comparison to the source link) to /etc/nsd/nsd.conf to get it working again in my IPv4-only environment:
server:
hide-version: yes
# identify the server (CH TXT ID.SERVER entry).
identity: ""
# The directory for zonefile: files.
zonesdir: "/etc/nsd/zones"
ip-address: <<YOUR PUBLIC IP>>
# ip-address: ::1 # note the manually disabled IPv6
remote-control:
control-interface: 127.0.0.1
# nsd server key file for remote control.
server-key-file: "/etc/nsd/nsd_server.key"
# nsd server certificate file for remote control.
server-cert-file: "/etc/nsd/nsd_server.pem"
# nsd-control key file.
control-key-file: "/etc/nsd/nsd_control.key"
# nsd-control certificate file.
control-cert-file: "/etc/nsd/nsd_control.pem"
How can I make this change permanent?
I don’t know if
helped to solve
I also propose to give this thread a more meaningful title in relation to nsd.
Hi, I keep having issues with ipv6 and nsd. The IPv6 address in nsd.conf doesn’t have the ‘%eth0’ anymore (since a long time by the way). And to get everything working I have to remove the ipv6 address (or add %eth0 but didn’t test that). Stop/starting nsd, bind9. Until of course the next day.
Can you paste your ipv6 address and any errors nsd has when starting? What’s the problem when the ipv6 address is there? Not every address needs %eth0, btw.
What happens is that nsd is not running, so the box is not available to the outside world. Pingability says it can’t find A records for the domains I’m running. When I try to start it, the log says:
Dec 13 12:14:08 box nsd[27927]: can't bind udp socket: Cannot assign requested address
Dec 13 12:14:08 box nsd[27927]: server initialization failed, nsd could not be started
Dec 13 12:14:08 box kernel: [9084699.249470] init: nsd main process (27927) terminated with status 1
Dec 13 12:14:08 box kernel: [9084699.249484] init: nsd main process ended, respawning
I think that happens because named is already running on port 53:
$ sudo lsof -i :53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
named 17474 bind 20u IPv4 6286001 0t0 TCP localhost:domain (LISTEN)
named 17474 bind 512u IPv4 6286000 0t0 UDP localhost:domain