Linux

Docker in a dedicated VLAN including IPv6

Translations: DE

To test AdGuard Home I wanted to quickly spin up a Docker container. That worked right away, but it didn’t correctly log the clients’ IPv6 addresses. The solution was to place the container on the network as its own host.

Step 1: Create a VLAN on UniFi UDM‑Pro

Because containers with macvlan don’t properly use DHCP, I created a VLAN with its own IP range. In the UDM‑Pro web UI go to “Settings” → “Network” → “New Virtual Network”. Assign an IP range and a VLAN ID (I used ID 2). Set DHCP to None. Under IPv6, also assign a subnet, for example fd01::1/64.