Giter Site home page Giter Site logo

gerbenprins / openvpn-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joerx/openvpn-ui

0.0 1.0 0.0 378 KB

A simple UI for generating OpenVPN credentials

License: MIT License

Makefile 0.91% JavaScript 88.22% Shell 1.42% CSS 1.08% HTML 8.37%

openvpn-ui's Introduction

OpenVPN GUI

  • Provides a small web service to generate credentials for an OpenVPN PKI
  • Supports multiple VPN endpoints using the same CA
  • It is not wise to expose this to the public - preferrably use intranet or an IP filter

TODO

  • List certificates
  • Revoke certificates
  • Password generation

Usage

  • Initialize a certificate authority, e.g. using easy-rsa
  • Create config.yml using config.yml.dist as reference
  • Create and set Github client secrets if you want auth, must be set in env
  • Install dependencies: npm install
  • Run server: node server.js

Certificate Authority/PKI

  • So far this depends on an existing OpenVPN CA structure initialised by easyrsa
  • Location of the PKI and OpenSSL config generated by easyrsa must be provided
  • For testing docker-compose.yml will provide a dummy CA
  • See setup-certs.sh for how to generate your own CA

Docker/Compose

  • Will build and run this app on localhost:9000
  • OpenVPN container providing the PKI certs
  • Useful for development, not intended for production
  • Note: the ca container will only init the PKI and exit with code 0
export GITHUB_CLIENT_ID=<your-client-id-here>
export GITHUB_CLIENT_SECRET=<your-secret-here>
make up

Authorization

  • Technically extensible/pluggable
  • So far only a Github OAuth provider is included

Github OAuth

  • So far supports Github OAuth server side flow
  • You need to register an app to obtain a client id and secret
  • Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET in your shell

Testing the API

  • Generate cert:

    DATA='{"name": "someuser", "passphrase": "abc123", "endpoint": "my-vpn"}'
    curl -XPOST -d "$DATA" -H"Content-type: application/json" localhost:9000/certs
  • Get openvpn config:

    curl localhost:9000/configs/my-vpn/someuser.ovpn

openvpn-ui's People

Contributors

joerx avatar ipernet avatar

Watchers

James Cloos 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.