Docker Community Forums

Share and learn in the Docker community.

Port Access to Containers Behind VPN

Hey Guys,

Currently have multiple containers operating through a VPN container.

Containers are accessible from there respective ports via localhost, and but are not accessible from IP address of machine or from other machines in the network.

What i have found:

  • Ports don’t appear listening on the host
  • made sure that Ubuntu ufw has the required ports allowed
  • all containers are accessible on local and IP when not situated behind the VPNcontainer
  • tried ssh tunnel from IP to localhost but didn’t seem to work.

docker create

linked containers are linked to VPN through --net=container:surfsharkVPN

I’m guessing its got something to do with the docker eth bridge or the VPNcontainers IP routing.
Is there a way to route say 8080 directly through from host -> VPNcontainer -> container.
bind the ip to direct port traffic to