Firewall Killswitch Windows 10
Can someone please tell me how to set up a Firewall kill switch with Windows 10 using the OpenVPN program. I want to set up the firewall kill switch, because have heard the that method that comes with the PIA application is known to leak packets. I also just want to use the open source program from OpenVPN.
So does anyone have an updated guide on how to set up a fire wall kill switch on win10? I tried a few that were on Google for other providers using the Tap drivers mac address and it would just block all my traffic and even my VPN connection wouldn't work. It would also be helpful if someone could tell me what ports are allowed with PIA? I tried changing the port to 22 in the OpenVPN config file, but it wouldn't even connect to type in my password.
So does anyone have an updated guide on how to set up a fire wall kill switch on win10? I tried a few that were on Google for other providers using the Tap drivers mac address and it would just block all my traffic and even my VPN connection wouldn't work. It would also be helpful if someone could tell me what ports are allowed with PIA? I tried changing the port to 22 in the OpenVPN config file, but it wouldn't even connect to type in my password.
Comments
I used to have the windows firewall setup to stop all non-vpn traffic, but it got to be a total pain in the butt. Anytime anything went wrong it took ages to get it working again. I'm sure there's an easier way...
https://www.reddit.com/r/VPN/comments/4oeqbi/only_nine_of_the_29_windows_vpn_clients_that_i/
I really don't know what this has to do with helping me set up a firewall kill switch. I'm not here to expose PIA, because it's already well known they have a lot of issues with their client. I like PIA and just want to use the OpenVPN program instead with the firewall rules. I just can't get it working properly.
This has everything to do with IPv6. The VPN is IPv4 only. Disable IPv6 is an option in the official client.
I was referring to that when i said "That has nothing to do with disabling IPv6" as it doesn't. The fact is that IPv4 does leak using the program and it has happened to me. If you don't run the program a certain way each time and triple check each time you connect, packets will leak.
after several notices from my internet provider recently (never got them before), i started using PIA and it works great!
but when i tested the PIA kill switch option (which some on reddit and elsewhere had reported did not work consistently), i found that it would work after initial startup - but that if you exited PIA and restarted it, it would not maintain the correct killswitch settings, requiring the settings to be newly set up again after each PIA restart - and if i did not reset the killswitch option, i would no longer have killswitch protection
interacting with PIA's tech support on the issue, they gave me the template of a working killswitch json script file (which input into my specific network settings) -
here is the syntax in the json file (titled "killswitch_state.json" and found in the PIA data directory) for the killswitch to be correctly enabled - correct json file syntax:
{"killswitch":true,"saved_default_gateway":"192.168.1.1","saved_openvpn_gateway":null,"standard_route_removed":true,"watching_standard_route":true}
note that it is specific to my default gateway IP address, which for me is 192.168.1.1 - if you have a different default gateway IP, you should edit that address into the syntax
but each time after i run and exit PIA, the syntax of the "killswitch_state.json" file is changed by PIA (i suspect to allow you normal non-VPN / non-kill-switched access to the internet) to the following - (reverted by PIA and incorrect killswith json file syntax):
{"killswitch":true,"saved_default_gateway":null,"saved_openvpn_gateway":null,"standard_route_removed":null,"watching_standard_route":false}
now, when you then restart PIA, with this above changed syntax in your killswitch file, you will NOT be killswitch protected (as the killswitch option is intended to do)
that is, unless you FIRST change the file back from the second syntax to the first
to do that more easily, i keep a backup copy of the correct "killswitch_state.json" file, which i drag and drop into a shortcut into my PIA data directory
when i do this, it asks me if i want to overwrite the existing file (which is 139 bytes) with my saved (correct) file (which is 147 bytes), and is older, or course
so if you copy the syntax of the correct killswitch json into a text file and save it, but then rename the entire file name to be "killswitch_state.json", you will have the correct json to copy back into the PIA data folder after each PIA shut down, so that the next time you start it, the killswitch option is correctly enabled
so that after each exit of PIA, i simply copy the correct json script back into the pia data directory, overwriting the json which has changed after each PIA exit (and it changes 100% of the time for me on exit, such that the killswitch did not work after exit and restart)
everyone who uses PIA on Windows (and maybe other OSes as well, but i don't know) will very likely have this occur, such that this fix should always work
~~~~~~~~~~
but i also had another problem that others may not have - i have assigned the devices on my network to a static IP address - and i also found that on each exit, PIA will change my IP address (i use only IPv4 on win7) from the static address that i previously set, to be an automatically assigned IP address - this knocks out my router's port forwarding for certain programs on certain computers - and it also resets my static DNS server (i use google DNS) back to automatic DNS IP as well - i found that i could not easily connect to the internet with all programs that do so
so i wrote a batch file (which i titled "reset.bat") that changes the network settings back, that i also run after each PIA shutdown
here is the 3 lines of syntax of that batch file:
netsh interface ip set address name="Local Area Connection" static 192.168.1.224 255.255.255.0 192.168.1.1
netsh interface ipv4 set dns "Local Area Connection" static 8.8.8.8
netsh interface ipv4 add dns "Local Area Connection" 8.8.4.4 index=2
~~~~~~~~~~~~~~
so to recap, on each exit of PIA (since i don't need or want PIA running 24/7), i now do two simple things:
- i drag & drop copy (not move) the correct PIA killswitch json script file back into (a shortcut on my desktop to) PIA's data directory and click yes to confirm replace (overwrite)
- then i run the network IP reset batch file
and then all is good with PIA killswitch protection for each subsequent run! (but only if done after EACH PIA exit)
test it out and see if this works for you
for convenience, here are links to the two files i use (which need to be updated to your specific network settings)
"killswitch_state.json"
https://mega.nz/#!gJZnyYKQ!evn3MgbiL7a0GMpokQ880D1aYg4fWD-6sOTWehCbzBg
network static IP and static dns "reset.bat"
https://mega.nz/#!IBQlSZTA!O5YteKoLHqzS5mgX0CLQ7ZpcjAjqAGnE_lwLbSGJKjw
or else just copy the syntax given above into files that you can create yourself