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.

Isolating dockers with vpn gateway

Featured Replies

Hello :)
So how do you really set up this correct?
So I have an Unraid server with div dockers and I have another lab offsite, and I want some containers to be connected to their own isolated network with 1 OpenVPN container connected to the other site and the isolated containers to only be able to talk to the outside though the OpenVPN container.

Even it is an option, I don't want the entire Unraid server to be connected to the other site though VPN.

I have tried to set up this by setting the container network to "none" and use the parameter "--net=container:OpenVPNContainer", and it works, but the problem with this solution is that if you setup more than one identical container, say an web-server, even if I change the ports on the 2nd one, it wont work, and I think this has to do with that with this solution, the containers share the same IP

I know you can setup different docker network types others than the bridged, host and none, and its easy enough to setup an isolated network where each container inside has their own IP on an isolated subnet, and I can get them to talk to each other on the Unraid server, but how to I route them though the VPN container? Do the VPN container need to be connected to 2networks at once?
(I read this is possible with newer versions of Docker)

I guess there is some routing and config here I miss.
If this was multiply physical computers or even VMs, I would have less problems setting this up, I would just put 2NICs on the VPN server.

(not sure if I posed this in the right forum :S)

  • Author

So after a lot of searching I tried the following:
-create 2 new custom docker networks, vpnwan and vpnlan where vpnlan has the --internal=true flag on

-connect the vpn container to both networks and set the LAN side on the vpn to be vpnlan subnet

-connect another docker to vpnlan only

 

Result is that I cant access the vpnlan docker from outside and though the vpn :(

I tried the same thing with an proxy network, so I have a reverse proxy server connected to 2 networks, one --internal=true, and I get it to work there, so I know it should work, but I guess there is some routing or something openvpn may change that makes it not to work.

 

 

edit: got it to work! I had forgot to add the port for the container  in the vpn container correct.

Edited by isvein
got it to work!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.