Guest User

Untitled

a guest
Oct 19th, 2017
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # Script to start NordVPN
  2. # $1 should be the VPN server to connect to. Default: vn1
  3. # $2 should be the protocol "tcp" or "udp". Default: tcp
  4.  
  5. username="username"
  6. password="password"
  7. openvpn_dir="/etc/openvpn/"
  8. server=${1:-"vn1"}
  9. proto=${2:-"tcp"}
  10.  
  11. if [ "$proto" == "tcp" ]; then
  12. proto+="443";
  13. elif [ $proto == "udp" ]; then
  14. proto+="1194";
  15. fi
  16.  
  17. echo "" >nordvpn-auth.txt
  18. chmod 200 ./nordvpn-auth.txt
  19. printf "$username\n$password" >nordvpn-auth.txt
  20.  
  21. openvpn --config $openvpn_dir$server".nordvpn.com."$proto".ovpn" --auth-user-pass ./nordvpn-auth.txt
Add Comment
Please, Sign In to add comment