Discussion:
Tutorial to add a freeware killswitch which blocks software installations from phoning home during or after the initial install process
(too old to reply)
Arlen Holder
2020-11-08 22:08:10 UTC
Permalink
I was setting up a friend's machine with a killswitch when I realized
that the web site I used to use is no longer available (at least today).

So, for posterity, so that everyone else can have the killswitch,
these are posted from my archives, where I include the batch file below.

Here is the original tutorial but without the actual killswitch batch file:
o Tutorial to add a freeware killswitch which blocks software installations from phoning home during or after the initial install process
<https://groups.google.com/g/alt.comp.freeware/c/5VPbErk7PBQ>

The use model is to be off the network under two circumstances:
1. Whenever the machine boots, it _always_ boots off the network
2. Whenever I install software, I run the killswitch

To run the killswitch is trivial:
o Win+R > killswitch (or whatever you want to name it)

Where the "name" is whatever name you put in the AppPaths key.
o [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths]

Given the web site appears to be dead today, here's the batch file:
o <https://www.liquidvpn.com/vpn-kill-switches/>

The actual batch file is "supposed" to be here, but failed today:
o <https://my.liquidvpn.com/dl.php?type=d&id=49>

Hence, here is that file, verbatim, from my software archives:
o Name: LiquidVPN-Kill-Switch.bat
o Size: 2747 bytes (2 KiB)
o SHA256: 933B7BD76EECB04D57A1A55E972C868D0460EB21021C16ED0ABC0B02EBD532A7

===< Below is LiquidVPN-Kill-Switch.bat >===
@echo off

:: GetAdmin
:-------------------------------------
:: Verify permissions
nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: On Error No Admin
if '%errorlevel%' NEQ '0' (
echo Getting administrative privileges...
goto DoUAC
) else ( goto getAdmin )

:DoUAC
echo Set UAC = CreateObject^("Shell.Application"^) >
"%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >>
"%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B

:getAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------


@echo off
:: CHANGE DEFAULT GW IP BELOW
set defgw=192.168.0.1


@For /f "tokens=3" %%1 in (
'route.exe print 0.0.0.0 ^|findstr "\<0.0.0.0.*0.0.0.0\>"') Do set
defgw=%%1
cls
:start
cls
echo.
color 0C
echo LiquidVPN's Simple VPN Kill Switch, ver. 0.1 - by LiquidVPN

echo.
echo.
echo Your routers gateway is probably "%defgw%"
echo -if nothing appears or its incorrect, add it manually (Press '3')
echo.
echo USAGE:
echo.
echo -Press "1" to Enable Kill Switch (IP "%defgw%")
echo -Press "2" to Disable Kill Switch (IP "%defgw%")
echo -Press "3" to manually set default gateway if its not detected above.
echo -Press "h" for Kill Switch Help
echo -Press "x" to exit Kill Switch.
echo.
set /p option=Your option:
if '%option%'=='1' goto :option1
if '%option%'=='2' goto :option2
if '%option%'=='3' goto :option3
if '%option%'=='x' goto :exit
if '%option%'=='h' goto :help
echo Insert 1, 2, x or h
timeout 3
goto start
:option1
route delete 0.0.0.0 %defgw%
echo Default gateway "%defgw%" removed
timeout 3
goto start
:option2
route add 0.0.0.0 mask 0.0.0.0 %defgw%
echo Defaulte gateway "%defgw%" restored
timeout 3
goto start
:option3
echo
set /p defgw=your gw IP (e.g. 192.168.0.1):
goto start
:help
cls
echo.
echo.
echo ======================
echo This simple kill switch removes your default gateway
echo and blocks traffic from reaching the internet when
echo your VPN gets disconnected.
echo.
echo Here is how you use it.
echo.
echo Step 1: Connect to LiquidVPN
echo Step 2: Enable LiquidVPN's Kill Switch (option "1")
echo.
echo Now Any internet traffic will pass through LiquidVPN only.
echo.
echo - If your VPN gets disconnected so will your internet.
echo - Disable the Kill Switch and reconnect.
echo.
echo.
echo When you disconnect from LiquidVPN follow these steps
echo to reconnect or to browse the internet normally.
echo.
echo Step 1: Close any software that may leak your real IP
echo Step 2: Disable the LiquidVPN kill switch (Option "2")
echo Step 3: Reconnect to LiquidVPN and enable the kill switch (Option "1")
echo.
timeout /T -1
goto start
:exit
exit
===< Above is LiquidVPN-Kill-Switch.bat >===

As always, please improve so all benefit from every action you take.
--
See also:
o What are your FAVORITE Windows registry keys (that you use most?)
<https://groups.google.com/forum/#!topic/alt.comp.microsoft.windows/fYPn38xN3ZM>
Arlen Holder
2020-11-08 22:17:48 UTC
Permalink
Post by Arlen Holder
1. Whenever the machine boots, it _always_ boots off the network
I forgot to mention the simple trick to always boot _off_ the network
o Is simply to never set the Gateway in the network control panel

Win+R > ncpa.cpl > Rightclick on Ethernet/Wi-Fi applet > Properties
Select [Internet Protocol Version 4] > [Properties]
Default gateway === <make sure this is blank>

When my machine boots, the gateway to the router isn't set.
o When I feel like setting the gateway to get back on the network:
Win+R > killswitch (which turns the gateway back on)

The simple command to manually detach from the gateway is:
o route delete 0.0.0.0 %defgw%

The simple command to manually connect to the gateway is:
o route add 0.0.0.0 mask 0.0.0.0 %defgw%
Where "%defgw%" is your default gateway (e.g., 192.168.0.1)

Note: You can run those commands, as admin, in the Run box if you like:
o Win+R > route delete 0.0.0.0 192.168.0.1 {control+shift+enter}
o Win+R > route add 0.0.0.0 mask 0.0.0.0 192.168.0.1 {control+shift+enter}
--
See also networking suggestions in this recent thread today:
o new machine - Win10 takes half an hour to boot
<https://groups.google.com/forum/#!topic/alt.comp.microsoft.windows/6-tTwzsEErU>
Arlen Holder
2020-11-09 14:03:32 UTC
Permalink
Not blocking Arlen's posts just wastes a lot of time
for everyone. It's not only the idiocy of his posts but
he also insists on crossposting to obscure groups like
Linux, Mac, computer repair, and so on. So then we get
long battles between know-it-alls about which grandmother
wears army boots.
The adults on this newsgroup need to shut up racists & morons - who turn
every thread into 2 posts of value and then 200 posts of their trolls.

Sigh. (I need the _adults_ on this newsgroup to help us all.)
o *For the _adults_ on this newsgroup, here's what obviously transpired*:

NOTE: If this was the first time, and not the hundredth time, this
happened, I wouldn't be so exasperated - but I need YOUR help - I need an
ADULT on this newsgroup to respond to what transpired - PLEASE...

Pretty please? (I'm sick and tired of these morons & racists - I need your
help since if you do NOT call them out - they will troll on forever where
their only purpose is to ruin Usenet for the remaining adults on Usenet).

1. I spent the time, energy, & effort to purposefully helpfullly
post potentially useful information, which, by the way, while the batch
file came from a VPN site, has _nothing_ whatsoever to do with VPN
(and that was clearly explained since all it does is a "route").

2. The utter moron Rudy Weiser, who is the rare person in my killfile
proved, again, he's a sheer moron, by claiming it only applied to
VPN (I see his shockingly moronic idiotic post in dejagoogle).

3. Then you get Mayayana responding by _feeding_ that utter moronic
troll Rudy Wieser, where I know Mayayana better than most of you do.

Mayayana is simply like those Type II apologists are never seem to check
their facts (that's why Mayayana is racist - he sees one black person
robbing a bank and he _instantly_ assumes _all_ black people rob them).

Even as I _ignore_ Mayayana for the reason above, Mayayana _insists_ on
backing up these moronic trolls like Rudy Wieser clearly is, which makes
this thread at this point more of their idiotic posts (and my adult
defense) than it is factual value to you, the adult Usenet user.

I NEED YOUR HELP IF YOU ARE AN ADULT USENET USER PLEASE!

A. Read what I posted. Read what Rudy posted. Read what Mayayana posted.
B. YOU decide who is the _adult_ here and who is the utter moron.
C. PLEASE RESPOND to this thread to tell us what you, as an adult, decided.
--
The adults on this newsgroup need to shut up racists & morons - who turn
every thread into 2 posts of value and then 200 posts of their trolls.
Loading...