eBay Suspension & PayPal Limited Forums  
Join Today
Register Subscribe
     

Registration is fast, simple and absolutely free so please, join our community today!


Go Back   Home

eBay Suspended & PayPal Limited Forums

eBay Suspended & PayPal Limited Forums (https://www.aspkin.com/forums/)
-   IP Address (https://www.aspkin.com/forums/ip-address/)
-   -   VPN Kill Switch for Windows... SoftEther/OpenVPN .bat (https://www.aspkin.com/forums/ip-address/118943-vpn-kill-switch-windows-softether-openvpn-bat.html)

nate 07-25-2018 01:25 AM

VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
For the longest time Ive been trying to figure out how to make a VPN Kill Switch for Windows that didnt use Windows Fiirewall. A Windows Firewall kill switch is almost always set up to only kill internet to your browser when the VPN drops... making your VPN no better than a proxie at concealing your true IP...

I reverse engineered a none-functional batch file I found from another VPN Provider and added a few things to get it working and to allow the VPN to reconnect if the connection drops... If you know how to make (copy and paste) a batch file with NotePad++ or another scrip txt editor give it a try...


I'll try and post instructions with pics later.

Here's the link to my Gist on GitHub with the source code: https://gist.github.com/cmdwhoami/80...e624bd974b3572

nate 07-25-2018 03:05 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
https://image.ibb.co/nLv9Oo/killswitch.png

Here is a screen shot of the program I put together...

It's coded to detect you default gateway ip (local ip of router) i.e. 192.168.0.1 when it opens... So

Step 1: Open the Kill_Switch.bat

Step 2: press "1" this allows you to enter the public ip of the server you are trying to connect to (your VPN)... This enters the IP address you type into the code %vpn%. Filing in the blank to create a static route in Windows route.exe from your default gateway %dfgw% to your VPN...

Step 3: press option "2" for the program to add the static route from your local machine (i.e. 192.168.0.1) to your VPN server... and delete the default route (192.168.0.1 to 0.0.0.0). Killing all other routes to the internet from your local machine in case the VPN were to fail.

Step 4: connect to the VPN... *If you connect to the VPN before Enabling the Kill Switch it will not work.

To disable the kill switch...

Step 1: Disconnect from the VPN.

Step 2: press option "3". This deletes the route from your local machine to the server and adds back the route from your local machine to the rest of the internet...

To use the program just copy the source code from my gist on GitHub and paste it into a txt editor that can label the file as a .bat (batch file) i.e. NotePad++ Then click on the file to launch the program...

As you can see its as open source as it gets.

All that hard to understand code in the first 26 lines is for the GUI and permissions to change routes in routing tables... and for the program to detect your default gateway = %dfgw%

None of the routes are persistent so if things don't go right just reboot... everything will go back to normal...

Play 07-25-2018 03:21 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
This should prove useful for many VPN users! :thumb:

Beautiful 07-25-2018 11:40 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
That's awesome good work!

I've always just used vpnetmon to close the browser window itself if the IP changes. Its saved me a few times but then again its probably not as solid as your method.

Sunspot144 07-25-2018 11:56 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Ha, hate to ruin your thunder but this is a renaming of LiquidVPN's killswitch .bat

https://www.liquidvpn.com/vpn-kill-switches/

nate 07-26-2018 08:51 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Quote:

Originally Posted by Sunspot144 (Post 933083)
Ha, hate to ruin your thunder but this is a renaming of LiquidVPN's killswitch .bat

https://www.liquidvpn.com/vpn-kill-switches/

:hail:

lulz

WOW... Your a google genius...

Miss the part where I said I reverse engineered another VPN providers kill switch? WHICH DIDN'T WORK BY THE WAY... All that kill switch does is delete the default route... Which when connected to VPN, is the VPN... 192.168.0.1 goes to DNS server. So that kill switch kills nothing... If you delete the default route before you connect to the VPN... You cant connect to the VPN...

LMFAO

If you were so genius you would look at code not just pictures of a screen shot...

But since looking at pictures is your thing if you look at the pictures more carefully you will notice my kill switch has another option and asks for the IP address of the server your connecting to....

That little added option adds a static route to the VPN server. Then you delete the default route before connecting to the VPN. That static route keeps the connection open to the VPN server to reconnect the VPN if it drops.

Your a clown..

Know what your talking about before tying to insult my intelligence.

https://image.ibb.co/jR0Z8o/simple_vpn_kill_switch.jpg

https://image.ibb.co/nLv9Oo/killswitch.png

Sunspot144 07-26-2018 10:24 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
LiquidVPN works fine when the connection drops. You should give credit where credit is due, though. I'd be more impressed if you wrote it all yourself. At least rework the UI.

nate 07-26-2018 10:36 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Quote:

Originally Posted by Sunspot144 (Post 933146)
LiquidVPN works fine when the connection drops. You should give credit where credit is due, though. I'd be more impressed if you wrote it all yourself. At least rework the UI.

BS

Its impossible to reconnect to the server if the default route of your home network is deleted to the entire internet...

Give it up... Let it go...

You don't even make sense.

Your not the 1st to feel envy, and you wont be the last....

nate 07-26-2018 10:49 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
^^^^ why did you just delete your post? You had a good point...

I'll leave my response up here for you anyway... In case you want to take me up on my offer..



You were correct...

Assuming your original default route doesn't change... And your VPN provider sucks and doesn't know how, or chooses not to configure a DNS push through DHCP... Which could expose your true ISP through DNS if you did't set DNS up correctly on your side.

But most default routes change from 0.0.0.0 - 192.168.0.1 to what ever DNS server address is pushed to the local machine from the VPN server by the DHCP request when you connect to the VPN...

.

This creates no 0.0.0.0 - 192.168.0.1 route to delete...

I can give you lessons for a small fee if you'd like... I only except BTC, ETH, & ETC tho..


And for reworking the UI...

I guess you never read the 48 laws of power by Robert Greene..

Law 7: Get others to do the work for you, but always take the credit. Use the wisdom, knowledge, and legwork of other people to further your own cause. Not only will such assistance save you valuable time and energy, it will give you a godlike aura of efficiency and speed. In the end your helpers will be forgotten and you will be remembered. Never do yourself what others can do for you.

Sunspot144 07-26-2018 11:10 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Quote:

Originally Posted by nate (Post 933154)
^^^^ why did you just delete your post? You had a good point...

Law 7: Get others to do the work for you, but always take the credit. Use the wisdom, knowledge, and legwork of other people to further your own cause. Not only will such assistance save you valuable time and energy, it will give you a godlike aura of efficiency and speed. In the end your helpers will be forgotten and you will be remembered. Never do yourself what others can do for you.

Except when you get called out, then you get sued or end up here.

Sunspot144 07-26-2018 11:29 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Quote:

Originally Posted by nate (Post 933151)
BS

Your not the 1st to feel envy, and you wont be the last....

Also not envy, an employer wants to hire someone who knows how to do what they do, not copy someone else's work. That or you're lying to yourself telling everyone how great your sh1t is when it isn't your sh1t.

SaiJin 07-26-2018 11:32 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Hey! Cut it out both of you.

Sunspot, move on.
Nate, continue what you do.

Pointless to fight with each other and it just creates a negative environment.

traveller70 07-26-2018 07:26 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Hummm interesting

rsot 07-26-2018 08:07 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Quote:

Originally Posted by SaiJin (Post 933168)
Hey! Cut it out both of you.

Sunspot, move on.
Nate, continue what you do.

Pointless to fight with each other and it just creates a negative environment.

:pop2: Thursday fight nights

Sunspot144 07-26-2018 11:09 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
SaiJin said I can't post on this thread any more so I am refraining from comment. I can post pictures tho :comp5:

http://www.gifbin.com/bin/092009/125...e_punch_ko.gif

MM78 07-27-2018 10:55 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
No one really cares who invented it, as long as we're sharing this stuff......that's all that matters.

nate 07-27-2018 11:46 AM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
^^^ The way you just said that makes me think you might actually be taking this clown seriously...

Here's a free lesson...

This is the code i added or changed:

Code:

echo -Press "1" to manually set VPN IP

echo -Press "2" to Enable Kill Switch (IP "%defgw%")

echo -Press "3" to Disable Kill Switch (IP "%defgw%")

Code:

:option1
echo
set /p vpn=enter your server IP:
echo.
echo VPN IP configured
timeout 4
goto start



Code:

:option2
route delete 0.0.0.0 %defgw%
route add %vpn% MASK 255.255.255.255 %defgw%
echo Default gateway "%defgw%" removed
timeout 4
goto start



Code:

:option3
route delete %vpn% 
route add 0.0.0.0 mask 0.0.0.0 %defgw%
echo Defaulte gateway "%defgw%" restored
timeout 4
goto start




default gateway (router) = 192.168.0.1
ip address to the entire internet = 0.0.0.0
ip address to Google DNS = 8.8.8.8
%dfgw% = what ever default gateway IP the code that LiquidVPN wrote finds
%vpn% = what ever you type in for a VPN IP from the code I added.


The
Code:

set /p vpn=enter your server IP:
I added makes
Code:

%vpn%
= what ever you type in for the IP address of the server.



The
Code:

route delete 0.0.0.0 %defgw%
LiquidVPN wrote deletes the default route... your home network to the entire internet... that was the only original code to delete/add routing... but it wouldn't work if the VPN server or your router was set up to push DNS through the DHCP request.. And would have made it impossible to reconnect to the VPN if it dropped...

If the VPN server or your router was set up to push DNS... It would change the defalut route from
Code:

0.0.0.0 --- 192.168.0.1
to
Code:

8.8.8.8 --- 192.168.0.1
leaving no default gateway 0.0.0.0 --- 192.168.0.1 to delete.. It did NOTHING.... And if you were to delete it before connecting to the VPN. You wouldn't be able to reach the internet to connect the VPN server.

I added a static route to the VPN server.
Code:

route add %vpn% MASK 255.255.255.255 %defgw%
That way you are able to delete the original default route 0.0.0.0 --- 192.168.0.1
Code:

route delete 0.0.0.0 %defgw%
(the route between your default gateway, and the entire internet). BEFORE the VPN server connects and changes it... Which is why you have to (press "2") before connecting to the VPN or it will not work...

The VPN is still able to connect through the static route I set from the default gateway to the VPN server...

Code:

route add %vpn% MASK 255.255.255.255 %defgw%
As a matter of fact, its the only place it can go... Which is why its called a VPN Kill Switch... Since it kills the route to the entire internet except for the route to the VPN server...

I dont know WTF LiquidVPN was thinking only deleting the default route.. What they put together was the equivalent of fixing something with Duct Tape




I just got rid of one hater = Empirestate

and I pick up a new one

all your doing is giving me more opportunity to flex on you...

aspkin 07-27-2018 02:32 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
Lol, nate, you're bating him to continue. Don't. :)

Good share.

Sunspot144 07-30-2018 01:20 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 

nate 08-18-2018 02:29 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 

nate 09-05-2018 01:02 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
If anyone is looking for a Kill Switch that works with any version of Windows, and doesnt know how to make the batch file by copying and pasting the source code into a txt editor here is a download link to the .bat

https://drive.google.com/uc?export=d...hkCYplyfWrhE7j

Just know its going to ask for permission if you have UAC enabled. It has to since its making changes to routes with route.exe

None of the route changes are persistent, they are only stored in RAM, so if you f#ck something up a reboot will fix the issue.

If you want to verify the code before opening it open a txt editor like notepad, notepad++ or Visual Studio and select the file to open it in there to take a look.

I need to figure out how github works. There's a way to add the file for download there but I haven't taken the time to figure it out yet.

nate 09-06-2018 02:13 PM

Re: VPN Kill Switch for Windows... SoftEther/OpenVPN .bat
 
I set up a repository on GitHub so anyone that wants this can download the repository zip from there. The link to the GitHub repository is below.

https://github.com/cmdwhoami/whoami_vpn_killswitch.bat


All times are GMT -5. The time now is 09:24 PM.

vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Ad Management by RedTyger


All times are GMT -5. The time now is 09:24 PM.


Stop the guessing games and learn how you can quickly and easily get back on eBay today!
Read the best selling step-by-step eBay Suspension guide eBay Stealth!
Rotating Residential Proxies? Head to IPBurger for Residential Proxies
vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Ad Management by RedTyger