Skip to content

A bash scripts that generates Wireguard configuration file for a NordVPN connection.

Notifications You must be signed in to change notification settings

MrYutz/NordVPN-Wireguard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Wireguard configuration file generator for a NordVPN

A bash scripts that generates Wireguard configuration file for a NordVPN connection. NOW WITH MIKROTIK!

INSTALL

This guide assumes the use of Ubuntu. A similar install procedure will work on other distros.

Clone this project

First let's clone this project so that you'll have the script on your target Ubuntu system.

Install required packages

sudo apt install wireguard curl jq net-tools

Install NordVPN client

Execute the following command and follow the on screen instructions:

sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)

Login to your NordVPN account

Use legacy username and password to login.

Note: This will NOT work if you have Multi Factor Authentication enabled. If you have MFA enabled, please disable it, proceed with the login, then re-enable it.

nordvpn login --legacy​

Change protocol to NordLynx

After a successful login, please set NordVPN to use NordLynx protocol.

sudo nordvpn set technology nordlynx

Generate Wireguard configuration files

The script is quite simple and can be run without parameters to generate a config file for the recommended server:

$ ./NordVpnToWireguard.sh
Getting configuration for recommended server...
Wireguard configuration file NordVPN-us1234.conf created successfully!

Requesting a specific country:

$ ./NordVpnToWireguard.sh --country Canada
Getting configuration for recommended server in Canada
Wireguard configuration file NordVPN-ca1234.conf created successfully!

Requesting a specific city

$ ./NordVpnToWireguard.sh --city Berlin
Getting configuration for recommended server in Berlin
Wireguard configuration file NordVPN-de1234.conf created successfully!

Requesting a specific country and city

$ ./NordVpnToWireguard.sh --country Japan --city Tokyo
Getting configuration for recommended server in Japan, city: Tokyo
Wireguard configuration file NordVPN-jp1234.conf created successfully!

Getting help:

$ ./NordVpnToWireguard.sh --help
Usage: NordVpnToWireguard [OPTIONS]
OPTION includes:
   -v | --version  - prints out version information.
   -c | --country  - Country to connect to (ex. Canada). If option is not provided, NordVPN will get a wireguard configuration for the recommended country, unless a valid city name is provided.
   -s | --city - City to connect to (ex. Toronto). When country option is provided, NordVPN will look for the the city within the country and return the fastest server. If no country is provided, NordVPN will look up the fastest server for a city matching the name.
   -h | --help     - displays this message.

Use the generated Wireguard configuration files

Import the file/s with the Wireguard client in any platform and activate the VPN.

About

A bash scripts that generates Wireguard configuration file for a NordVPN connection.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%