Last active
July 19, 2018 16:03
-
-
Save palashkulsh/eac1fae4acf8929868a116d90f62a456 to your computer and use it in GitHub Desktop.
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
#to get id of vpn run | |
#nmcli con | |
#!/bin/bash | |
if [ "$1" = 'd' ]; | |
then | |
nmcli con down id VPN_USERNAME > /dev/null & | |
else | |
echo 'vpn.secrets.password':`oathtool --base32 --totp "SECRET"`>/tmp/pwd && nmcli con up id VPN_USERNAME passwd-file /tmp/pwd >/dev/null & | |
fi |
Download link for mac -
tunnelblickctl -
wget https://github.com/benwebber/tunnelblickctl/releases/download/v0.1.0/tunnelblickctl-0.1.0-x86_64-apple-darwin.tar.gz
oathtool -
brew install oath-toolkit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for mac users
#install tunnelblickctl if not already present and add following in your bashrc file
alias con='tunnelblickctl connect YOUR_USER'
#download oathtool and pbcopy
#now find the secret key
#tr is required because oathtool gives otp with newline which is also copied with pbcopy
oathtool --base32 --totp "SECRET" | tr -d '\n' | pbcopy && tunnelblickctl connect YOUR_VPN_USERNAME