Skip to content

Does this still work? #23

@konsumer

Description

@konsumer

I think I am using it right. I have this in my docker-compose:

  openvpn:
    image: dceschmidt/openvpn-client
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    dns:
      - 8.8.8.8
      - 8.8.4.4
    environment:
      - OPENVPN_PROVIDER=PRIVATEVPN
      - OPENVPN_USERNAME=${VPN_USER}
      - OPENVPN_PASSWORD=${VPN_PASSWORD}
      - OPENVPN_CONFIG=/etc/openvpn/conf/privatevpn/los-angeles-usa.ovpn
      - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
      - LOCAL_NETWORK=172.19.0.0/24
    ports:
      - 8112:8112 # port for deluge

My plan was to use it like this to share the networking with the openvn container:

  deluge:
    image: linuxserver/deluge
    network_mode: service:openvpn

To make sure everything is working, I am starting with openvpn. When it starts, I get no errors, and it seems to be connecting:

docker-compose up openvpn

openvpn_1   | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
openvpn_1   | No SSH host key available. Generating one...
openvpn_1   | Creating SSH2 RSA key; this may take some time ...
openvpn_1   | 2048 SHA256:3HCX8/ncdktLzemHcoCb6x5UDRKH4PQfyc7gsey65cw root@f9d3cd527bfe (RSA)
openvpn_1   | Creating SSH2 DSA key; this may take some time ...
openvpn_1   | 1024 SHA256:tJbstN226OJfsLzpCTmiWIByXUpg5OqCl5oW/PGWiv0 root@f9d3cd527bfe (DSA)
openvpn_1   | Creating SSH2 ECDSA key; this may take some time ...
openvpn_1   | 256 SHA256:jhuwr69NJuPNc0p1iKETWn8p0RyWsImceWb2YBSpQkY root@f9d3cd527bfe (ECDSA)
openvpn_1   | Creating SSH2 ED25519 key; this may take some time ...
openvpn_1   | 256 SHA256:dt8g3GmyOvyMi2di0eaMce2pUuyyt4cgRpfZCQ7ktqc root@f9d3cd527bfe (ED25519)
openvpn_1   | invoke-rc.d: could not determine current runlevel
openvpn_1   | invoke-rc.d: policy-rc.d denied execution of restart.
openvpn_1   | *** Running /etc/my_init.d/10_syslog-ng.init...
openvpn_1   | Jan 22 20:23:33 f9d3cd527bfe syslog-ng[80]: syslog-ng starting up; version='3.5.6'
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe syslog-ng[80]: EOF on control channel, closing connection;
openvpn_1   | *** Running /etc/my_init.d/openvpn-setup.sh...
openvpn_1   | Using OpenVPN provider: PRIVATEVPN
openvpn_1   | Supplied config /etc/openvpn/conf/privatevpn/los-angeles-usa.ovpn.ovpn could not be found.
openvpn_1   | Using default OpenVPN gateway for provider privatevpn
openvpn_1   | Setting OPENVPN credentials...
openvpn_1   | adding route to local network 172.19.0.0/24 via 172.19.0.1 dev eth0
openvpn_1   | *** Running /etc/rc.local...
openvpn_1   | *** Booting runit daemon...
openvpn_1   | *** Runit started as PID 96
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe cron[102]: (CRON) INFO (pidfile fd = 3)
openvpn_1   | Jan 22 20:23:34 f9d3cd527bfe cron[102]: (CRON) INFO (Running @reboot jobs)
openvpn_1   | Wed Jan 22 20:23:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:23:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:23:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:23:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:23:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:23:34 2020 UDPv4 link remote: [AF_INET]91.240.64.20:21003
openvpn_1   | Wed Jan 22 20:24:34 2020 [UNDEF] Inactivity timeout (--ping-exit), exiting
openvpn_1   | Wed Jan 22 20:24:34 2020 SIGTERM[soft,ping-exit] received, process exiting
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Wed Jan 22 20:24:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:24:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:24:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:24:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:24:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:24:34 2020 UDPv4 link remote: [AF_INET]91.240.64.18:21003
openvpn_1   | Wed Jan 22 20:25:34 2020 [UNDEF] Inactivity timeout (--ping-exit), exiting
openvpn_1   | Wed Jan 22 20:25:34 2020 SIGTERM[soft,ping-exit] received, process exiting
openvpn_1   | OpenVPN OPTS: --inactive 3600 --ping 10 --ping-exit 60
openvpn_1   | OpenVPN config: /etc/openvpn/conf/privatevpn/default.ovpn
openvpn_1   | Wed Jan 22 20:25:34 2020 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  9 2019
openvpn_1   | Wed Jan 22 20:25:34 2020 library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
openvpn_1   | Wed Jan 22 20:25:34 2020 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
openvpn_1   | Wed Jan 22 20:25:34 2020 Socket Buffers: R=[212992->212992] S=[212992->212992]
openvpn_1   | Wed Jan 22 20:25:34 2020 UDPv4 link local: [undef]
openvpn_1   | Wed Jan 22 20:25:34 2020 UDPv4 link remote: [AF_INET]91.240.64.20:21003

When I check my remote connection inside the openvpn docker-container I get my real external IP, not the VPN:

docker-compose exec openvpn curl https://vpncheck.now.sh/

What do I need to do to route all traffic in openvpn through the VPN?

Related to #11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions