Closed WRMSRwasTaken closed 4 years ago
Recently there was a clarification in the man page wrt interface-automatic:
(https://github.com/NLnetLabs/unbound/pull/207).
Can you try the option ip-transparent:
?
Unfortunately, that didn't fix the issue for me.
Config:
server:
interface: 127.0.0.1
interface: ::1
interface-automatic: yes
ip-transparent: yes
It still binds to all interfaces on bootup:
[1585751836] unbound[61106:0] notice: Start of unbound 1.10.0.
[1585751836] unbound[61106:0] debug: increased limit(open files) from 1024 to 4152
[1585751836] unbound[61106:0] debug: creating udp6 socket :: 53
[1585751836] unbound[61106:0] debug: creating tcp6 socket :: 53
[1585751836] unbound[61106:0] debug: creating udp4 socket 0.0.0.0 53
[1585751836] unbound[61106:0] debug: creating tcp4 socket 0.0.0.0 53
[1585751836] unbound[61106:0] debug: chdir to /etc/unbound
[1585751836] unbound[61106:0] debug: chroot to /etc/unbound
[1585751836] unbound[61106:0] debug: drop user privileges, run as unbound
Just enabling ip-transparent
unfortunately doesn't help me here too, because unbound is still going to reply from the wrong source address:
16:39:39.551601 IP6 fe80::510a:4f7d:959f:cb2e.61843 > fe80::1.53: 1+ PTR? 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa. (90)
16:39:39.551908 IP6 fe80::4c78:eeff:fe5a:c1a6.53 > fe80::510a:4f7d:959f:cb2e.61843: 1 NXDomain* 0/1/0 (149)
You should either use interface-automatic:
or ip-transparent:
based on your needs.
Can you remove the interface-automatic:
option and try again?
Ok, disabling interface-automatic
and enabling ip-transparent
fixes this for me. Thanks for the clarification. So, with ip-transparent
I now have to select all interfaces I want unbound to listen on.
However, I've stumbled across another issue:
Setting the interface:
to any link-local address explicitely is going to fail:
[1585753498] unbound[76871:0] notice: Start of unbound 1.10.0.
[1585753498] unbound[76871:0] debug: increased limit(open files) from 1024 to 4188
[1585753498] unbound[76871:0] debug: creating udp4 socket 10.10.10.1 53
[1585753498] unbound[76871:0] debug: creating tcp4 socket 10.10.10.1 53
[1585753498] unbound[76871:0] debug: creating udp4 socket 10.10.10.2 53
[1585753498] unbound[76871:0] debug: creating tcp4 socket 10.10.10.2 53
[1585753498] unbound[76871:0] debug: creating udp6 socket fe80::1 53
[1585753498] unbound[76871:0] warning: IPv6 protocol not available
[1585753498] unbound[76871:0] debug: creating udp6 socket fe80::4c78:eeff:fe5a:c1a6 53
[1585753498] unbound[76871:0] warning: IPv6 protocol not available
Here, I'm trying to bind to fe80::1
and fe80::4c78:eeff:fe5a:c1a6
with ip-transparent
and also ip-freebind
enabled. Those 2 addresses are on my interface.
Should I open another ticket for this?
Adding scope identifiers fixes this problem. I'm going to close this. Thanks for your time and the clarification.
causes unbound to bind to all interfaces:
as seen in the debug log (
unbound -ddvvv
):Version is:
On Arch Linux running Kernel
5.5.11.a-1-hardened
.Setting
interface-automatic
tono
or commenting it out has the correct behavior:I'd really like to have this option enabled, because otherwise binding to
fe80::1
will not work correctly (unbound is going to reply from the original link-local address which will be blocked by client firewalls because the answer didnt't come fromfe80::1
).