Roger Wilco Jr wrote:Offline Mode? Oh yeah - sorry.
I bet if thebs reads this, he will have a suggestion.
Indeed I do, and use something similar in hotel rooms.
A) ICMP ping one time, with a 5 second timeout (or traceroute UDP port 53, with a TTL of 3), hitting ...
B) Various, public DNS servers (not just the same one), so the AP/Router thinks you're doing public DNS lookups on the Internet, and ...
C) Only do it every 15 seconds, so it doesn't look like a sustained ICMP flood that possibly gets filtered after awhile
Now if you're a DOS BAT or OS/2-NT CMD guru and can loop this, go for it. Even better if you know your Java/.NET System calls, so PowerShell is easy for you.
I'm a POSIX (UNIX/Linux) wennie, so I like Bourne-based shells (and Python). So on every Windows system, I install MSYS, (Minimal SYStem) from the MinGW project (long story), to get Bourne Again Shell (bash). Newer versions of Windows 10 will come with something similar with bash, so you might not need to install anything.
Basically just launch whatever gives you a bash shell (e.g., MSYS) and create a shell script in your home directory, aka folder, named something like "lp.sh" (for loop ping), like such. If you don't know where that is, launch your shell and run "touch ./lp.sh" and a blank file will be created. You should now be able to find it in Windows Explorer with something like Notepad++ (do not use regular notepad).
Code: Select all
# lp.sh -- loop ping DNS servers to provide a poor man's keepalive
# space separated list of DNS servers
# e.g., AT&T, Google and ye'olde UUNET are good set of 6 in Norteamericana
MYDNS="184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52"
# number of seconds to wait in between
# use at least 15
# Loop forever (run in a MSYS window, minimize it, maximize again and hit Ctrl-C to exit)
while true ; do
for s in $MYDNS ; do
# windows ping options, 1 ping, 5000 (milliseconds = 5s) timeout
# NOTE: do *not* use for POSIX ping (which has completely different execution/options)
ping -n 1 -w 5000 $s
# More Ideal? On POSIX, use traceroute udp to port 53 with a TTL of 3 instead of any ICMP
From now on you can bring up your shell and just run "sh ./lp.sh" (or set the execute bit so it's just "./lp.sh" -- but I'm trying not to overload people).