Docker Community Forums

Share and learn in the Docker community.

IPV6 - Unbound - link local ipv6 - Outbound ipv6

Hey Guys,

I’m pretty new to docker and I got a very specific question. I recently started to dockerize a lot of my setup.
One of the components I use is Unbound (a recursive DNS Server).
I startet to play around with Docker Compose. I figured out how to create networks and how to assign ip addresses. I assigned my docker container with an ipv4 and an ipv6. Both of them are local ips. But as Unbound acts as DNS resolver it should have outbound IPv6 connectivity. How can I assign an one to that container ?
It needs to accessibly just over a local ipv4 and ipv6 but needs outbound ipv6. It seems like ipv4 connectivity is working. But ipv6 is not.

Any tips are welcome. Thank you !

I assume you are using the bridge network driver. The container needs a global IPv6 address to be able to reach the internet. And this means you need a global IPv6 prefix that is routed to the host and otherwise unused

If your router is assigned a dynamic IPv6 prefix using DHCPv6-PD, then I don’t really have any advice on how to achieve this.

But if you have a static IPv6 prefix (at least a /60 since you can’t use a /64 that’s assigned to the LAN), and a router which supports static IPv6 routes then you can route for example a /64 prefix to the host. Each docker network needs at least a /80 from the /64 prefix.

1 Like

Thank you for your reply. Yes, I use the bridge driver. Unfortunately I got a /64 routed. I guess NDP Proxying might be a solution.

EDIT: Now it works.