qdm12 / gluetun

VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
7.34k stars 348 forks source link

Bug: Can not connect to host.docker.internal (external localhost) from service mapped to glueutun #2362

Open adiberk opened 1 month ago

adiberk commented 1 month ago

Is this urgent?

Yes

Host OS

Windows

CPU arch

x86_64

VPN service provider

NordVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

latest (image: qmcgaw/gluetun)

What's the problem 🤔

I have the following service

  random_service:
    container_name: random_service
........
    network_mode: "service:gluetun"

Here is my glueutun service

  gluetun:
    container_name: gluetun
    hostname: gluetun
    image: qmcgaw/gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=openvpn
      - OPENVPN_USER=......
      - OPENVPN_PASSWORD=.....
      - SERVER_COUNTRIES=Switzerland
    ports:
      - "6811:6811"

Everything works fine in terms of access my "random_service" via vpn. However if I try to access external localhost via "host.docker.internal" inside "random_service" I hit an issue as I can't resolve this

Share your logs (at least 10 lines)

No logs in gluetun for this

Share your configuration

No response

github-actions[bot] commented 1 month ago

@qdm12 is more or less the only maintainer of this project and works on it in his free time. Please: