Script to keep Internet connection alive in Linux or Windows

Jonathan93

Member
Sep 10, 2001
150
0
0
This is my situation.

I've got an ISDN router that is plugged into my home network. On my home network, I've got a Windows 2000 machine, and a Linux machine that I can use. My problem is when my Internet connection goes idle, after roughly 2 minutes, my ISP disconnects me. If the ISDN router sees traffic heading to the Internet, it will automatically reconnect by itself. Does anyone know of a script that will run under Windows 2000 or Linux that will automatically send some TCP traffic to a specificed host every 5-10 seconds or so? I need this so that when I'm away from home, I can connect to my PC (And the Linux server as well).
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
#!/bin/sh

while [ true ]
do
ping -c 1 >/dev/null 2>&1
sleep 10

done


anandtech deletes the spaces, but the bold lines should be indented (does sh even care? not sure)

put that in a script and i would run it like this:

nohup ./myscript.sh &
 

Jonathan93

Member
Sep 10, 2001
150
0
0
Thanks.... I'll give that script a try when the ISDN line comes back up......

*Begins to pray for Internet Traffic from home*