Docker Container VPN Network Support


Recommended Posts

I'm interested in this feature and I think I see how it works. I have a VPN container (named piavpn) and a qBittorrent container that uses the VPN container network stack.  I achieve this by setting the container network to "none" and then in the extra parameters field, I have 

--net=container:piavpn

In the past, if I would upgrade my VPN container, the download container would cease to work as the container had bound itself to the previous "piavpn" container by the hex Container ID, not by name. I would have to delete and recreate my downloader container, which would also fail because there were two conflicting --net options (i.e. --net=none and --net=container:piavpn). I would previously copy the container create command, remove the --net=none argument, and then rerun the resulting command on the unraid console.

With this new feature, things seem to work seamlessly.  When I upgraded my VPN container, Unraid recognized the dependency my downloader container had, briefly had a status of "Repairing" , and continued to work.  Similarly, when upgrade the downloader, Unraid seems to resolve the conflicting --net arguments on its own, preferring the one I had set in Extra Parameters.

Thanks Unraid devs!

Link to comment
1 minute ago, tankertux said:

I'm interested in this feature and I think I see how it works. I have a VPN container (named piavpn) and a qBittorrent container that uses the VPN container network stack.  I achieve this by setting the container network to "none" and then in the extra parameters field, I have 


--net=container:piavpn

In the past, if I would upgrade my VPN container, the download container would cease to work as the container had bound itself to the previous "piavpn" container by the hex Container ID, not by name. I would have to delete and recreate my downloader container, which would also fail because there were two conflicting --net options (i.e. --net=none and --net=container:piavpn). I would previously copy the container create command, remove the --net=none argument, and then rerun the resulting command on the unraid console.

With this new feature, things seem to work seamlessly.  When I upgraded my VPN container, Unraid recognized the dependency my downloader container had, briefly had a status of "Repairing" , and continued to work.  Similarly, when upgrade the downloader, Unraid seems to resolve the conflicting --net arguments on its own, preferring the one I had set in Extra Parameters.

Thanks Unraid devs!

How did you setup your pia vpn docker. I have one setup but when i connect my other docker to my piavpn docker it can not connect. I have all the correct ports set on pia vpn docker too. Maybe a screenshot of how your pia docker is setup.

 

This is one Im trying to use. 

 

image.thumb.png.b897be1eab525c36df7b4b1f81b25c42.png

Link to comment

I am using qmcgaw/private-internet-access on a user defined network I named pianet

 

My settings: 

1624528396_pianetsettings.png.d7a7e343505bebd08e00ca3284a7b6b6.png

 

Advanced setting that is important:
815527646_pianetadv.png.8b1f87aa1aa698d046251e1147753dc4.png

 

 

Downloader uses the --net=container:piavpn option, and then I use Nginx to route a host port into the downloader web GUI.

 

Nginx Basic config:

103674356_nginxbasic.thumb.png.91408c677559fb6521fdd7f1f2b471b6.png

 

Nginx Advanced View parameters:

1868986668_nginxadvanced.thumb.png.1d6320ba9e4f89df1761e9af55badfff.png

 

Nginx.conf:
425806187_nginxconf.png.977cebe4cda65e362f2299729e6796c6.png

  • Thanks 1
Link to comment
  • 2 weeks later...

I'm looking at installing openvpn client but only force 1 docker to use it (example torrents) without applying the VPN on my whole network. Possible?

 

I did have it on my pfsense router, but it would severely impact my downloads throughout my entire network. 

 

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.