Skip to content

Instantly share code, notes, and snippets.

@alghanmi
Created July 28, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alghanmi/6098476 to your computer and use it in GitHub Desktop.
Save alghanmi/6098476 to your computer and use it in GitHub Desktop.
Setup Google Authenticator on OpenVPN
sudo aptitude install libpam0g-dev
git clone https://code.google.com/p/google-authenticator/
cd google-authenticator/libpam/
make
sudo make install
google-authenticator
sudo cp /etc/pam.d/common-account /etc/pam.d/openvpn
echo "auth required pam_google_authenticator.so" | sudo tee -a /etc/pam.d/openvpn
echo "plugin /usr/lib/openvpn/openvpn-auth-pam.so openvpn" | sudo tee -a /etc/openvpn/server.conf
sudo service openvpn restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment