VPN Keepalive Batch File

On October 6, 2010, in Projects, Technology, by Mike Waldron

Recently I had a dilemma with a very small client and a D-Link DIR-655 router.  In very rare circumstances, the D-Link would timeout incoming PPTP sessions for certain remote environments.  This happened with my Mac connecting via DigiTunnel, but not from a Windows machine on my same network.  Also one of their remote sales guys has the same issue behind a 2Wire gateway from AT&T UVerse.  It would time him out after just a few minutes of connectivity if his connection went idle.  I didn’t want to force the client to get another high-end device such as a Sonicwall, as the D-Link is working great other than this problem.

The solution was to invent a neat little batch file that will keep the VPN alive by initiating a ping, and displaying a status window for the end user.  It’s a ghetto solution but hey, it works.

To use this script, simply place in a folder or your choosing, create a shortcut for your user with a neat title like “VPN Keepalive” with a pretty icon like so:

keepalive.bat 15

The red is the IP address (hostnames are not supported).
The green is the refresh period for user status (screen refresh).

Problem solved.

Download the script here

Tagged with:  

3 Responses to VPN Keepalive Batch File

  1. jon says:

    Sorry for the noob question, I am not familiar with batch scripting. Where in the script do you add the IP and time limit?

  2. Mike Waldron says:

    You don’t add it in the script… you just execute it like

    C:> keepalive.bat x.x.x.x 15

    No need to modify the script! Hope it helps

Leave a Reply

Your email address will not be published. Required fields are marked *

Web Hosting