wfg / docker-openvpn-client

OpenVPN client with killswitch and proxy servers; built on Alpine
MIT License
353 stars 107 forks source link

VPN not working even if no error in log #47

Closed the-hotmann closed 2 years ago

the-hotmann commented 2 years ago

it worked on my NAS, but the same docker-compose does not work on my dedicated server. When I run the test, this is the output.

$ wget -qO - ifconfig.me
wget: bad address 'ifconfig.me'

Everything good in the log, ends with:

2022-02-10 19:27:12 Initialization Sequence Completed

my docker-compose.yml:

version: "3.8"
services:
  vpn:
    image: ghcr.io/wfg/openvpn-client
    container_name: vpn
    privileged: true
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    environment:
      - KILL_SWITCH=on
      - VPN_CONFIG_FILE=nl-24.ovpn
    volumes:
      - "/var/www/vhosts/domain.tld/config/vpn/:/data/vpn"
    ports:
      - "8080:8080"
    restart: unless-stopped
wfg commented 2 years ago

Are you able to ping 8.8.8.8 from inside the VPN container? If so, it's a DNS problem, not network connectivity.

the-hotmann commented 2 years ago

Sorry I changed the VPN provider, now it's working, even if both are working outside this container. Ping and wget test are both working now.

But containers behind the VPN are still not reachable, even if I use ports in the vpns docker-compose to basically bypass the whole container.

Will close this issue and create another one.