How to see VPN uptime in UI?

Using a Slate AX. Is there a way in the UI to see how long the VPN Tunnel (WG) has been up, short of opening the logs and searching for when it connected - which might go away after few days).

If not, can I suggest adding an “connection uptime” or “date/time of connection” or something like that in the VPN Dashboard ?

I thought I could find the info maybe in LuCI, in Network->Interfaces, unfortunately the ‘wgclient’ interface displays " Unsupported protocol type.".
I followed the link to “install protocol extensions”, and installed luci-proto-wireguard , but it’s still displaying unsupported, and no info.

Thanks !

Not sure about Slate model, but when WG connection gets established it crates temporarily files. If you check the timestamp of these files you can find out the exact time it was started.

You may also try uci to find the uptime for WG interface.

wg show should show everything you need. But it requires SSH.

‘status’ is an invalid sub-command of ‘wg’…

‘wg show’ does not show a connection time.

I am not deep enough into WireGuard but it could be impossible to know the uptime since WireGuard will refresh the handshake every few seconds. So it’s basically not connected if there is no traffic - it’s stateless.

It looks like ‘ifstatus’ can be ran on the wgclient interface, so the json output returns an uptime value since last connection.

ifstatus wgclient | grep uptime
“uptime”: 9638,

So yeah … I can get something there, but it’s not the UI, and it requires to ssh in :slight_smile:

Feature request for the UI :wink:

2 Likes