Jump to content
Not connected, Your IP: 216.73.217.99
Sign in to follow this  
illuvattar

Proper way to set up AirVPN wireguard with portforwarding in a docker with gluetun on NAS

Recommended Posts

I'm using deluge with gluetun in a stacked docker configuration on my synology NAS, through wireguard VPN provided by AirVPN. In Airvpn I have set port 19652 to be forwarded.

How do I properly configure my docker and my router so portforwarding is working correctly? Do I need any extra environment variables added to the docker stack? Or any settings in my ASUS router?

I'm currently using this docker compose code and I have port 19652 set up as incoming port in deluge settings.

version: "3.5"
services:
  vpn:
    image: qmcgaw/gluetun:latest
    container_name: gluetun-wireguard
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=xxxxxxxxxx
      - WIREGUARD_PRESHARED_KEY=xxxxxxxx
      - WIREGUARD_ADDRESSES=10.134.169.210/32,fd7d:76ee:e68f:a993:3bc0:be52:7268:f4b0/128
      - SERVER_COUNTRIES=Netherlands
    ports:
      - 8112:8112/tcp
      - 19652:19652/tcp
      - 19652:19652/udp
  deluge:
    image: lscr.io/linuxserver/deluge:latest
    container_name: deluge
    network_mode: "service:vpn"
    environment:
      - PUID=1027
      - PGID=100
      - TZ=Europe/Amsterdam
      - DELUGE_LOGLEVEL=error #optional
    volumes:
      - /volume1/docker/deluge:/config
      - /volume1/video/downloads:/video/downloads
    restart: always

Share this post


Link to post
Posted ... (edited)

Have you fixed this?

You have to mount a volume on your gluetun container, create a gluetun folder on your docker folder, working compose ahead:
 

version: "3"
services:
  gluetun:
    image: qmcgaw/gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    volumes:
      - /volume1/docker/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=airvpn
      - VPN_TYPE=wireguard
      - WIREGUARD_PRIVATE_KEY=xxxxxxxxxx
      - WIREGUARD_PRESHARED_KEY=xxxxxxxx
      - WIREGUARD_ADDRESSES=10.134.169.210/32
      - SERVER_COUNTRIES=Netherlands
      - TZ=Europe/Netherlands
      - FIREWALL_VPN_INPUT_PORTS=xxxxx # your port 
      - UPDATER_PERIOD=24h
    ports:
      - 8112:8112/tcp
      - 19652:19652/tcp
      - 19652:19652/udp
  deluge:
    image: lscr.io/linuxserver/deluge:latest
    container_name: deluge
    network_mode: "service:gluetun"
    environment:
      - PUID=1027
      - PGID=100
      - TZ=Europe/Amsterdam
    volumes:
      - /volume1/docker/deluge:/config
      - /volume1/video/downloads:/video/downloads
    restart: always
Edited ... by Miguel Sousa

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...