September 1, 20169 yr I've been struggling with OpenVPN routing for last couple of days. Hopefully someone can help me get this sorted. I have a Docker container with network set to bridge. At first, I'm able to reach this container from my local network (192.168.1.0/24). But, the moment I start OpenVPN and initiate a VPN connection the container is no longer reachable from the local network. However, the container remains accessible from the host unRAID OS. Which is what's confusing me. Before initiating the VPN connection the IP route inside of the container appears as following: bash-4.3# ip route default via 172.17.0.1 dev eth0 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2 Once the VPN gets connected, OpenVPN modifies the IP routes to: bash-4.3# ip route 0.0.0.0/1 via 10.108.21.1 dev tun0 default via 172.17.0.1 dev eth0 10.108.21.0/24 dev tun0 proto kernel scope link src 10.108.21.40 128.0.0.0/1 via 10.108.21.1 dev tun0 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2 178.255.153.76 via 172.17.0.1 dev eth0 What routes should I be adding to allow any computer on my local network to communicate with the Docker container while the VPN is active? Or is there something else breaking this? Using UnRAID 6.2 RC4
September 1, 20169 yr Hi, If you are using my OpenVPN server plugin and have/using default settings alla computer / IP addresses on LAN is accessible trough VPN connection. BR Peter
September 1, 20169 yr Author Hi, If you are using my OpenVPN server plugin and have/using default settings alla computer / IP addresses on LAN is accessible trough VPN connection. BR Peter Thanks for the reply. Well, I forgot to add this. I'm using a custom docker image I created. Additionally, it's an OpenVPN client connecting to a VPN server.
September 1, 20169 yr Author Finally, got the issue resolved by adding IP route inside of the container. In all my attempts earlier I was using the wrong gateway. Here's the correct route: ip route add 192.168.1.0/24 via 172.17.0.1 Dev eth0 The IP after "via" is the gateway and that needs to be the container gateway. Docker sets this automatically when creating a virtual Ethernet bridge.
Archived
This topic is now archived and is closed to further replies.