Docker Community Forums

Share and learn in the Docker community.

VPN and OUTSIDE host?

Good evening everyone.
I’ll explain my problem to you, I installed ruTorrrent via docker and its traffic goes through a VPN, but the UI is only accessible locally and I can’t get enough from the outside.
I want to tell you that as soon as I remove it from the VPN, I have enough outside.
I show you my docker-compose:

`version: '3'

networks:
  traefik:
    external: true
services :
  vpn:
    container_name: vpn
    image: azinchen/nordvpn:latest
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    environment:
      - USER=XXXXX
      - PASS=XXXX
      - COUNTRY=France
      - GROUP=P2P
      #- GROUP=Standard VPN servers
      - RANDOM_TOP=10
      - RECREATE_VPN_CRON=5 */3 * * *
      - NETWORK=192.168.1.0/24 #;192.168.2.0/24
      - OPENVPN_OPTS=--mute-replay-warnings
    ports:
      - 1401:80
      - 5000:5000
      - 51413:51413
      - 6881:6881/udp
    restart: unless-stopped

  rutorrent:
    image: ghcr.io/linuxserver/rutorrent
    container_name: rutorrent
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /opt/rutorrent:/config
      - /media/data:/downloads
    restart: unless-stopped
    network_mode: service:vpn
    depends_on:
      - vpn`

If anyone ever has an idea how to do it, I would be happy to take it :smiley:
Thanks in advance !

As far as I can judge (I have no idea wether the ports, volumes or environments make sense) the configuration has everything set right to put another container into the network namespace of another service’s container that acts as an openvpn client.

The only thing that doesn’t make sense, but at the same time is irrelvant for your issue, is that the external traefik network is declared, but not used.

Is nordvpn a vpn provider? If so, may I suggest to make a post in their forum? I assume you are more likely to find others that use a docker container to login into nordvpn, then find regular users here that use it.