RoadWarriors managment

You are right … :wink:
I missed the “status” word in my command …


1 Like

Tonight I not very smart … May be usually on saturday I used to do different activities before Corona Time … :wink:


That’s what I’ll do.
Take time to test it :wink:

I’ll do it tomorrow or monday :wink:

1 Like

Is there a corresponding command line that can be used in a script to export the list and send something human readable via mail?


the api can be queried by the command line in a terminal

echo '{"action":"connectionHistory","account":"","timeInterval":"today"}' | /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-vpn-ui/openvpn-rw/read | jq

echo '{"action":"connectionHistory","account":"","timeInterval":"last_week"}' | /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-vpn-ui/openvpn-rw/read | jq
echo '{"action":"connectionHistory","account":"","timeInterval":"last_month"}' | /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-vpn-ui/openvpn-rw/read | jq

you retrieve a json object that you can parse and email it to who you want

Ok, now I have to convert it in human readable format (like in the windows panel):

Started Ended Duration RemoteIP Received Sent

Today I discovered jq exist and probably if I study it I can achieve this, but if there is already an example that I can use …


It is linux time in second since 1970, happy coding

Did you manage to configure VPN user access by time?

Did you read this post?

Different request (per user route) same solution (firewall rule on the ip assigned to the user)

1 Like