PIA Kill Switch not working! PIA Client Disconnected, BUT FOUND WINDOWS BEING ONLINE

tddtdd
edited February 2018 in Windows VPN Setup
Sorry for sounding so alarmed, but this is objectively and technically alarming.

Last night I right clicked my PIA tray icon, did Disconnect (kill switch was on), it disconnected, left the computer on until this morning. 

This morning, PIA client is running fine, it's still disconnected (kill switch is still on), BUT WINDOWS IN ONLINE.

My internet Network Connection is on and running (WTF), and my TAP-Windows Adapter is disconnected (normal).

I can see all my PIA manager and PIA network manager processes in Process Explorer are running "fine". I then right clicked the PIA Client tray icon and Connected again, then Disconnected, (without restarting the PIA client) and the internet was killed properly again.


I am moving the heck away from the PIA client ASAP until someone can ~guarantee this never happens again. (I don't care how technical and "consumer unfriendly" the solution is)

PS: Another issue I experienced before at least 5 times over a couple months was, coming back to my PC, hovering my mouse over the (either red or green) PIA tray icon (wanting to right click it), only to discover it disappeared because the process had crashed in the background a long time ago and windows was connected outside the VPN.

PPS: Does anyone know of any FULLPROOF way of making a VPN kill switch in ANY operating system (linux, unix, win) that runs on your PC (e.g. laptop while on the go)? Fullproof means your PC cannot under any circumstance and any stage ping the internet if it isn't through a successful VPN connection.

Comments

  • edited February 2018
    It's really hard to tell like this, but my feeling of what probably happened is that Windows being without connection for a while decided to be "helpful" and "fixed" the network by redoing a DHCP request and adding back the default route.

    If you manually assign your computer's IP address in the network adapter on Windows, I think it should also be leak-proof as currently PIA doesn't restore the default gateway in this situation when exiting, but most importantly there can't be DHCP renews going on to possibly interfere. If it still fails, then something else on your computer has to be "fixing" the network without your knowledge outside of PIA.

    I'll start a long-lived test in a few minutes to see if I can reproduce this on my end. This is a serious issue we'll fix ASAP if I can reproduce.

    ------

    What I can confirm is the PIA app on Linux will never leak for sure. On Linux it uses iptables to drop all non-VPN traffic, so even if the app crashes, dies, gets killed, as long as iptables is not being reset (it shouldn't if you don't use a third-party firewall like UFW or other stuff), then you should be guaranteed leak-free. You can check with the "sudo iptables -S" command while the killswitch is enabled.

    Another fun thing to do on Linux is to use network namespaces so that the only network adapter ever available to the applications you intend to protect is the tun interface.
  • tddtdd
    edited February 2018
    @Max-P Good info! I caught this problem two nights in a row btw, on windows 10 build 1703. (and the cases where I came back to a PC where PIA had crashed completely, was on a different PC with Windows 7)

    After reading your post I also discovered that something at some point had reset my network IP configuration to Automatic. Probably a windows update or something. I'll test once more while having an actual manual ip and dns set. But I'll switch to windows as a virtual machine inside linux on all my PCs asap.

    Pardon my ignorance, but can't PIA take a more aggressive approach to the kill switch?
    I see its process hierarchy has duplicates:  pia_manager.exe, rubyw.exe, pia_manager.exe, rubyw.exe, pia_nw.exe, pia_nw.exe, pia_nw.exe, openvpn.exe.
    But that doesn't seem to be providing the redundancy I would expect it wants to achieve with this. E.g. Can't you make a separate elevated service in the background that checks every 0.1s if the PIA agent is up and running, every 1s if the network configs are not changed, every 10s ping the internet to make sure it's through a vpn? This won't be 100% fine as even a 0.1s window of potential leakage is bad, but at least it's not a whole night or weekend... Also the same approach if PIA tried to connect to the internet but it timed out. Maybe it should try ever 10 seconds, forever, instead of just giving up?
  • tddtdd
    edited February 2018
    I've stumbled across a few more relevant suggestions from reddit, in case it helps people I'll paste them below:

    Three alternatives:

    A. Configure Window Firewall to disable outgoing connections on all Private networks, then make the OpenVPN Adapter Public.

    B. Fiddle with the Windows routing table directly. Requires some strong networking awareness.

    C. Create a virtual router using VM software like VMWare, Virtualbox, QEMU, Parallels, to install a router-friendly OS like PFSense or Linux + OpenVPN config in a new guest virtual machine. Route your host machine through the guest.

  • tddtdd
    edited February 2018
    Update: I can confirm that setting a custom IP + Subnet Mask (leave Default Gateway blank) (optional: also setting custom DNS Servers to OpenDNS) on your Network Adapter (not the PIA TAP Adapter), solves this one problem where the PIA Killswitch would stop working if stuff was set to Obtain IP address Automatically.

    We can't be too happy about it though since sometimes you can't use static IP addresses (like in a cafe/hotel). Also your network adapter can be (re)set back to automatic by a number of external sources when you don't expect it. Like installing a new adapter or remoting software, installing a new network driver, windows updating itself etc.

    Configuring Windows Firewall like in "alternative A" mentioned above, does not cover everything, especially not in Windows 10 from Microsoft and from deeply installed 3rd parties.

    I suggest the default VPN killswitch behaviour for everyone to be:

    Install VirtualBox as a (startup) service ( - an open source Virtual Machine software (and not Microsoft's Hyper-V)), install PFSense on that VM, then castrate all Windows network services and network drivers, and use the Windows Loopback Adapter as the only network gateway, which connects directly to the PFSense VirtualBox - where you have a proper firewall and a proper unkillable VPN connection. And you can also use this VM as an enterprise-grade router for the rest of your house, cafe etc..

    If you have a better than average laptop or PC, then I suggest installing Linux as your Host OS, then installing Windows as a VM inside Linux (if your hardware drivers are supported in linux, you can do hardware passthrough and there will be practically no overhead for playing videogames or doing intensive work), then installing PFSense as another VM, and routing everything through PFSense. That my dudes is the actual -normal- in privacy and security and reliability. Otherwise you're just pretending and hoping.
  • I ran into this myself today with v77 of the Windows client.  I agree with @tdd that this must have been some Windows update that reverted my network settings back to auto (unless the PIA installer did it!?). Microsoft is classic for this ... especially recently and it's infuriating. What troubles me more is that it was probably when I upgraded the box to Windows 10 1709 almost 2 months ago! So I've likely been leaking like a sieve and didn't even know it!

    I opted to go the route A and disable Private internet connection traffic. It was the easiest to implement, and proved to work. Only downside is that the network will still appear to be "on" in the task tray, so I lose the visual queue of a network without internet, even though I have confirmed no outgoing connections are possible. I have never seen an update mess with user firewall configured rules, so IMO this is the best approach to make sure off is off. Possibly also set manual IP and DNS settings for the network, but the user is assumed to be stupid and those aren't sacred apparently.

    I also agree with @tdd that if Microsoft really wants to get through their own firewall, I'm sure they can, so probably not the best solution for the ultra paranoid ... so like 90% of this forum amirite ;)?

    @Max-P, this might be a good improvement opportunity for the Windows client actually. Verifying and re-setting a manual IP and DNS setting on program launch just to make absolutely sure the kill switch works as intended. Another radio button and 2 added dialogs to the advanced settings, and some behind the scenes magic to never have a leak again.
  • Legoman said:
    @Max-P, this might be a good improvement opportunity for the Windows client actually. Verifying and re-setting a manual IP and DNS setting on program launch just to make absolutely sure the kill switch works as intended. Another radio button and 2 added dialogs to the advanced settings, and some behind the scenes magic to never have a leak again.
    It sounds a lot simpler than it really is. For a while we did exactly that, but then we had the opposite problem of the network connection being stuck in killswitch state because Windows would no longer automatically get an IP when connecting to a different WiFi network. Or cases where the router would assign the IP to another computer because it is no longer leased over DHCP, causing an IP conflict when said computer comes back online.

    Ideally this really should be plugged with a network filter driver that does the firewall job properly, but then comes a whole world of antivirus/firewall conflicts and a very non-obvious failure point if the driver gets stuck in blocking mode with the application shut down as there wouldn't be any way for the user to even know the killswitch is active. And in general convincing people to install two drivers to run PIA.

    The best way to not have killswitch issues is really to not use Windows, or isolate Windows from the outside with a router of VM setup. The problem is that there's just too many of those "utilities" fighting to be the one responsible for the network to be able to be 100% reliable. About everytime a killswitch issue pops up, it's something external resetting the network. Just now, I have this thread open in another tab that's precisely about yet another bloatware implementing a "feature" that ends up bypassing the VPN in really odd ways despite the routing being set up properly. I have no idea why it happens but I have a feeling they're probably sending bypassing the whole network stack and sending the data directly through whichever link it decided is the best.
  • @Max-P Ok, fair enough. You sold me on the not so simple fix. I get that Linux is simpler for this type of thing even if iptables is a headache and a half to understand most of the time. Though, it's really not doing anything different than the Windows Firewall does, just with a command line instead of lots of snapins, windows and tabs. I don't envy Windows server admins or Windows networking developers for that reason alone ... they all deserve praise just for dealing with the beast in general.

    But, let's be honest. Windows isn't going anywhere and likely most people that just want a solution that works (for better or worse) use Windows. So, this issue isn't going anywhere either.

    I think you may be onto something about isolating Windows though. I had tried to do that about 2 years ago by running PIA via openvpn on my Tomato based Asus router, but quickly found that:
    1) Getting my desired VPN configuration on the network (some machines on the VPN, others off) was not as straight forward as it sounds.
    2) Altering that configuration required modifying openvpn config files, SSHing to the router, and disrupting other PCs on the VPN while I took it down to switch. (Cumbersome and intrusive)
    3. Even with 256MB of RAM for a large NAT tables and a 600 MHz CPU, the router wasn't able to keep up with the demand and frequently would have packet loss and consistency issues under modest loads. (Non-starter)

    Realizing this, I either needed a beefier network appliance, or use the VPN solution on the client.  I chose the later (free) solution.

    but ... running a container as a builtin firewall (docker, VM,etc.) for the client app so Windows effectively is using a container to talk to the outside world seems like it has some legs.  Though, any solution that alters the way the PC interfaces with the outside (regardless of OS) will be intrusive because it needs to live outside the VPN app and can muck up a lot if users are not aware what they are using.  Kinda a rock and a hard place for a solution provider (PIA) if you ask me.
  • I'll definitely make sure to report this in any case so we can reevaluate our options or maybe make it an optional safety feature people can enable if they're wiling to take the risk of network breakage. I'd imagine some people would rather have to spend some time troubleshooting the network than leaking :)

    I realize none of the strong options I suggested are particularly user friendly or usable depending on the situation (you mentioned setting it up on Tomato - while that works it tends to cap around 30-50 Mbps so dealbreaker for some users). The VM solution in particular isn't guaranteed to help either anyway because if Windows decides it grabs an IP on the main adapter despite it being bridged to a VM, we've got leaks again.

    I'm sure there's a way to better handle this. If anything, we probably should be able to handle it similarly as we do on Android by basically keeping the TAP adapter active and running but leave packets go nowhere when the VPN is off. There's an option in the TAP properties in Device Manager to set the interface to either always appear connected, or to be only connected when OpenVPN is driving it. If you leave it always on, I'd imagine it will prevent leaks but we still don't know whether Windows will be smart enough to automatically bump back the normal adapter to a higher priority to restore connectivity :/
  • @Max-P Thanks for taking the time to discuss the situation here. I think it was a great conversation to have on the forums for others to potentially see when they get stuck.

    On a whim, I tried out your last comment about keeping the TAP adapter always on:

    Windows Settings -> Network & Internet -> Ethernet -> Change adapter options -> Ethernet 2 Windows TAP-Windows Adapter V9 -> Properties -> Configure -> Advanced Tab -> Media Status -> Always Connected -> OK

    No dice on Windows 10 x64 1709.  The TAP adapter indeed stays active when the PIA client is disconnected and/or closed, but Windows proves to be an overachiever and falls back to the regular network adapters connection.  I tried with Kill Switch both on and off and got the same result.  Unless there is a driver configuration thing that needs to be set or adjusted before installation, for me, this was not a viable solution.  Just as a data point for PIA dev.

    Note that previously I was using v75 and before that v65,and when PIA was closed with Kill Switch activated, the main adapter would get put back online but with corrupted settings such that the network would stay disconnected.  For me, this was perfect because the biggest thing I am looking to avoid is dropping my PIA connection, and reconnecting to the primary network while reconnecting or restarting the client. This is especially important because since there is no autoreconnect (which was recently requested elsewhere on the forum and would be really great), to automate this process, I have a program kill PIA and restart it until a VPN connection is secured. So I basically already do what the request is asking for, but way dirtier with a watchdog process and force close operations, which honestly I would love not to do. I know that others might not like how this worked in the past versions because until you either restarted the client and connected to the VPN or reset the ethernet adapter IPv4 settings, you can't get online, which is probably why you guys fixed it in the newest versions (v77). Good for you guys at PIA and everyone else, bad for me.  This client quirk is likely the scenario @Max-P was referring to a couple posts up ... and I miss it :(.

    Anyway, onward and upward.
  • edited March 2018
    For anyone who sees this thread and wants to set up the firewall like I did as a safeguard to dropping back down to the primary connection, here is a step by step procedure for you.  I make no assurances that this is leak proof, but I'm fairly sure it is. You will probably only want to do this if you use the VPN for all internet connectivity as you will need to undo this procedure to allow traffic to flow again if the VPN is off.  This will use Windows Firewall to disable all outgoing connections except through the VPN. If you don't want or can't use Windows Firewall, this guide is not for you. If you have a need for multiple Private and/or Public networks with diverging networking constraints, this will also not work for you.  By doing this procedure, Kill Switch is likely no longer required, but you can leave it active and everything should still work (I do just in case). This assumes you are on Windows 10 and have your primary network on "Ethernet" and your PIA TAP network on "Ethernet 2". YMMV for other configurations (earlier/later Windows versions, wireless networking, multiNIC etc).  OK, still with me? Let's do this!

    1) Start with the PIA client closed. You should be connected to a network with the "Ethernet" adapter.

    2) Open the Ethernet adapter Settings
    Windows Settings -> Network & Internet -> Ethernet

    3) Click the network icon below "Ethernet". This will display some network settings.

    4) Select the radio button for Private

    5) Open the Windows Firewall Settings
    Windows Settings -> Network & Internet -> Ethernet -> Windows Firewall
    Windows Defender Security Center window
    Firewall & network protection -> Advanced settings
    Windows Defender Firewall with Advanced Security window
    *Don't change settings here you don't understand ... you can really screw up your computer changing these settings. You have been warned!*

    6) In the left pane select
    Windows Defender Firewall with Advanced Security on Local Computer

    7) In the center pane select 
    Windows Defender Firewall Properties


    8) Select the Private Profile tab and make these settings;
    Firewall State: On (recommended)
    Inbound connections: Block (default)
    Outbound connections: Block

    Protected network connections: Customize:
    select "Ethernet" ("Ethernet 2" can also be selected, it doesn't matter because "Ethernet 2" will be Public)

    VERY IMPORTANT NOTE: This will Deny all outbound connections UNLESS there is a specific Allow rule set under the Outbound Rules section.  This sets the default behavior, not all behavior.  It is common for programs (especially Windows itself) to add Allow rules that will bypass this default behavior.

    9) Select the Public Profile tab and make these settings;
    Firewall State: On (recommended)
    Inbound connections: Block (default)
    Outbound connections: Allow (default)

    Protected network connections: Customize:
    select "Ethernet 2" ("Ethernet" can also be selected, it doesn't matter because "Ethernet" will be Private)

    10) Leave all other settings as is, and confirm (OK).

    11) In the left pane select: Outbound Rules

    12) In the right pane select:
    Actions -> Outbound Rules -> New Rule

    13) In the New Outbound Rule Wizard make the following selections:

    Rule Type: Custom
    Program:
      All Programs
      Services -> Customize: Apply to all programs and services (default)
    Protocol and Ports: 
      Protocol type: Any (default)
    Scope:
      Which local IP address does this apply to?: Any IP address (default)
      Customize the interface types which this rule applies -> Customize: All interface types (default)
      Which remote IP address does this apply to?: Any IP address (default)
    Action: Block the connection (default)
    Profile: Check Private
    Name: Block All Private Network Traffic

    and click Finish

    NOTE: This will go above and beyond the default connection settings made in step 8.  Here, a specific block rule is defined for all Private connections. Windows firewall prioritizes Deny rules over Allow rules.  So, all the allow rules that Windows and other programs add that pertain to outbound connections on Private networks will be ignored.  This step effectively makes step 8 redundant, and is much more important as it makes sure exclusions to the default behavior don't interfere with your security.

    14) Close the Windows Defender Firewall with Advanced Security and Windows Defender Security Center windows.


    15) Open the Network and Sharing Center
    Windows Settings -> Network & Internet -> Ethernet -> Network and Sharing Center

    16) Verify your network adapter is connected to a Private network

    17) Open a web browser and try to navigate to a website. You should receive a message that there is no connection, you are offline, or your internet connection is blocked. This IS because of the firewall settings you modified earlier.  If you can access the internet (send a request and receive a response) you did something incorrectly. Check your settings before continuing.

    18) Start the PIA client and connect to a VPN location.

    19) Once connected, look at the Network and Sharing Center window and verify "Ethernet" is an Unidentified Public network with no internet access and "Ethernet 2' is a Public network with internet access.

    20) Use your web browser to navigate to a website (like https://whatismyipaddress.com/) to verify it loads and your IP and/or geolocation are as you expect.

    21) Disconnect from the VPN (but don't exit the program)

    22) Look at the Network and Sharing Center window and verify "Ethernet" is an Unidentified Public network with no internet access and "Ethernet 2' is no longer listed.

    23) Use your web browser to navigate to a website. You should receive a message that there is no connection or you are offline. This is because you are disconnected from the VPN, NOT because of the firewall settings you modified earlier.

    24) Exit (close) the PIA application

    25) Look at the Network and Sharing Center window and verify "Ethernet" is a Private network.  It may say you have internet, don't be alarmed, it's lying to you.

    26) Use your web browser to navigate to a website. You should receive a message that there is no connection, you are offline, or your internet connection is blocked. This IS because of the firewall settings you modified earlier.

    27) Live long and prosper.

    Update 3/18/18: Added the creation of a Outbound Deny rule for all Private networks to further protect against everything that doesn't explicitly have a firewall Allow rule in place.
  • @Legoman That's interesting!

    I've looked at the firewall method in the past, but the problem I ran into was that the Windows Firewall favors Deny rules over Allow rules, so there is no way to block everything except the PIA app or OpenVPN to let it go through. So it ended up being a very lenghty process where you also had to deny specific apps you really didn't want leaking because there was no way to punch a hole for the PIA app.


    Soooo, if I understand this right, you're relying on the Killswitch causing Windows to recognize your local adapter as two different things (Public when killswitch is active, Private when not killed) and then use that to kill the network if the killswitch fails or PIA exits. That's really clever!

    I'm going to test that out myself a bit later to verify but if I can verify the different states I'm going to be sending lots of people to that post.
  • edited March 2018
    I tried the procedure and it works great with one exception - I cannot access my mapped drives on the VPN computer due to the kill switch deleting the default gateway.  If I turn off the kill switch the app never connects with these changes.  Any suggestions would be greatly appreciated.
  • qy3bg75 said:
    I tried the procedure and it works great with one exception - I cannot access my mapped drives on the VPN computer due to the kill switch deleting the default gateway.  If I turn off the kill switch the app never connects with these changes.  Any suggestions would be greatly appreciated.
    That seems to confirm what I said in my post just above yours: it seems this method relies on Windows effectively detecting "Network with killswitch" and "Network without killswitch" as two different things and applying different firewall rules. So without the killswitch, the network is private which blocks everything (including PIA's own connections).

    The killswitch shouldn't affect your mapped drives however unless you need to route to your router first. Most people's mapped drives are on the same physical network so the default gateway shouldn't be involved at all since you can talk to the machine directly. Is your mapped drives located on a machine on a different subnet, or mounted over the Internet?
  • edited March 2018
    @Max-P
    Yes, Windows firewall does make the Deny rules a priority over the Allow rules.  This is what makes the above procedure work!  You almost got it but not quite.  Using the above procedure, the Killswitch in PIA actually doesn't do anything for you; on or off should be the same.

    We are specifically telling Windows:
    1. The default network connection is Private, and the TAP connection is Public.
    2. To deny all outgoing connections on Private networks. (with the updated procedure with the block rule).

    So when PIA is not running or disconnected, Windows tries to use the Private network to make the network connection but can't as the outbound packets are all denied.  When PIA tries to connect, it will bridge the default Private network adapter to the Public TAP network allowing the connections to pass because Public networks are set (by default) to allow outgoing connections.  This works, but has some really notable shortcomings.  This may be a bit confusing ... sorry, I tried to make it as clear as I could.

    1. When not connected to PIA, Windows does not allow any outgoing connection ... period.  LAN, internet, everything, not allowed.  This may be bad if you want to broadcast/allow connections on the LAN while blocking internet traffic.  There is no way to have your cake and eat it too; it's an all or nothing proposition.  This is probably what @qy3bg75 was experiencing.  On the Private network, connecting to the computer won't be permitted.  The request for connection will be allowed, but the response actually making the connection will be blocked.  In testing, I have noticed that this is not exactly true however.  While it is true that the outgoing connection is not allowed, a handshake is still possible.  Windows will not be allowed to broadcast a connection via network discovery protocols (e.g. showing the HOSTNAME share as available under Networks), but if you tell another computer on the LAN to access the blocked outbound traffic computer via the LAN IP address instead of the HOSTNAME, the handshake will be allowed.  So this means accessing \\HOSTNAME will fail, but \\192.168.1.100 will work.  Same goes for the remote desktop protocol (RDP), and others.  Also, it seems that computers that were able to "see" the outbound blocked computer once it was connected to PIA (over the Public adapter), will retain the LAN mapping even if PIA is disconnected or exited.  So after connecting to PIA once, all LAN computers that are aware (on), will then be able to connect via Windows discovery networking protocols using HOSTNAME assisted support.  The reasoning for not seeing \\HOSTNAME I understand.  Because the computer needs to broadcast it's existence on the LAN to enable other computers to make a mapping to it, and that is blocked, the LAN computers can't make the mapping, and thus can not connect.  But, the bypass via IP address is a bit confusing.  Maybe we are bypassing the Windows firewall completely (even though we are telling the firewall to block local connections too), I don't know.  It doesn't give me an "at ease" feeling though.
    2. I can make no guarantee that in the moments in between telling PIA to connect, the TAP adapter enabling and actually connecting to the PIA server, nothing is being leaked out the TAP connection in the clear.  It may be possible that something may access the outside via the Public TAP connection because there are no restrictions being placed at the firewall level.  I'd hope this is not possible, but I'm no network expert.  It would be really nice to get an official PIA response to this concern (maybe in a FAQ section).  Can the TAP connection make general network connections before connecting to a PIA server?

    Windows Firewall is not a cascaded filter firewall like iptables.  It just doesn't do that.  Rules don't have priorities, so there's not a really good way to be very selective about connections without both breaking default Windows functionality and babysitting the allow/deny rules over time as programs are installed and updated.  So buttoning up the connection completely using just the built in functionality is probably not possible.  I think the solution I gave in the previous post is relevant, but only for a very very specific use case.  Because of this and the concerns I mentioned here, I'm going to try some other firewall software for myself.

    I think issues regarding proper setup and use of DNS leak protection and Killswitch are a pretty big concerns that warrant  prescribed support, or at the very least setup tutorials from PIA to make sure customers are using the software in conjunction with the supported OSs correctly.  The forums are great for sharing ideas, but it's pretty hit and miss and lacks a level of authenticity that a PIA suggested solution would provide.
  • I reverted back to v66 from v77 & the kill switch now works. Kill switch on v72 doesn't work either.
  • Hi @Legoman, thanks for the follow-up.

    Yes, this is why I'm a bit confused. If when on the Private network, no connections are allowed, how does PIA connect to its servers?

    It can't be the TAP adapter, because it's not quite how it works. All the TAP does is bridge raw packets between the TAP adapter itself, and the OpenVPN process. So public internet access through the TAP using your ISP is impossible, because for the TAP to report "connected" to Windows, it needs to have an OpenVPN process attached to it. As soon as OpenVPN goes down, the TAP goes down with it.

    Now, for packets sent through the TAP to reach PIA's servers, they first go through the TAP which sends them to OpenVPN, which encrypts them and then send them to PIA's servers. The connection between OpenVPN itself and PIA's servers is done over your regular non-VPN adapter. If it tried to talk to PIA's servers over the TAP, it would just loop into itself infinitely as that would be OpenVPN->TAP->OpenVPN->TAP->OpenVPN.


    This is why I think you are relying on the Killswitch's behavior to actually punch a hole through your firewall. When PIA enables the killswitch, it changes your network settings and Windows sees the adapter as a new network profile. When PIA exits or dies, the original network profile returns. So you have three states: Private (no VPN), Public (no VPN, killswitch enabled), and Publc (on VPN, TAP), and the magic happens when it switches between Private and Public.

    I've recorded a quick video of my test, pay close attention to the network adapters: https://d.max-p.me/pia/forum/30340/killswitch.mp4
  • edited March 2018
    @Max-P, You know ... you are probably right about the KillSwitch punching a hole through the firewall allowing the functionality.  I swore I tested it both using and not using it.  It's entirely possible that I thought I did, but actually didn't since I was checking so many different configurations over a long period of time.  Good catch!

    I wound up scrapping the use of Windows Firewall for a slightly more robust solution with Comodo Firewall 10, so I can not easily revert to test the above.  I'll take your word for it and hope others do as well!  I first tried ZoneAlarm Pro ... and while not free, it still couldn't do what I wanted (and I think Windows Defender is actually a better piece of software).  In Comodo (which is free) I implemented KillSwitch via a set of global firewall rules that get activated for connections using the TAP adapter (connected to PIA via openvpn).  This firewall also lets you add priority to rules so Allow and Deny rules can be mixed unlike Windows Firewall.  This way I set a higher priority for LAN traffic (so it uses the LAN Ethernet adapter and not the TAP connection), and lower priority for the VPN connection (tied to the TAP adapter), and conclude with a global block for all outgoing connections.  I currently use it without the PIA KillSwitch engaged and did lots of tests to make sure it was working under all PIA client states (closed, started and disconnected, started and connected).  No issues keeping all non-VPN traffic stifled regardless of what software is sending the connection attempts.

    I will continue to use the PIA client KillSwitch on other computers using the PIA client where the VPN is used occasionally.  For this use case, I don't necessarily care if I leak when the program is shut down because while I am connected to the internet and want the VPN, I'd have it active (e.g. laptop at the coffee shop on wifi).  But the computer I was most concerned about, which triggered this whole discussion, uses the VPN for all connections 99% of the time ... and to me, a working KillSwitch is critical as I have noted the VPN connection drops on occasion.  For this really niche use case, I will likely stick to my Comodo Firewall solution so I can set it and forget it as I update the PIA client over time.  No further worries that a client update could potentially gum up the works.

    Thanks for the great discussion on this thread.
Sign In or Register to comment.