Score:0

Accessing docker-compose containers via ipv6 from the outside of the docker host

gb flag

I have the following (simplified) docker(-compose) setup and would like access the nginx container from the laptop. A ping from the laptop to the docker-compose gateway (fd..2222.0.0.1/80) works fine but to fd..2222.0.0.2/80 doesnt work.

enter image description here

I already tried to advertise a route via radvd (running on the Server):

interface wlp1s0 {
    IgnoreIfMissing on;
    AdvSendAdvert on;
    MaxRtrAdvInterval 600;

    route fddd::2222:0:0:0/80 {
        AdvRouteLifetime 900;
        AdvRoutePreference low;
    };
};

The route gets added to the laptop:

$ ip -6 -br r
...
fddd::2222:0:0:0/80 via fe80::xxxx:xxxx:xxxx:xxxx dev wlan0 proto ra metric 1024 expires 684sec pref low
...

but theres still no ping getting through. Could you help me getting this to work?

$ ip -6 -br a   # Server
lo               UNKNOWN        ::1/128
wlp1s0           UP             ... fddd::2c2:c6ff:febd:862a/64 ...
docker0          DOWN           fddd::1111:0:0:1/80 fe80::xxxx/64 fe80::1/64
br-ae6409628391  UP             fddd::2222:0:0:1/80 fe80::xxxx/64 fe80::1/64
Jaromanda X avatar
ru flag
does IPv4 ping work?
milkpirate avatar
gb flag
Ping from where to where? Laptop --ipv4--> nginx will not work, since DC implements NAT. Laptop --ipv4--> Server works fine as well as `curl Server:8080` since nginx does have the port exposed to the host via `-p 8080:80`.
Jaromanda X avatar
ru flag
I must misunderstand your setup ... so, you can't ping using ipv6, but there's no similar router for ipv4?
milkpirate avatar
gb flag
Well yes. But thats not extraordinary. IPv6 and 4 do not have to have the same connectivity. From the Laptop I cant ping4 nginx anyway since its NATed by Docker(-Compose). But IPv4 is out of question here. Why are you asking?
Jaromanda X avatar
ru flag
to see if there's ANY connectivity at all
milkpirate avatar
gb flag
Yes, there is. Outgoing comm. from nginx to e.g. google works fine (thought all layers, 4 and 6).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.