Linux script to check VPN connectivity

edited July 2016 in Linux VPN Setup Posts: 5
I wonder if any Linux gurus could help me out here.

I'm using Ubuntu and I have it setup that it connects to PIA and automatically connects to one of the servers and will ONLY connect to the VPN.

The problem I have which seems to occur alot more recently is that after a period of time ( days/weeks even months) the VPN will say it is connected still but there will be no internet connectivity.  I will have to manually disconnect / reconnect the VPN to restore functionality.

As this is a machine which is set aside it can be a week or so before I realise that it has lost internet.

Is there something out there I could run in the background which could periodically check that I still have an internet connection  ( like ping out to google or somethng) and if not automatically disable / enable my network connection??

Thanks in advance
Post edited by Big_Daddy_2012 on


Sign In or Register to comment.