Hi everyone,
I'm trying to create a docker-compose file with 2 containers, one is a ubuntu container with the Nordvpn VPN on it and the other is a Qbittorrent container. My goal is to use the Qbittorrent container with the VPNcontainer for privacy, but i have a problem. When i activate the VPN on the Nordvpn container, i cannot access the Qbittorrent container with the localhost:8080 url. I tried different methods, but nothing worked for me. I am seeking for help from the community. Any idea will be very appreciated. Here's my docker-compose file.
version: "2"
services:
nordvpn:
image: ubuntu
container_name: nordvpn_test
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun:/dev/net/tun"
privileged: true
tty: true
ports:
# QBT UI Port
- "0.0.0.0:8080:8080/tcp"
# Bittorrent port
- 6881:6881
- 6881:6881/udp
command: /bin/bash
restart: unless-stopped
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent_test
environment:
- PUID=1003
- PGID=1004
#- TZ=America/New_York
#- UMASK_SET=022
#- WEBUI_PORT=8080
volumes:
- /media/dockerdata/qbt/config:/config
- /media/jellyfin/downloads
- /media/jellyfin/movies
- /media/jellyfin/shows
network_mode: service:nordvpn
restart: unless-stopped