Docker Community Forums

Share and learn in the Docker community.

Run multiple NordVPN connections with Docker?

Hi everyone.

I’m looking for a way to achieve this:

  • a client needs to get HTTP access through a proxy
  • the proxy must change its IP frequently (let’s say every 10 seconds)
  • no interruption for the client

The easiest way would be to install NordVPN on the client itself and run a cron job to change the NordVPN server (Spain, Germany, France, etc.). I haven’t tested but I guess there will be few seconds of interruption during the establishment. This isn’t good.

So the idea is: NordVPN offers multiple connections with the same account. I would create several containers on the server, each with a different NordVPN connection.
Then when NordVPN#1 is establishing a new connection and is unrecheable, the client will send a HTTP request to NordVPN#2, etc.

I could also imagine another solution. Instead of having Apache on each container, I would have one unique proxy which is enable to choose which connection to choose (NordVPN#1, NordVPN#2, NordVPN#3). With a script which change the default routing (access list, etc.) ?

What do you think ?

Thank you!

Hmm, i think that i would put Traefik in front, with autodiscover of nordvpn nodes.
then you could have 3 ( or more ) nodes in a pool, and then let your application connect to traefik->nordvpn node.

that way you can maybe script in your nordvpn node, to die when it reaches 10-15sek, then, if you create it as a docker service, docker would spin up a new one, to a random destination country

you would then have a single port to connect though a random place in the world

Hope that makes sense