Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
/ nordvpn_connect Public archive

Ease the connection process to NordVPN using openvpn

License

Notifications You must be signed in to change notification settings

kriths/nordvpn_connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nordvpn_connect

Save some time importing .ovpn to the network manager and entering credentials whenever you want to connect to a NordVPN network. This script will automatically connect you to Nord's recommended connection.

Requirements

  • python3
  • openvpn
  • nordvpn account

Setup

Alias

For ease of use, add the script to your .bash_alias:

alias vpn='sudo /path/to/git/nordvpn_connect/connect.py'

In that case you should also mark the script as executable: chmod +x connect.py.

Add credentials

Use vpn init to save your credentials that will be used for all connections. Or do it manually:

Put your nordvpn credentials into a file at /etc/openvpn/login.conf and give it the least permissions possible.

# vi /etc/openvpn/login.conf
# chmod 400 /etc/openvpn/login.conf

This file should contain only your credentials on one line each:

myusername
Pa55w0rd

Commands

vpn up

vpn up will check Nord's API for the recommended server and create a connection to that one.

vpn up <COUNTRY CODE> allows you to connect to a specific country (e.g. vpn up us for USA).

vpn up us123 will connect you to server us123.

vpn down

vpn down kills the currently active connection spawned by this script.

vpn status

vpn status shows the PID of the running openvpn process and your IP and location info.

vpn update

Pull a list of servers from NordVPN's CDN and refresh overwrite outdated files on your system.

Just like in the NordVPN Tutorial, this script will by default save your .ovpn-configs to /etc/openvpn. Check their tutorial if your connection with these files fails.

About

Ease the connection process to NordVPN using openvpn

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages