Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Container unreachable with VPN running

Featured Replies

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

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

  • 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.

  • 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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.