OpenVPN | log connection status


First method:
Add the following lines to servers conf:
status /var/log/status.log 5
status-version 2

Second method:
Add the following lines to servers conf:
client-connect /path/to/your/connect_script.sh
client-disconnect /path/to/your/disconnect_script.sh

Start your server with '--script-security 2'
The scripts must be owned by the same user running the server. If your scripts are writing log files, check the log file directory permissions.

Third method:
Add the following lines to servers conf:
management localhost 7505

Now you can connect port 7507 via telnet and ask some stuff.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.