Docker Community Forums

Share and learn in the Docker community.

Newbie questions: bridging containers & exposing ports


I am very new to docker and need some input.

I have a VPN container that connects to a VPN provider then serves this up via SOCKS5. Specifically kizzx2/openvpn-client-socks. When I connect a browser to the proxy, the speeds are fine. But other applications such as Deluge suffer massive speed drops. Pulling in a known good torrent (like a Linux ISO) is painfully slow, yet the browser remains fast - ie it’s not a VPN slow down. I suspect this is a port issue. My next thought was to fire up a conainter with Deluge in it (linuxserver/deluge), using the —network=container:vpn flag, but that means I cannot use the -p option. Someone suggested I recreate the VPN container exposing not only the SOCKS port, but also the Deluge ports - then recreate Deluge again.

Sure enough, I can access 8112 on the host and gain access to the Deluge web UI. The IP at the bottom of the web UI confirms it is going through the VPN, and speeds are as expected.

However, various applications on the host that would usually communicate with the Deluge daemon are now unable to do so, logging errors about SOCKS - so this all wreaks of a really bad setup.

How do I: get the Deluge container to run it’s outgoing net solely through the VPN container whilst exposing the two ports 8112 and 58846 to the host so that other applications on the host may communicate with it?

I’m really only just getting started with docker and reading the user defined bridge articles only confused me more. I think I need more info than my self thought 24hr crash course has been able to provide :slight_smile:

Any help greatly appreciated.

Anyone? Is what I am after even doable?

Ok well thanks! :face_with_raised_eyebrow: