Skip to content

yarikdot/openvpn-auth-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

openvpn-auth-file

Purpose

Sometimes username and password authentication is needed when connecting to openvpn server. There are plenty of plugins written in python, php, ruby, ... Nevertheless, this one is written perl and uses htpasswd format file as a database.

Dependencies

Only perl and libapache-htpasswd-perl are required.

How to use

  1. Copy the script somewhere (I personally suggest /usr/lib/openvpn).
  2. Update your openvpn config
auth-user-pass-verify "/usr/lib/openvpn/openvpn-auth-file.pl /etc/openvpn/passwd" via-env
script-security 3
client-cert-not-required
username-as-common-name
  1. Generate your username and password (you can use this site https://www.htaccesstools.com/htpasswd-generator/) and put it to /etc/openvpn/passwd
  2. Restart openvpn

Testing

This script has been tested on currently stable Debian (wheezy).

About

Htpasswd username/password openvpn authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages