Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Not able to connect to other service using service name #1820

Closed
navilg opened this issue Aug 26, 2023 · 1 comment
Closed

Bug: Not able to connect to other service using service name #1820

navilg opened this issue Aug 26, 2023 · 1 comment

Comments

@navilg
Copy link

navilg commented Aug 26, 2023

Is this urgent?

Yes

Host OS

Ubuntu 22.04

CPU arch

aarch64

VPN service provider

ProtonVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

v3.35.0

What's the problem 🤔

I have a docker compose file with 3 services. One is vpn service using gluetun, another is radarr and third is prowlarr.

vpn service is using docker network my_network.
prowlarr is behind vpn using network_mode: service:vpn.
radarr is not behind VPN and using network my_network.

I am able to reach out to prowlarr from radarr container using url http://vpn:portofprowlarr
But when I try to reach out to radarr from prowlarr container using url http://radarr:portofservice3, It fails to reach.

is there anyway to solve this ? Seems like container behind VPN is not able to connect to container which is not behind VPN.

Share your logs

NA
Will share post initial conversation

Share your configuration

version: "3.9"
name: media-stack
services:
  vpn:
    container_name: vpn
    image: qmcgaw/gluetun:v3.35.0
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER:-protonvpn}
      - OPENVPN_USER=${OPENVPN_USER:-""}
      - OPENVPN_PASSWORD=${OPENVPN_PASSWORD:-""}
      - SERVER_COUNTRIES=${SERVER_COUNTRIES:-Netherlands}
    networks:
      - mynetwork
    ports:
    # prowlarr ports
      - 9696:9696
    restart: "unless-stopped"
  radarr:
    container_name: radarr
    image: lscr.io/linuxserver/radarr:4.7.5
    networks:
      - mynetwork
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    ports:
      - 7878:7878
    volumes:
      - radarr-config:/config
    restart: "unless-stopped"
  prowlarr:
    container_name: prowlarr
    image: linuxserver/prowlarr:1.6.3
    depends_on:               
      - vpn                   
    network_mode: service:vpn 
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - prowlarr-config:/config
    restart: unless-stopped

volumes:
  radarr-config:
  prowlarr-config:

networks:
  mynetwork:
    external: true
@qdm12
Copy link
Owner

qdm12 commented Sep 15, 2023

This is sort of by design, because the DNS goes through the VPN only, and does not use the Docker DNS (or DNS traffic would leak out the VPN). You can use ip addresses to reach out from a container behind Gluetun to another container in the same docker network as Gluetun.

You can also subscribe to #137 which may resolve this, by exclusively forwarding requests for names without a dot to the Docker DNS, and send the rest of the traffic through the VPN.

@qdm12 qdm12 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants