add to /etc/openvpn/server.conf
management 127.0.0.1 5555
restart openvpn server
systemctl restart openvpn@server.service
add an OpenVPN Monitor Python package – this will run via a Gunicorn web server and show active connections,
mkdir /opt/openvpn-monitor
create a virtual env (not required but good practice with py packages)
cd /opt/openvpn-monitor
apt install virtualenv python3-virtualenv python3-pip python3-venv
apt install build-essential libssl-dev libffi-dev python3-dev
virtualenv venv
source venv/bin/activate
install required packages
pip3 install openvpn-monitor gunicorn
add a Monitor config file
vi /opt/openvpn-monitor/openvpn-monitor.conf
[openvpn-monitor]
site=your-openvpn-site
#logo=logo.jpg
#latitude=40.72
#longitude=-74
maps=True
geoip_data=/var/lib/GeoIP/GeoLite2-City.mmdb
datetime_format=%d/%m/%Y %H:%M:%S
[VPN1]
host=localhost
port=
name=Your VPN Server Name
show_disconnect=False
start the web server that will show active connections,
gunicorn openvpn-monitor -b 0.0.0.0:80 --name openvpn-monitor --daemon
To stop monitor
pkill gunicorn
to see active connections, go to the public IP of your VPN server
http://<ip of openvpn server>