I have an IPv6 IP on the guest server which running docker
301b:e0d0:401:0348:lk19:7:0:2
Configuration in the /etc/resolv.conf
domain my.domain
nameserver ::1
nameserver 301b:e0d0:401:0348:505:7:0:2
nameserver 301b:e0d0:401:0348:506:7:0:2
How to get its subnet? We can change the forth value start from right side. But keep other values the same.
I have tried to set the subnet to it in my network. Set it in my docker-compose.yml file
networks:
default:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: 301b:e0d0:401:0348::/64
services:
ipv6nat:
container_name: ipv6nat
restart: always
image: robbertkl/ipv6nat
privileged: true
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /lib/modules:/lib/modules:ro
But it doesn't work. Can't use ping6 to other network in the container with this format
# ping6 301b:e0d0:401:0348:[DIFFERENT_VALUE_HERE]:7:0:2
unreachable