Using the status file
OpenVPN offers several options to monitor the clients connected to a server. The most commonly-used method is using a status file. This recipe will show how to use and read the OpenVPN status file. We will also focus on some subtleties of the status file in a TAP-style setup.
Getting ready
Set up the client and server certificates using the first recipe from Chapter 2, Client-server IP-only Networks. For this recipe the server computer was running CentOS 5 Linux and OpenVPN 2.1.1. The first client was running Fedora 12 Linux and OpenVPN 2.1.1 . The second client was running Windows XP and OpenVPN 2.1.1. For the Linux client, keep the client configuration file example3-1-client.conf
at hand. For the Windows client, keep the client configuration file example3-2-client2.ovpn
at hand.
How to do it...
Create the server configuration file by adding a line to the
example3-1-server.conf.
file:status /var/log/openvpn.status
Save it as
example3-7-server.conf
.Start the server:
...