1

This is an age old problem by looks of searching, but none of the answers seem to help me out. I'm new to VPN's so this has already swallowed several days of research.

I have Ubuntu server 18.04 on a mini pc, running various docker containers with OpenVPN client running on the host, and I access it via web URL's port-forwarded from my router to the host, with OpenVPN down, all works fine. When I bring VPN Tunnel up, all external access is cut off, which from what I read is expected. LAN access works fine (to both the host, and containers running in docker)

So the answer seems to be routing, and I found this :

ip rule add from 192.168.1.90 table 128
ip route add table 128 to 192.168.0.0/16 dev enx00ce39caacd3
ip route add table 128 default via 192.168.1.1

This gives me access to ssh on the host fine, and testing the external IP from console gives me my VPN IP, but none of the docker container URL's work and when I check any of the containers, they have lost their Internet access. I suspect because the docker containers are running in their own range and launching VPN is killing the default routes? So I've been trying to work out how to include the docker to have external VPN access, but allow inbound connections on the host's original public IP?

Pointers gratefully received, this has eaten days already and annoyingly when the box was running the preinstalled Win10 it worked fine :(

IP address for enx00ce39caacd3: 192.168.1.90
IP address for tun0:            172.21.24.45
IP address for br-d3e342478d7c: 172.18.0.1
IP address for br-55176ee6b772: 172.21.0.1
IP address for docker0:         172.17.0.1

Ta!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.