wfg / docker-openvpn-client

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

Access between two VPN instance #73

Open xky0007 opened 2 years ago

xky0007 commented 2 years ago

Since the last issue was closed, I created this issue.

Basically, I have two openVPN instances running. One instance is running on the Windows and its IP is 10.16.0.2. The other was created in a cloud server with docker-compose and openVPN IP is 10.16.0.1. How can I access the nginx default page via 10.16.0.1:8001.

Thanks.:D

version: '3'
services:
  openvpn-client:
    image: ghcr.io/wfg/openvpn-client
    container_name: openvpn-client
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    volumes:
      - /home/ubuntu/open-vpn docker/config:/data/vpn 
    restart: unless-stopped
    ports:
    - "8001:80"
    environment:
    - KILL_SWITCH=off

  nginx:
    image: nginx
    container_name: nginx_test
    network_mode: service:openvpn-client

image

https://github.com/wfg/docker-openvpn-client/issues/71#issuecomment-1175818532