OpenVPN web status (PHP script)
This is a pretty simple PHP script that allows you to access your (OpenVPN-based) VPN status (such as connected hosts, received/transferred bytes, etc) through a web page. It fetches the information using OpenVPN management console and displays it in a web-friendly way.
Installation is straightforward:
1. Download the script (see link below), rename it, and place it in a web accessible location. Example:
/var/www/vpnstatus.php
2. Enable OpenVPN management console (if you haven’t already done so) adding the following line to the OpenVPN configuration file:
management localhost 7505
3. Restart OpenVPN
That’s it!. Just access http://yourhost/vpnstatus.php to see your VPN status in a web-friendly way.
This instructions assume you’ll place the script on the same machine running OpenVPN. Otherwise, you’ll have to edit the script and modifiy it accordingly (changing the localhost to the name of your OpenVPN host) and also change the management option in your OpenVPN configuration to listen in other addresses.
Download the script here: vpnstatus.txt. Don’t forget to rename it to a .php extension.
9 de May de 2008 a las 9:30 am
If my OpenVPN management interface needs a password to access, while line should I add the password to?
11 de June de 2008 a las 9:34 am
Very nice Script! I was searching for such a script for days! You saved my day!
THX!
19 de June de 2008 a las 9:37 am
[…] Blog von Pablo Hofmann habe ich ein nettes kleines PHP-Script gefunden, dass über das lokale Management-Interface […]