I found ipv6 traffic to my container was translated to ipv4 when I monitor docker container’s traffic using tcpdump
. Based on my research, I think docker-proxy has done the translation, it may use some iptables rules to achieve the translation.
[root@localhost /root]# ps -elf | grep docker
4 S root 24854 20579 0 80 0 - 287134 futex_ 12:58 ? 00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 80 -container-ip 172.18.0.6 -container-port 80
Is there any way I can change the container-ip above to ipv6, so no translation happens, or any other approaches that can make my container directly receive ipv6 traffic without the translation.
I have tried directly run docker-proxy
command with directly set option -container-ip to container ipv6 address, but not succeed.