Skip to content

Instantly share code, notes, and snippets.

@vlastikcz
Last active April 27, 2021 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlastikcz/50445200f840b71cf908076fb9a845d0 to your computer and use it in GitHub Desktop.
Save vlastikcz/50445200f840b71cf908076fb9a845d0 to your computer and use it in GitHub Desktop.
Autofill OpenVPN OTP on MacOS with Tunnelblick

Autofill OpenVPN OTP

On MacOS with Tunnelblick.

brew install oath-toolkit
mkdir ~/Documents/my-vpn.tblk
cp ~/Downloads/profile.ovpn ~/Documents/my-vpn.tblk/
printf "#!/bin/bash\n/usr/local/bin/oathtool --totp -b -d 6 {OTP_KEY_HERE}" > ~/Documents/my-vpn.tblk/static-challenge-response.user.sh
chmod +x ~/Documents/my-vpn.tblk/static-challenge-response.user.sh
  • Replace {OTP_KEY_HERE} with the actual TOTP key.
  • Replace profile.ovpn with the actual OpenVPN connection profile.
  • To install Tunnelblick profile, drag the my-vpn.tblk from Finder, to the Tunelblick status icon on the taskbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment