Closed sunbearc22 closed 4 weeks ago
I commented out every line, followed by uncommenting each line until unbound.service
failed to restart. I discovered that the line interface: 0.0.0.0
is the cause of the error. I can't figure out why 0.0.0.0
is causing the issue. Can someone guide me?
Changes made to unbound.conf:
chroot: ""
username: "root"
Then I ran this command and discovered the issue:
root@DNS:/etc/unbound# unbound -d -vv -c /etc/unbound/unbound.conf
[1730176049] unbound[4263:0] notice: Start of unbound 1.19.2.
[1730176049] unbound[4263:0] error: can't bind socket: Address already in use for 0.0.0.0 port 53
[1730176049] unbound[4263:0] fatal error: could not open ports
Because Ubuntu Server 24.04.1 uses systemd
, systemd-resolved.service
is running by default which uses port 53 to listen for UDP packets on 127.0.0.53:53 to do DNS resolution. Consequently, setting unbound to use another port resolved the issue. E.g. I used : port: 5335
.
Describe the bug
unbound.service
runs w/o error when these 3 files are used:However, when these 3 files are removed and the content of
/etc/unbound/unbound.conf
containsunbound.service
fails to restart usingservice unbound restart
. e.g.To reproduce Steps to reproduce the behavior: As described above.
Expected behavior No error should have occurred.
System:
unbound -V
output:Additional information