qdm12 / gluetun-wiki

Home to the Markdown Wiki page for Gluetun
MIT License
274 stars 31 forks source link

ping within the gluetun network stack #19

Closed shuntera closed 7 months ago

shuntera commented 8 months ago

Should i be able to ping around the various containers under the network stack for all the service/containers in the same docker compose file.

eg if I have the sonarr service running under gluetun in the same docker-compose file should I be able to perform:

docker exec -it gluetun ping sonarr

and get a result?

all I get right now is "ping: bad address 'sonarr'"

JermellB commented 8 months ago

Funny enough; this is why I integrated traefik into my stack. Realized that I couldn't do this. Most likely a me problem though, I'm not a networking guy.

qdm12 commented 7 months ago

It's because by default DNS over TLS is used to do DNS resolution through the tunnel and then encrypted until i.e. Cloudflare DNS servers. Anyway, you should NOT use the Docker network DNS in Gluetun, since that would mean all DNS traffic would go through it and not through the tunnel at all. I'm working slowly on a solution please subscribe to https://github.com/qdm12/gluetun/issues/281

Finally, you can still ping using the sonarr Docker network ip address, for example docker exec -it gluetun ping 10.0.0.17