Code Monkey home page Code Monkey logo

openvpn_auth_verify's Introduction

For Python:

This is a custom script for openvpn authentication using environment as password

Python Application:

To create the database

python /usr/sbin/open_vpn_auth.py -c

To Create A User: python /usr/sbin/open_vpn_auth.py -a -u david -p pass

To Delete A User:

python /usr/sbin/open_vpn_auth.py -d -u david

requires python-bcrypt requiremnet.

Add this to your openvpn server config:

script-security 3
auth-user-pass-verify /usr/sbin/open_vpn_auth.py via-env

Make sure your openvpn server can read the script and file that you create.

Example on how to install for go application:

install golang on platform edit conf_location to point to /etc/openvpn/server/user.db

make build

copy open_vpn_auth to the openvpn server /usr/sbin

On OpenVPN Server:

make sure openvpn has access to open_vpn_auth

chgrp openvpn /usr/sbin/open_vpn_auth
chmod 750 /usr/sbin/open_vpn_auth

Edit the /etc/openvpn/server/server.conf:

script-security 3
auth-user-pass-verify /usr/sbin/open_vpn_auth via-env

Create the database:

/usr/sbin/open_vpn_auth -c

To Create A User:

/usr/sbin/open_vpn_auth  -a -u david -p pass

chgrp openvpn /etc/openvpn/server/user.db
chmod 740 /etc/openvpn/server/user.db

It should be good to go. As long as the user.db has 740 permissions and is grouped by openvpn

openvpn_auth_verify's People

Contributors

davegermiquet avatar

Stargazers

jist avatar Alex avatar

Watchers

 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.