Created
April 17, 2017 12:17
-
-
Save fourlastor/0516e2cae24cf8f470ac4c9828a66e29 to your computer and use it in GitHub Desktop.
NordVPN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: nordvpn [server=nl21] [protocol=udp|tcp] | |
nordvpn() { | |
default_server="nl21" | |
default_protocol="udp" | |
# folder where you extracted the openvpn config files from https://nordvpn.com/api/files/zip | |
config_location="{$HOME}/path/to/your/config/folder" | |
server=${1:-$default_server} | |
protocol=${2:-$default_protocol} | |
if [ "$protocol" = "udp" ]; then port="1194"; else port="443"; fi | |
sudo openvpn --config "${config_location}/${server}.nordvpn.com.${protocol}${port}.ovpn" --auth-user-pass "${config_location}/auth_user_pass" | |
} | |
# be sure to add a file named auth_user_pass in your config folder | |
# it must contain your nordvpn email in the first line and your password in the second line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment