Script to check if VPN is OK

Vår huvudtjänst.
Post Reply
FreeBrids
Posts: 1
Joined: Thu 26 December 2024, 18:57

Script to check if VPN is OK

Post by FreeBrids »

I like to create a script to check if my VPN is running, it have happens it was down for no reason, så i like to make a script to just check and give status like https://integrity.st/ green tumps up, but from my computer out, but i don't find any ting to trigger on.
i on a Windows 10 machine.
PiCkLeS
Posts: 23
Joined: Thu 1 April 2021, 21:15

Re: Script to check if VPN is OK

Post by PiCkLeS »

Well I'm not sure how to do it in a Windows setting, but I guess a windows cmd script will do.

Just check your conf file you have for your tunnel from Integrity. It has a field named "Address = xxx.xxx.xxx.xxx" - use that IP and do a ping, if it responds, the tunnel is up. If not, its down.

That's how I do it and it works fine. I made my own watchdog so check it, so I can do a restart of the tunnel automatically if its not responding anymore.

When it comes to check for DNS leaks, Ive made an array with the "approved" DNS servers you should use with this service and Im checking that againts the actual DNS servers my servers and machines are using. If its not the correct one, I let the script remove them.

But that last part is overkill if you just want to check if the tunnel is alive or not. If you enter the world of Linux at some point, I'd be happy to share my scripts.

//P
Post Reply