Coder Social home page Coder Social logo

nordvpn-wireguard's People

Contributors

sfiorini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nordvpn-wireguard's Issues

9: Syntax error: newline unexpected

Hi,

No mater what argument I am using, when running the script (ex. $ ./NordVpnToWireguard.sh --city Berlin) I receive the following error: 9: Syntax error: newline unexpected

Can you please help?

Thank you very much!

network fail after launching the script

Hi Stefano,
First, let me thank you for the good work you've done here.
Unfortunately, once in a while, the script screws my network configuration. From then, I'm not able to connect nor the lan or the internet from the computer that launched the script.
Have you an idea on how to get a good network configuration back ?
Regards
Frédéric Severino

Peer.txt is empty

Hi I think something goes wrong with your script, I removed de "rm Peer.txt" to get some more info but if I then look at the Peer.txt file it's empty.
Is it my machine that has this problem now or is it something that doesn't work for everybody anymore?
Thanks for your time/help
Kay

group option generate false config

Hi and thanks for this great job, i have a strange behavior, if i generate a conf with -g onion server option the script create a wrong .conf file. Any help are appreciated

Exported Config cannot be read by qbittorentvpn

Hey, I don't know if the Issue comes from the config file or the qbittorrentvpn image b
ut I get this error message when I want to use the generated config:

[cont-init.d] 02-vpn.sh: executing... 
2023-01-17 09:12:12 [INFO] Choosen VPN config: 'NordVPN-.conf'
dos2unix: converting file /config/wireguard/NordVPN-.conf to Unix format...
2023-01-17 09:12:12 [INFO] VPN remote line defined as ':51820'
2023-01-17 09:12:12 [ERROR] VPN_REMOTE not found in /config/wireguard/NordVPN-.conf, exiting...
[cont-init.d] 02-vpn.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[Interface]
PrivateKey = censored
ListenPort = 51820
Address = /32
DNS = censored, censored

[Peer]
PublicKey = 
AllowedIPs = 0.0.0.0/0
Endpoint = :51820
PersistentKeepalive = 25

I don't know how a wireguard config should look like but according to the logs im missing an IP adress in front of the port?
Is this an issue with the generator or the docker image I want to put the config in?

Thanks for your replies!

Won't generate a config for anything other than the local "recommended" server

While you connect to the specified country when you run the nordvpn c $COUNTRY $CITY to get the private key and local address information, the API call you make using curl where you get the hostname and public key for the server doesn't specify the specific server you connected to in the proper country. So you should either edit your curl call to specify the same server as you connect to with nordvpn, or modify the curl call to get the server info (adding the country/city specification to the API call) and then connect to that host with nordvpn to get the private key and IP information. Or you could do something like this while connected to get the endpoint name and public key (leaving no reason to make the API call in curl):

ENDPOINT=$(nordvpn status | grep 'Current server' | awk '{print $3}')
PUBKEY=$(sudo wg show nordlynx public-key)

For client connections I would recommend removing the PersistentKeepAlive option as you only need it if you want the server to be able to arbitrarily reach you, or hosts on the server side to be able to reach you. It defeats the "keep quiet unless needed" security benefit of wireguard.

You could also make your script much easier to follow (and in the event of an error less likely to overwrite a good configuration file with a partially generated configuration file) by doing something like this at the end to write the file:

cat <<EOF > wg0.conf
#config for ${INFO}
[Interface]
Address = ${MYIP}
PrivateKey = ${PRIVATE}
ListenPort = 51820
DNS = 103.86.96.100, 103.86.99.100

[Peer]
PublicKey = ${PUBKEY}
AllowedIPs = 0.0.0.0/0, ::0/0
Endpoint = ${ENDPOINT}:51820
EOF

-bash: ./NordVpnToWireguard.sh: No such file or directory

i am not much of a raspberry expert can you help with permissions

hogwarts@raspberrypi:/.scrypted $ nordvpn login Howarts xxxxx --legacy
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /run/nordvpn/nordvpnd.sock: connect: permission denied"
-Whoops! Permission denied accessing /run/nordvpn/nordvpnd.sock
Run 'usermod -aG nordvpn $USER' to fix this issue and log out of OS afterwards for this to take an effect.
hogwarts@raspberrypi:
/.scrypted $ usermod -aG nordvpn hogwarts
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
hogwarts@raspberrypi:~/.scrypted $ ^C

config file does not get peer details

root@ubuntu-nordvpn-fetch:/NordVPN-Wireguard# ./NordVpnToWireguard.sh
Getting configuration for recommended server...
Wireguard configuration file NordVPN-.conf created successfully!
root@ubuntu-nordvpn-fetch:
/NordVPN-Wireguard#
root@ubuntu-nordvpn-fetch:~/NordVPN-Wireguard# cat NordVPN-.conf
[Interface]
PrivateKey = ********************************+xb/NI3Rf4G0=
ListenPort = 51820
Address = 10.5.0.2/32
DNS = 103.86.96.100, 103.86.99.100

[Peer]
PublicKey =
AllowedIPs = 0.0.0.0/0
Endpoint = :51820
PersistentKeepalive = 25
root@ubuntu-nordvpn-fetch:~/NordVPN-Wireguard#

Add --group argument to script

This is fantastic, thank you.

Is it possible to add an addition so that I can select the different category of servers?

In my nordvpn app I can select groups like this: nordvpn groups

So I was thinking we could add the --group arg to this script, so it would would additionally filter the output, e.g. NordVpnToWireguard -c US -g P2P

Africa_The_Middle_East_And_India
Onion_Over_VPN
Asia_Pacific
P2P
Double_VPN
Standard_VPN_Servers
Europe
The_Americas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.