Web interface (with golang backend) for monitoring and administration of OpenVPN server
657
OpenVPN server web administration interface.
Goal: create quick to deploy and easy to use solution that makes work with small OpenVPN environments a breeze.
After startup web service is visible on port 8080. To login use the following default credentials:
Please change password to your own immediately!
Requirements:
Execute commands
curl -O https://raw.githubusercontent.com/vuonglequoc/openvpn-web-ui/master/docs/docker-compose.yml
docker-compose up -d
It starts two docker containers. One with OpenVPN server and second with OpenVPNAdmin web application. Through a docker volume it creates following directory structure:
.
├── docker-compose.yml
└── openvpn-data
├── openvpn
│ ├── client-configs
│ │ ├── files
│ │ │ └── client_*.ovpn
│ │ └── keys
│ │ └── client_*.crt
│ │── pki
│ │ ├── private
│ │ │ ├── client_*.key
│ │ │ └── server.key
│ │ ├── reqs
│ │ │ ├── client_*.req
│ │ │ └── server.req
│ │ ├── dh2048.pem
│ │ ├── ca.crt
│ │ ├── server.crt
│ │ ├── ta.key
│ │ ├── openssl-easyrsa.cnf
│ │ └── safessl-easyrsa.cnf
│ ├── log
│ │ ├── ipp.txt
│ │ ├── openvpn.log
│ │ └── openvpn-status.log
│ ├── server.conf
│ └── vars
├── ca_server
│ ├── pki
│ │ ├── certs_by_serial
│ │ │ └── *.pem
│ │ ├── issued
│ │ │ ├── client_*.crt
│ │ │ └── server.crt
│ │ ├── private
│ │ │ └── ca.key
│ │ ├── reqs
│ │ │ ├── client_*.req
│ │ │ └── server.req
│ │ ├── ca.crt
│ │ ├── index.txt
│ │ ├── index.txt.attr
│ │ ├── index.txt.attr.old
│ │ ├── index.txt.old
│ │ ├── index_ok.txt
│ │ ├── serial
│ │ └── serial.old
│ └── vars
└── db
└── data.db
OpenVPNAdmin will manage OpenVPN daemon via management api.
https://openvpn.net/community-resources/how-to/
In order to enable management api for OpenVPN daemon, we need to add below config to the config file server.conf:
management 0.0.0.0 2080
In the Settings of OpenVPNAdmin, update Management interface address with IP of OpenVPN daemon and same port as above (2080).
OpenVPNAdmin will read OpenVPN daemon log from /etc/openvpn/log/openvpn.log.
In order to enable this log for OpenVPN daemon, we need to add below config to the config file server.conf:
log-append /etc/openvpn/log/openvpn.log
Added SSL Support by adding HTTPS config in app.conf
appname = openvpn-web-ui
httpport = 8080
runmode = dev
EnableGzip = true
EnableAdmin = true
sessionon = true
CopyRequestBody = true
HTTPSCertFile = /opt/certs/vpn.example.com/cert.pem
HTTPSKeyFile = /opt/certs/vpn.example.com/privkey.pem
HTTPSPort = 443
EnableHTTPS = true
DbPath = "./data.db"
Content type
Image
Digest
sha256:b94476ced…
Size
17.1 MB
Last updated
over 1 year ago
docker pull kinguda/openvpn-web-ui