Unable to route container traffic through a VPN container


Recommended Posts

Apologies if this is not in the right place - it's not really specific to one container so didn't seem to fit elsewhere.

 

I have tried a few methods to route traffic for a few of my containers (Radarr, Sonarr) through the Binhex DelugeVPN container. First attempt was by changing the network type in Radarr to None and then adding --net=container:binhex-delugevpn to the extra parameters field; then adding Radarr's port to the Deluge container settings, all as per SpaceInvader's video. I could see via the console that the IP address for Radarr had changed to that of Deluge, but am still unable to get the GUI to show its face.

 

The second attempt was via Privoxy in the DelugeVPN container, again following SpaceInvaders video on this. Both Radarr and Sonarr lose connection with Deluge as soon as I add the Proxy into their respective settings.

 

I am far from an expert on this, and only a few months into my UnRaid journey, so not quite sure what to try next. I have attached diagnostics

themagiceye-diagnostics-20210331-2246.zip

Link to comment

I'm having the same problem. I had it working before 6.9 but ever since I updated, my set up stopped working and I can no longer access the web UIs.

 

Your title might be a little misleading though because the dockers are correctly being routed through the VPN, just the web UIs are not accessible.

 

Edit: I tried reverting to 6.8.3 but the problem persists...

 

Edit2: I tried curling the web gui at different levels starting within the container, from the container its networked to, from host os (unraid), and then from a LAN computer. All worked except the final one. This tells me that perhaps the port is not being opened properly on the right network driver?

 

I should note that I used localhost for each one except for the final one. Using the host os LAN ip from the host os does fail as well.

Edited by voyager12
Curl tracing
Link to comment

Where previously it was possible to use link, I believe the expected way to do this now is to have the containers on the same docker network. You'll have fun trying to get them to talk on something like a macvlan network, so I'd stick to Bridge to keep things simple. 

 

So, sssuming your primary Bridge network is called br0 they would both be on br0. Then, as docker dynamically assigns IPs to the containers when they start, and these local IPs don't always persist, the best thing to do is refer to the containers using the container name as a host name. 

 

Assuming you're trying to get Radarr to route via a binhex-delugevpn's Privoxy:

  1. Make sure both containers are on the same Bridge network so that they can see each other.
  2. Find the container name (Assuming privoxy but it's probably binhex-delugevpn) and port (Assuming 9118 for Socks5)
  3. Visit Radarr's WebUI > Settings > General > check Use Proxy, and enter the details from step 2:
    1516056503_ScreenShot2021-04-07at8_42_35pm.thumb.png.b810c7d9d52d01a05d77307fb115836e.png


You'll want to use the same configuration for the Downloader, etc. as well. There is multiple ways to do this, but this is (I believe) the developers' intended way for users to set up this kind of network.


Once you have it set up that way, the GUI should be visible while Radarr routes it's traffic via Privoxy. It's a similar setup for the other containers mentioned as well. Unless you're trying to use Privoxy as a reverse-proxy and I'm missing something?

 

In case anyone is interested, here's the page in the docs that talks about using --network container:name

 

Edited by lnxd
Link to comment
  • 3 weeks later...
  • 1 year later...

I know this is over a year old thread, but I am just now encountering this same issue as well and I have not yet found a solution. Everything was working fine until a few weeks ago, and now all the containers routed through the VPN seem to be inaccessible.  

I will continue troubleshooting, I am just throwing this out there incase anyone sees it or has any suggestions

 

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.