Skip to content

OpenVPN user authentication and management scripts using Python. PHP front end allowing users to change their password.

Notifications You must be signed in to change notification settings

x-FBi/openvpn-sqlite-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python OpenVPN SQLite Authentication

openvpn-sqlite-auth is a set of Python scripts to enable and manage OpenVPN user authentication, using SQLite to store credentials.

Setup:

  • Clone openvpn-sqlite-auth into your OpenVPN configuration folder:

    git clone https://github.com/x-FBi/openvpn-sqlite-auth.git /etc/openvpn/openvpn-sqlite-auth

  • Edit the config.py file and set the appropriates values

    • DB_PATH: Path where the SQLite database should be stored.
    • PASSWORD_LENGTH_MIN: Minimum length passwords should be.
    • HASH_ALGORITHM: Algorithm to use when hashing passwords. Can be one of:
      • md5
      • sha1
      • sha224
      • sha256
      • sha384
      • sha512
      • or any other algorithm supported by the OpenSSL library used by your Python installation.
    • HASH_SALTY: This input will be HASHED then added to your password, then HASHED again with your selected algorithm
  • Edit your OpenVPN server configuration file and add this line:

    auth-user-pass-verify /etc/openvpn/openvpn-sqlite-auth/user-auth.py via-env
    script-security 3
  • Edit your OpenVPN user configuration file and add this line:
    auth-user-pass
  • Create the users database using the provided script:

    ./createdb.py

Utilities:

  • ./user-add.py <username>: Add a new user to the database.
  • ./user-del.py <username>: Remove an user from the database.
  • ./user-passwd.py <username>: Update user password in the database.
  • ./user-list.py: List registered users.

PHP User Password Change

This is the portion of the project written in PHP

Setup

Put the files in your /var/www/ or website front end. Checkout the PHP folder for more instructions.

About

OpenVPN user authentication and management scripts using Python. PHP front end allowing users to change their password.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.1%
  • PHP 38.9%