Joentje / nordvpn-proxy

Use NordVPN in your Docker stack
141 stars 53 forks source link




Alpine with OpenVPN and Privoxy to use your NordVPN account.

Features

Prerequisite

You will need a NordVPN account.

Environment Variables

Start container

docker run -d \
--cap-add=NET_ADMIN \
--name=vpn \
--dns=103.86.96.100 \
--dns=103.86.99.100 \
--restart=always \
-e "USERNAME=<nordvpn_username>" \
-e "PASSWORD=<nordvpn_password>" \
-e "LOCAL_NETWORK=192.168.1.0/24" \
-v /etc/localtime:/etc/localtime:ro \
-v ovpn-data:/app/ovpn/config \
-p 8118:8118 \
jeroenslot/nordvpn-proxy:latest 

Now you can connect other containers to use this connection:

For example:

docker run -d \
--network="container:vpn" \
imagename 

For more info on networking, check the Docker docs

Docker-compose

You can use the docker-compose.yml example for you own setup. Change the environment variables!

Start the vpn proxy using:

docker-compose up -d

For more info on networking, check the Docker docs

Use Privoxy in your browser

To connect to the VPN Proxy, set your browser proxy to ip.where.docker.runs:8118.

For Chrome you can use:

Picking a random server

To ensure that a new random server is picked during each iteration of CRON, set the following variables. Note that the higher you set RANDOM_TOP, the more random the pick will be.

LOAD=0
RANDOM_TOP=100

Contribution

Feel free to fork and contribute, or submit an issue.