Script examples for client-connect/disconnect??
Posted: Wed Feb 14, 2024 3:59 pm
I want to log server side client connect/disconnect events on my Ubuntu server.
And I have tried to read the documentation here:
https://openvpn.net/community-resources ... envpn-2-5/
I can find a lot of entries for the client-connect client-disconnect details, including how it can be configured with call arguments.
But what I don't find is any working example of such a script...
I have also googled for it but that too fails because no-one I have found seems to want to show an actually working setup including:
- What needs to be entered in the server.conf file, like permissions
- Where the script could reside to be usable
- What the script file properties should be
- How the script can get the information to write to the log
- How it can actually reach a log location and write a file there
A working example, which logs client connect and disconnect events with a readable timestamp and some user data into a log file located in say the /etc/openvpn/log directory would be very useful in my opinion.
I definitely do NOT want to send any email or such, just log to the file.
But the file must never be overwritten such that info disappears.
Is there such an example somewhere?
And I have tried to read the documentation here:
https://openvpn.net/community-resources ... envpn-2-5/
I can find a lot of entries for the client-connect client-disconnect details, including how it can be configured with call arguments.
But what I don't find is any working example of such a script...
I have also googled for it but that too fails because no-one I have found seems to want to show an actually working setup including:
- What needs to be entered in the server.conf file, like permissions
- Where the script could reside to be usable
- What the script file properties should be
- How the script can get the information to write to the log
- How it can actually reach a log location and write a file there
A working example, which logs client connect and disconnect events with a readable timestamp and some user data into a log file located in say the /etc/openvpn/log directory would be very useful in my opinion.
I definitely do NOT want to send any email or such, just log to the file.
But the file must never be overwritten such that info disappears.
Is there such an example somewhere?