Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Our work DNS has an entry for certain sites (e.g. facebook.com), that routes to the company website (effectively blocking these sites).

When connected to VPN from home, I am unable to get to these sites. I have checked the VPN settings and both IPv4 and IPv6 are set to automatically obtain DNS, and have Use default gateway on remote network unchecked.

My understanding was that this should be enough, as I'm not actually using the DNS on the VPN side - I'm having to add routes to my machine when connected to VPN so that I can access servers by IP (Name doesn't work for me).

Is there something else I need to do to ensure that my web traffic doesn't go via the VPN connection/DNS servers?

Route Add Batch File

IPCONFIG |FIND "192.168.2" > %temp%\TEMPIP.txt
FOR /F "tokens=2 delims=:" %%a in (%temp%\TEMPIP.txt) do set IP=%%a
del %temp%\TEMPIP.txt
set IP=%IP:~1%
route add 192.168.4.0 mask 255.255.255.0 %IP%
route add 192.168.5.0 mask 255.255.255.0 %IP%
route add 192.168.2.0 mask 255.255.255.0 %IP%
route add 192.168.15.0 mask 255.255.255.0 %IP%
route add 10.4.0.0 mask 255.255.255.0 %IP%
Pause

Routing Table

===========================================================================
Interface List
 32...........................Work VPN
 16...00 26 83 32 3f c5 ......Bluetooth Device (Personal Area Network)
 10...54 04 a6 49 3b 5e ......Intel(R) 82579V Gigabit Network Connection
 18...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 19...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
 22...08 00 27 00 4c c0 ......VirtualBox Host-Only Ethernet Adapter
  1...........................Software Loopback Interface 1
 11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
 23...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
 24...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.1.254     192.168.1.67     10
         10.4.0.0    255.255.255.0         On-link     192.168.2.219     11
       10.4.0.255  255.255.255.255         On-link     192.168.2.219    266
     97.67.171.34  255.255.255.255    192.168.1.254     192.168.1.67     11
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.1.0    255.255.255.0         On-link      192.168.1.67    266
     192.168.1.67  255.255.255.255         On-link      192.168.1.67    266
    192.168.1.255  255.255.255.255         On-link      192.168.1.67    266
      192.168.2.0    255.255.255.0    192.168.2.215    192.168.2.219     11
    192.168.2.219  255.255.255.255         On-link     192.168.2.219    266
      192.168.4.0    255.255.255.0         On-link     192.168.2.219     11
    192.168.4.255  255.255.255.255         On-link     192.168.2.219    266
      192.168.5.0    255.255.255.0         On-link       192.168.5.1    276
      192.168.5.0    255.255.255.0         On-link     192.168.2.219     11
      192.168.5.1  255.255.255.255         On-link       192.168.5.1    276
    192.168.5.255  255.255.255.255         On-link       192.168.5.1    276
    192.168.5.255  255.255.255.255         On-link     192.168.2.219    266
     192.168.15.0    255.255.255.0         On-link     192.168.2.219     11
   192.168.15.255  255.255.255.255         On-link     192.168.2.219    266
     192.168.44.0    255.255.255.0         On-link      192.168.44.1    276
     192.168.44.1  255.255.255.255         On-link      192.168.44.1    276
   192.168.44.255  255.255.255.255         On-link      192.168.44.1    276
     192.168.56.0    255.255.255.0         On-link      192.168.56.1    276
     192.168.56.1  255.255.255.255         On-link      192.168.56.1    276
   192.168.56.255  255.255.255.255         On-link      192.168.56.1    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link      192.168.56.1    276
        224.0.0.0        240.0.0.0         On-link      192.168.1.67    266
        224.0.0.0        240.0.0.0         On-link      192.168.44.1    276
        224.0.0.0        240.0.0.0         On-link       192.168.5.1    276
        224.0.0.0        240.0.0.0         On-link     192.168.2.219    266
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link      192.168.56.1    276
  255.255.255.255  255.255.255.255         On-link      192.168.1.67    266
  255.255.255.255  255.255.255.255         On-link      192.168.44.1    276
  255.255.255.255  255.255.255.255         On-link       192.168.5.1    276
  255.255.255.255  255.255.255.255         On-link     192.168.2.219    266
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 22    276 fe80::/64                On-link
 10    266 fe80::/64                On-link
 18    276 fe80::/64                On-link
 19    276 fe80::/64                On-link
 10    266 fe80::1952:caa2:ca98:7c84/128
                                    On-link
 22    276 fe80::6857:2bce:d4bb:a70a/128
                                    On-link
 18    276 fe80::689d:f649:498a:6fe9/128
                                    On-link
 19    276 fe80::9947:d298:f006:7a0c/128
                                    On-link
  1    306 ff00::/8                 On-link
 22    276 ff00::/8                 On-link
 10    266 ff00::/8                 On-link
 18    276 ff00::/8                 On-link
 19    276 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None
share|improve this question
    
Please post your routing table –  MariusMatutiae Feb 3 at 9:50
    
I've updated the question with the batch file I use, and the Routing table. Thanks. –  Obsidian Phoenix Feb 3 at 9:58

1 Answer 1

up vote 1 down vote accepted

Your routing table looks just fine, so what is happening is that the pptp server at work is pushing to your machine the choice of DNS servers.

You should ensure that my Type of VPN is set to PPTP, not automatic, that IPV6 is unticked on the networking tab, and use the following DNS is not set to the VPN's endpoint DNS (i.e the one at the office), but to some known set of DNS.

If you do not have a favorite set of DNSs, then Google's (8.8.4.4 and 8.8.8.8) wil do just fine. Enter those.

Edit:

On second thought, I realized my answer was too terse, so here we go.

To see your current set of DNSs,

    netsh interface ipv4 show dnsservers

There will be some lines of this kind:

   Configuration for interface "Your_VPN"
 Statically Configured DNS Servers:   aa.bb.cc.dd
                                      ee.ff.gg.hh
   Configuration for interface "Local Network Connection"
  DNS servers configured through DHCP:  192.168.1.1
                                        192.168.1.2

You may erase the DNSs for the VPN by means of:

   netsh interface ipv4 delete dnsservers name="Your_VPN_Interface_Name" address=all validate=no

Your VPN interface name should be ppp0, but you better check that.

Lastly, this command adds your VPN DNSs, in case you should need these to resolve host names on the remote LAN, but it places them in the back seat with respect to the DNS of your local network, so that they are called upon only if the local DNSs fail (i.e., for the remote LAN):

netsh interface ipv4 add dnsservers name="<Interface Name>" address=<Non-VPN DNS server> index=1 validate=no

Careful: this command should not be used after the previous one, but instead of it: this way, you will not delete your VPN DNSs, just demote them to the backup role.

share|improve this answer
    
Thanks. That seems to have resolved my issue with internet access. I thought your last comments might fix my ability to locate network resources by name, but that doesn't appear to be the case. Unfortunate, but I can probably live without it. –  Obsidian Phoenix Feb 3 at 13:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.