I have a VPN subscription which I’ve successfully configured in Windows 10. When I’m at home, all my internet trafic is automatically tunnelled through this VPN at the router, so when I’m connected to my home Wifi, I don’t need my machine to connect to the VPN.
When I’m away from home however, I have to remember to connect to my VPN service whenever I join a public network, which is easy to forget when you’re busy or in a hurry.
Perhaps there is a Rule I can create in windows firewall or some other setting buried within windows that can do this, but I’m a novice when it comes to this type of thing, can anyone help?
does the VPN has any software they offer to run it? For example I use a Cisco VPN for work, and regardless of what I’m connect too, it will route through the Cisco environment.
You can schedule a task based on items in the event log. You can enable logging for wifi
You can query network information via command line - so you should be able to write a script to determine which network you’re connected to. I’ve not found a way to do it using proper powershell, but close enough.
Always activate the VPN connection unless I’m on my home connection.
It’s easier to define my home connection than it is to differentiate all connection from one another. Am I making sense?
in discrete mathematics this would be like saying
P=>Q = ~Q=>~P
Split tunneling. Always connect to the VPN. But route traffic around the VPN connection when I’m connected to my home network because it’s already going through the tunnel. Does this make sense?
Yes, the VPN does have the option of using their custom client, however I have found that the custom client frequently looses connection to the VPN server. While the client software is supposed to automatically reconnect, it frequently fails. When I use a manually configured connection in Windows to connect, Disconnects are rare, if ever.
I’ve played around with task scheduler before with other problems with some success. It didn’t occurs to me to look at this problem from that perspective. Logically, whenever you think about network connection rules, one would look towards firewall rules, not the task scheduler.
If anyone knows other ways to approach this please share.