Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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