I am running an OpenWRT router as a VPN client. Hence all the devices connected to its WiFi are automatically using the VPN connection.
My case is, that I am using different devices and I don't want with each of them to do the login via LuCI but I would like to be able to easily check if the VPN connection is up and running.
Thus I created a small standalone solution outside of LuCI to quickly show those parameters. It checks the connection status with the proper tools provided by the router itself, it does not connect to an external website like ipleak or similar. I wanted to share this in case it could be useful to anyone.
On the screenshot you see on the left side the VPN status page. On the right side its configuration:
WAN: To check if the router has WAN access I try to
wget --spidera website that is usually up. In this case twitter.com
VPN gateway: Via ip route command I find out the ip address of the VPN gateway. If ping is successful, the VPN gateway is reachable.
Traceroute: In the first 5 hops to a common website (in this case wikipedia.org) I should see, if the traffic is routed correctly. A pattern can be defined that should be contained in the traceroute result.
It consists of a HTML file located under:
and the script with the commands that have to be run on the router:
The VPN status page is publicly accessible for any device connected to the routers WiFi under
openwrt.lan/vpnstatus.html without any authentication. This surely is not what everyone wants, but on a small home / personal / family network it can IMHO be quite useful.
Further details about the installation and configuration can be found on github: