NSD issue when ipv6 is disabled

There’s an issue after disabling IPv6, NSD won’t start because it tries to bind on ::1:

Sep 21 11:39:36 mail…com nsd[3091432]: [2023-09-21 11:39:36.979] nsd[3091432]: notice: nsd starting (NSD 4.3.9)
Sep 21 11:39:36 mail…com nsd[3091432]: [2023-09-21 11:39:36.983] nsd[3091432]: error: can’t bind tcp socket: Cannot assign requested address
Sep 21 11:39:36 mail…com nsd[3091432]: [2023-09-21 11:39:36.984] nsd[3091432]: error: cannot open control interface ::1 8952
Sep 21 11:39:36 mail…com nsd[3091432]: [2023-09-21 11:39:36.984] nsd[3091432]: error: could not open remote control port
Sep 21 11:39:36 mail…com nsd[3091432]: [2023-09-21 11:39:36.984] nsd[3091432]: error: could not perform remote control setup
Sep 21 11:39:36 mail…com systemd[1]: nsd.service: Main process exited, code=exited, status=1/FAILURE

This will also cause “Internal server error” when adding/removing mailboxes from the admin panel.

To solve this, It’s needed to add in nsd.conf the instruction to bind on ipv4 instead:

remote-control:
    control-enable: yes
    control-interface: 127.0.0.1
    control-port: 8952

Unfortunately this file is overridden by the MIAB setup, so it would be useful to have this done automatically when ipv4-only. (Or disable this remote-control if it’s not a needed feature)

Or perhaps have IPv6 for your VPS? In 2023, any reasonable provider will provide IPv6.

If you send/receive email from Google, they will thank you as they prefer using IPv6.

in my case this was the issue I had with ipv6: Setup guide suggests disabling ipv6, setup abends at dovecot - #7 by fmonts

but unfortunately there are more issues when disabling it, NSD is not the only one, also nginx has many listen directives on [::]…

This topic was automatically closed after 61 days. New replies are no longer allowed.