NordVPN docker image.
This is a NordVPN client docker container that uses nordvpn servers based on location, load and protocol. It makes routing containers' traffic through OpenVPN easy.
See the bin folder for run command examples
important note: The NordVPN use of credentials has recently changed without telling users!
You can find your service credentials by following these steps:
is the base image for all the other containers. It is the fully configured nordvpn client and can be used on its own merit.
The command below would run the nordvpn client with a reload schedule of 30 minutes, on a Dutch server with a max load of 20%. The protocol wanted is idp and the local network is mapped.
docker run \
-it \
--rm \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
--name nordvpn \
-v "$(pwd)/ovpn:/ovpn" \
-v "$(pwd)/creds:/credentials:ro" \
-e LOCATION=nl \
-e MAX_LOAD=20 \
-e RECREATE_VPN_CRON="*/30 * * * *" \
-e NETWORK="$(route -n get default | grep 'gateway' | awk '{print $2}')" \
-e PROTOCOL=udp \
ivonet/nordvpn:latest
Note that this (route -n get default | grep 'gateway' | awk '{print $2}') command is based on a MacOS host system
If you use a *ix based system you might want to change that command to something like ip route | grep -v default | awk '{print $1}'
or ip route | awk '!/ (docker0|br-)/ && /src/ {print $1}'
now you can connect to this container with other containers like this
docker run -ti --rm --net=container:nordvpn YOUR_IMAGE_HERE
For more examples see the bin folder of the source project
With ivonet/nordvpn as the base image for this privoxy image it becomes a proxy server with a vpn connection to proxy through. Very handy if you want a proxy for your browser (use foxy proxy plugin or somesuch) that also removes lots of adds and the like.
Well it is kinda the same as in the nordvpn example but now it also exposes port 8118 to which you can point your proxy to get access to a add blocking proxy running on a vpn.
docker run \
-d \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
--name proxy \
--restart unless-stopped \
-v "$(pwd)/ovpn:/ovpn" \
-v "$(pwd)/creds:/credentials:ro" \
-p 8118:8118 \
-e LOCATION=nl \
-e MAX_LOAD=10 \
-e PROTOCOL=udp \
ivonet/nordvpn-privoxy:latest
Lets go another step further and add tor to it for added privacy.
Now it will run the privoxy proxy over a the tor network over the vpn.
docker run \
-it \
--rm \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
--name proxy \
-v "$(pwd)/ovpn:/ovpn" \
-v "$(pwd)/creds:/credentials:ro" \
-p 8118:8118 \
-p 9500:9500 \
-e MAX_LOAD=10 \
-e LOCATION=nl \
-e PROTOCOL=tcp \
ivonet/nordvpn-tor-privoxy:latest
| Environment Variable | Description |
|---|---|
| USER | Username |
| PASS | Password |
| MAX_LOAD | Only allow servers with a load less then the given percentage. Defaults to 30 |
| LOCATION | Two letter country code to direct the filtering to a specific country |
| SERVER | Specific server name to connect. (e.g. us9957) |
| PROTOCOL | tcp/udp |
| NETWORK | Classless Inter-Domain Routing (IE 192.168.1.0/24), to allows replies once the VPN is up. |
| NETWORK6 | Classless Inter-Domain Routing (IE fe00:d34d:b33f::/64), to allows replies once the VPN is up. |
| URL_OVPN_FILES | endpoint to the NordVPN ovpn files (https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip) |
| API_SERVER_STATS | endpoint to the NordVPN server stats (https://nordvpn.com/api/server/stats) |
| API_SERVER | endpoint to the Api Server of NordVPN (https://nordvpn.com/api/server) |
Please read the Credentials section if you do not want to add the USER/PASS credentials to the commandline.
if you use the -v "$(pwd)/creds:/credentials" option in the run command of one if the images
you need to create a file in this directory called credentials.txt and
give it the following content:
credentials.txt:
USERNAME_HERE
PASSWORD_HERE
The versioning of the images seems very long and convoluted but is quite logical when explained :-) Per image the format will be explained
Format: <major version>.<minor version>
Format: <My nordvpn image version>-<Privoxy version used>
So 1.3-3.0.26 means:
Format: <My nordvpn image version>-<Tor version used>-<Privoxy version used>
So 1.3-0.3.4.11-3.0.26 means:
Content type
Image
Digest
sha256:fb13ed3c1…
Size
27.6 MB
Last updated
over 1 year ago
docker pull ivonet/nordvpn