Joentje/nordvpn-proxy

Not able to manually select a country

Closed this issue · 12 comments

Docker image is not able to recognize any country codes.

If no country is specified, it does work fine.

But I would like to VPN trough another country (Switzerland), but then I only see this going by in the logs and it doesn't work:

RTNETLINK answers: File exists

2020-04-27 13:33:29 INFO: Privoxy will be started

2020-04-27 13:33:29.105 7fa4fd980d48 Info: Privoxy version 3.0.28

2020-04-27 13:33:29.105 7fa4fd980d48 Info: Program name: privoxy

2020-04-27 13:33:29.105 7fa4fd980d48 Info: Listening on port 8118 on IP address 0.0.0.0

2020-04-27 13:33:33 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:33 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:33 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:33 INFO: Download and extract ovpn files

2020-04-27 13:33:38 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:38 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:38 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:38 INFO: Download and extract ovpn files

2020-04-27 13:33:43 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:43 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:43 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:43 INFO: Download and extract ovpn files

2020-04-27 13:33:48 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:48 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:48 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:48 INFO: Download and extract ovpn files

2020-04-27 13:33:53 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:53 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:53 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:53 INFO: Download and extract ovpn files

2020-04-27 13:33:57 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:33:57 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:33:57 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:33:58 INFO: Download and extract ovpn files

2020-04-27 13:34:02 INFO: OVPN files successfully unzipped to /app/ovpn/config

2020-04-27 13:34:02 INFO: Your country setting will be used. This is set to: CH

2020-04-27 13:34:02 INFO: The country codes are known, skipping

wget: error getting response: Connection reset by peer

2020-04-27 13:34:02 INFO: Download and extract ovpn files

`

Which version are you using of the Docker image?

Can you provide the run command? Just tested it with latest tag, this works fine. The 1.0.1 version does not support COUNTRY. Needs to be in a new release :)

I executed this command today:

docker run -d -ti --cap-add=NET_ADMIN --device=/dev/net/tun --name=nordvpn6 --dns=192.168.0.1 --restart=always --network=physical_network_noproxy --ip=192.168.0.8 -e "USERNAME=" -e "PASSWORD=" -e "PROTOCOL=udp" -e "COUNTRY=ch" -v /etc/localtime:/etc/localtime:ro -v ovpn-data:/app/ovpn/config jeroenslot/nordvpn-proxy:latest

This automatically downlaoded the lastest available image from Docker Hub.

The 1.0.1 version does not support COUNTRY. Needs to be in a new release :)

Is version 1.0.2 the new release? It also doesn't work...

Yes. See the release notes 1.0.2

I've seen the notes, but with the new image I'm still getting the exact same error.

Sorry, closed too fast. Can you sent me the command that you are trying?

After I deleted the old image from my NAS, i executed:

docker run -d -ti --cap-add=NET_ADMIN --device=/dev/net/tun --name=nordvpn4 --hostname=nordvpn4 --dns=192.168.0.194 --restart=unless-stopped --network=physical_network_noproxy --ip=192.168.0.196 -e "USERNAME=yuri@vanleeuwennet.nl" -e "PASSWORD=****" -e "PROTOCOL=udp" -e "COUNTRY=CH" -v /etc/localtime:/etc/localtime:ro -v ovpn-data:/app/ovpn/config -p 8118:8118 jeroenslot/nordvpn-proxy:latest

(Container is joining a MACVLAN network).

If you don't set the environment COUNTRY. Does it then work for you?

Looks like the command: https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:106} gets an Connection reset by peer.

Can you do some debug on network side?

If you don't set the environment COUNTRY. Does it then work for you?

That does work, but that kinda eliminates the reason why I'm using NordVPN.

Yeah I know, but that confirms what doesn't work.

Can you perform this command inside the container?

curl https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:106}

Do you get a JSON with info from the server?

What do you get if you run the command on your NAS?

It can be the case that your DNS is not set to the correct IP.

Shadow@NAS3:/$` sudo curl https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:106}
[1] 4059
Shadow@NAS3:/$
Shadow@NAS3:/$ sudo curl https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22CH%22:106}
[2] 6167
Shadow@NAS3:/$


Sorry, the process id doesn't really help me :). Looks like btw you don't get a response. Looks something on your side.

Can you try to save it to a file, maybe that gives an error.

Looks like you are not performing the command from inside the container?