1

I have Windows OpenVPN server running at 10.8.0.1.

I start WSL and inside WSL2 (Ubuntu) I run docker image via:

docker run --gpus all --privileged -p 1777:1777 -p 1778:1778 --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v/mnt/d/data:/mnt nvcr.io/nvidia/pytorch:23.06-py3

Inside docker, I install network tools and OpenVPN via:

apt update

apt -y install net-tools
apt -y install netcat
apt -y install iputils-ping
apt -y install iproute2
apt -y install iptables
apt -y install traceroute

apt -y install OpenVPN 

Now I mount to /mnt to and run

openvpn --config client.ovpn

client.ovpn is:

client

dev tun
proto udp4
remote a.b.c.d 1194
resolv-retry infinite
nobind
persist-key
persist-tun

ca ca.crt
cert Client1.crt
key Client1.key    
remote-cert-tls server

cipher AES-256-GCM
comp-lzo
verb 3

(certificates are in the same directory as client.ovpn)

I think that connection is established since if I do ifconfig, I can see:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.15.1.1  netmask 255.255.255.0  broadcast 172.15.1.255
        ether 02:42:ac:0f:01:01  txqueuelen 0  (Ethernet)
        RX packets 22289  bytes 30846027 (30.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10953  bytes 734146 (734.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.0.2  netmask 255.255.255.0  destination 10.8.0.2
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and in Windows OpenVPN server, I can see something like this:

Wed Aug  2 16:01:44 2023 Client1/a.b.c.d:56907 MULTI: Learn: 10.8.0.2 -> Client1/a.b.c.d:56907
Wed Aug  2 16:01:44 2023 Client1/a.b.c.d:56907 MULTI: primary virtual IP for Client1/a.b.c.d:56907: 10.8.0.2

However, when I do ping 10.8.0.1 from within the docker, I cannot ping the server or any other connected client.

What am I missing?

Martin Perry
  • 9,232
  • 8
  • 46
  • 114

0 Answers0