Jump to content

[Version: 6.12.6] Multiple docker networks with VPN


Recommended Posts

I am using several containers with a VPN (wireguard) server to mask my public IP. This works great. However i wanted to add a reverse proxy to my setup and stumbled across using container names to configure this. Sounds good. But some containers use wg0 network and others use a different network. I have tried adding a second network with

docker network connect my-net my-nginx

That does work the containers can now ping each other on their container name. However it no longer uses the VPN server's IP for outgoing connections.

 

Is there a way to use 2 docker networks together but still have the VPN IP address as the public IP of that container?

So for example:

nzbget uses both wg0 and <customerdockernetwork> as its network while routing traffic over the VPN and using the external IP of the VPN.

After hours of fiddling tweaking and reading posts and watching youtube i am stuck on this. Hope someone can point me in the right direction

Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...