Giter VIP home page Giter VIP logo

openvpn-sqlite-auth's Introduction

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/mattoufoutu/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.
  • 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 system
  • 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-list.py: List registered users.

openvpn-sqlite-auth's People

Contributors

mdeous avatar adrienperonnet avatar senden9 avatar

Watchers

James Cloos avatar ggyy avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.