mad_ady
Regular Contributor
I'd like to know if there is some sort of API that would allow me to extract openvpn connection status from the web interface? For example, in this image, I'd like to be able to extract the user connected and their IP address: http://imgur.com/GCz61fN.png
I've looked at the page (/www/Advanced_VPNStatus.asp) and there are a lot of markup calls like:
<% nvram_get("wan_proto"); %>
I'd like to know if there is a way to get this data from running code inside the router (I have access to the nvram for example), or if I should scrape the webpage, or maybe the data is accessible some place else in the filesystem (e.g. a log or a temporary file)?
I can get the current connections to both my servers with this:
netstat -tan | egrep "443|1194" | grep ESTABLISHED
But I don't have the IP - Username mapping
Any ideas how I can get that?
I've looked at the page (/www/Advanced_VPNStatus.asp) and there are a lot of markup calls like:
<% nvram_get("wan_proto"); %>
I'd like to know if there is a way to get this data from running code inside the router (I have access to the nvram for example), or if I should scrape the webpage, or maybe the data is accessible some place else in the filesystem (e.g. a log or a temporary file)?
I can get the current connections to both my servers with this:
netstat -tan | egrep "443|1194" | grep ESTABLISHED
But I don't have the IP - Username mapping
Any ideas how I can get that?