binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
694 stars 112 forks source link

Everything seems to run fine but I can't access deluge on my local network #114

Closed adrianocr closed 5 years ago

adrianocr commented 5 years ago

My docker compose is the following:

delugevpn:
    ports:
      - '8112:8112'
      - '8118:8118'
      - '58846:58846'
      - '58946:58946'
    container_name: delugevpn
    volumes:
      - '/MediaDownloads:/data'
      - '/home/adriano/container-configs/deluge/config:/config'
      - '/etc/localtime:/etc/localtime:ro'
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=3v6qs...[REST REDACTED]
      - VPN_PASS=bkxccbs...[REST REDACTED]
      - VPN_PROV=custom
      # - VPN_OPTIONS=<additional>
      - STRICT_PORT_FORWARD=yes
      - ENABLE_PRIVOXY=no
      - LAN_NETWORK=192.168.1.1/24
      - NAME_SERVERS=209.222.18.222,84.200.69.80,37.235.1.174,1.1.1.1,209.222.18.218,37.235.1.177,84.200.70.40,1.0.0.1
      - DELUGE_DAEMON_LOG_LEVEL=debug
      - DELUGE_WEB_LOG_LEVEL=debug
      - DEBUG=true
      - UMASK=000
      - PUID=1000
      - PGID=974
    image: binhex/arch-delugevpn
    cap_add:
      - net_admin

which runs fine and portainer says the container is healthy. However, when I try to access 192.168.1.50:8112 (192.168.1.50 is the local IP address of the machine that hosts my docker containers) the connection just times out or browser says it can't reach it.

Here's the container log:

Wed Jun 19 19:19:24 2019 /root/openvpnup.sh tun0 1500 1557 10.199.0.74 10.199.0.73 init,
,
2019-06-19 19:19:24,311 DEBG 'start-script' stdout output:,
[debug] Waiting for valid IP address from tunnel...,
,
2019-06-19 19:19:24,311 DEBG 'start-script' stdout output:,
[debug] Waiting for valid IP address from tunnel...,
,
2019-06-19 19:19:24,347 DEBG 'watchdog-script' stdout output:,
[debug] Valid IP address from tunnel acquired '10.199.0.74',
[info] Deluge listening interface IP 0.0.0.0 and VPN provider IP 10.199.0.74 different, marking for reconfigure,
,
2019-06-19 19:19:24,350 DEBG 'watchdog-script' stdout output:,
[info] Deluge not running,
,
2019-06-19 19:19:24,353 DEBG 'watchdog-script' stdout output:,
[info] Deluge Web UI not running,
,
2019-06-19 19:19:24,425 DEBG 'start-script' stdout output:,
[debug] Valid IP address from tunnel acquired '10.199.0.74',
,
2019-06-19 19:19:24,426 DEBG 'start-script' stdout output:,
[debug] Valid IP address from tunnel acquired '10.199.0.74',
,
2019-06-19 19:19:24,426 DEBG 'start-script' stdout output:,
[debug] Attempting to get external IP using Name Server 'ns1.google.com'...,
,
2019-06-19 19:19:24,426 DEBG 'start-script' stdout output:,
[debug] VPN provider custom is != pia, skipping incoming port assignment,
,
2019-06-19 19:19:24,428 DEBG 'start-script' stdout output:,
Error: could not find any address for the name: `ns1.google.com',
,
2019-06-19 19:19:24,431 DEBG 'start-script' stdout output:,
[debug] Failed to get external IP using Name Server 'ns1.google.com', trying 'resolver1.opendns.com'...,
,
2019-06-19 19:19:24,433 DEBG 'start-script' stdout output:,
Error: could not find any address for the name: `resolver1.opendns.com',
,
2019-06-19 19:19:24,433 DEBG 'start-script' stdout output:,
[debug] Valid IP address from tunnel acquired '10.199.0.74',
,
2019-06-19 19:19:24,436 DEBG 'start-script' stdout output:,
[debug] Failed to get external IP using Name Server 'resolver1.opendns.com', trying 'http://checkip.amazonaws.com'...,
,
2019-06-19 19:19:24,443 DEBG 'start-script' stdout output:,
[debug] Failed to get external IP using Web Server 'http://checkip.amazonaws.com', trying 'http://whatismyip.akamai.com'...,
,
2019-06-19 19:19:24,450 DEBG 'start-script' stdout output:,
[debug] Failed to get external IP using Web Server 'http://whatismyip.akamai.com', trying 'https://showextip.azurewebsites.net'...,
,
2019-06-19 19:19:24,457 DEBG 'start-script' stdout output:,
[debug] Failed to get external IP using Web Server 'https://showextip.azurewebsites.net',
[warn] Cannot determine external IP address, exhausted retries setting to lo '127.0.0.1',
,
2019-06-19 19:19:24,556 DEBG 'watchdog-script' stdout output:,
[debug] External IP address from tunnel is '127.0.0.1',
,
2019-06-19 19:19:24,557 DEBG 'watchdog-script' stdout output:,
[info] Attempting to start Deluge...,
[info] Removing deluge pid file (if it exists)...,
,
2019-06-19 19:19:24,707 DEBG 'watchdog-script' stdout output:,
[warn] Deluge config file /config/core.conf does not contain valid data, exiting Python script config_deluge.py...,
,
2019-06-19 19:19:24,975 DEBG 'watchdog-script' stdout output:,
[info] Deluge process started,
[info] Waiting for Deluge process to start listening on port 58846...,
,
2019-06-19 19:19:25,407 DEBG 'watchdog-script' stdout output:,
[info] Deluge process listening on port 58846,
,
2019-06-19 19:19:26,307 DEBG 'start-script' stdout output:,
Wed Jun 19 19:19:26 2019 /usr/bin/ip route add 104.238.59.14/32 via 172.19.0.1,
,
2019-06-19 19:19:26,308 DEBG 'start-script' stdout output:,
Wed Jun 19 19:19:26 2019 /usr/bin/ip route add 0.0.0.0/1 via 10.199.0.73,
,
2019-06-19 19:19:26,309 DEBG 'start-script' stdout output:,
Wed Jun 19 19:19:26 2019 /usr/bin/ip route add 128.0.0.0/1 via 10.199.0.73,
,
2019-06-19 19:19:26,310 DEBG 'start-script' stdout output:,
Wed Jun 19 19:19:26 2019 /usr/bin/ip route add 10.199.0.1/32 via 10.199.0.73,
,
2019-06-19 19:19:26,311 DEBG 'start-script' stdout output:,
Wed Jun 19 19:19:26 2019 Initialization Sequence Completed,
,
2019-06-19 19:19:28,084 DEBG 'watchdog-script' stdout output:,
[info] No torrents with state 'Error' found,
,
2019-06-19 19:19:28,084 DEBG 'watchdog-script' stdout output:,
[info] Starting Deluge Web UI...,
,
2019-06-19 19:19:28,084 DEBG 'watchdog-script' stdout output:,
[info] Deluge Web UI started,
,
2019-06-19 19:19:28,084 DEBG 'watchdog-script' stdout output:,
[debug] VPN IP is 10.199.0.74,
[debug] Deluge IP is 10.199.0.74,
,

My VPN is expressvpn if that matters.

adrianocr commented 5 years ago

I had my LAN network range wrong. Anyone coming across this in the future, google "ip range calculator" to get your correct address.

mystery76 commented 2 years ago

Hi there - I'm having the same problem, did you calculate the ip range based on the device (ethernet) or docker ip address?

binhex commented 2 years ago

Q4 if you are struggling:- https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

veraciousnottaken commented 2 years ago

For future readers, for NordVPN you must use Split tunneling, otherwise Client can't connect.