Windows 8 has a known issue with connecting to VPN and having Internet at the same time. I’ll share steps for troubleshooting VPN problem with limited Internet connection that worked for me.
Troubleshooting VPN: The Problem
Often this issue is solved by unchecking the “Use Default gateway” in the TCP/IPv4 settings, but such approach leads to inability to connect to internal resources of VPN network (like local IPs, i.e. local machines or sites, etc). On the opposite, if default gateway is checked, the Internet becomes limited, meaning that most sites are unavailable (in best case Google and few others are accessible).
For example, when you need an access to a local site, lets say http://lan-local.site and an Internet resource like external JS file http://cdn.yourcdn.com/required.js, both options described above will not work for you.
Fortunately, there is a way to have both at the same time. The trick is to force internal sites to use VPN gateway while keeping all other traffic in your channel.
Lets do it step-by-step
1. Open your VPN connection properties and go to the “Networking” tab, then choose IPv4 and press the “Properties” button.
2. Next press the “Advanced” button.
3. Check “Use Default gateway”.
In DNS settings check if “Append primary and connection specific DNS suffixes” radio button is selected and “Append parent suffixes of the primary DNS suffix” is checked.
4. Now connect to the VPN and open you command line (Win +R and type ‘cmd’ or find the command line in Windows 8 app menu) with admin privileges (right click->Run as Administrator).
In the command line type
lan-local.site is your internal resource address.
You’ll see the IP address of the local resource:
Save this IP for later use. If you need more than one local resource repeat the same action for each one and save IPs.
5. Now disconnect from VPN and type in the CMD
You’ll need to write down “Default Gateway”, and “Mask” address.
6. Go to VPN setting as described in steps 1-3 and uncheck “Use Default gateway”
7. Connect to VPN again. You’ll have an Internet connection, but local resources are unavailable.
Type in CMD:
route add -p [ip.of.your.resource.] mask [mask] [your.default.gateway.ip]
Repeat for each local resource.
Now they should be accessible as well as the whole Internet.
Still facing problems with VPN?
If you still have issues, you can ask for help in the comments by providing your ipconfig output and output of the CMD command ‘
route print‘ . Don’t forget to recheck you IPv4 settings.
If your VPN is working now – go ahead and check out our tips for writing better code here.