3
1
I'm trying to better undstand how traffic is routed through a VPN on a windows machine.
I have a working vpn server at work that I am connected to from home. My networks subnet is 192.168.8.x
The vpn server's subnet is 192.168.1.x
If I right click on the established vpn connection and look at the connection details there is no default gateway listed for the network interface. Just an ip address, subnet mask, and DNS.
My understanding is that if you try to access any IP address that is outside your own subnet it then tries to get routed through a default gateway.
I figured with a VPN you simply would have two defaults gateways and your computer would just try both.
I'm obviosly very confused as to how this all works and would like to know how it is that if I type in 192.168.1.1 I get the router on the remoute network (VPN side) while i'm on a 192.168.8.x subnet...
So what happens when I tell windows to go to an IP address and I have two NICs present. How does it know which one to choose, does it try both? I know that the 192.168.0.0/24 subnet is reserved for local networks, does that play a role in routing in determing wether an address gets routed or is out to local address first?
I guess I had in my mind that there was a golden rule that machines on different subnets couldn't talk to each other, unless a router was involved. Yet somehow I can access another subnet using my VPN. Just wondering what mechanisms are involved. – Greg G – 2014-07-06T14:47:09.207
@GregG Checking the routing table as suggested in my answer will give you an idea. Any address of the form 192.168.8.x will go through your regular network. – vfclists – 2014-07-06T18:10:01.420
@GregG It does not try both. It picks the one that is the "closest" to the IP address you are trying to reach, based on the routing table. – David Schwartz – 2014-07-06T23:19:21.080