Monday, July 13, 2015

How To setup OpenVPN from scratch with PAM authentication on Debian Jessie

Quick How To:
  1. # apt-get install build-essential libssl-dev liblzo2-dev libpam0g-dev easy-rsa
  2. wget http://swupdate.openvpn.org/community/releases/openvpn-2.3.7.tar.xz
  3. # tar xvf openvpn-2.3.7.tar.xz
  4. # ./configure
  5. # ./make
  6. # ./make install

For basic setup and key generation see: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-14-04


For PAM:

1. in server config put: 
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so openvpn

2. create new pam file: nano /etc/pam.d/openvpn

auth    required        pam_unix.so    shadow    nodelay
account required        pam_unix.so

3. add "auth-user-pass" in client config

No comments:

Post a Comment