title: DNS local domain anti-spoofing on Windows 7?
body: <p>I'm looking for a way to customize the DNS resolution policy on Windows 7 as follows:</p>
  
  <p>1) For certain private domains, the request should be forwarded to a secure server of my choosing (likely VPN-connected).
  2) For all other requests, they should propagate as normal through the Windows DNS resolution system (i.e. the DNS servers from DHCP, in binding order, etc.)</p>
  
  <p>The main impetus would be to protect this private domain from spoofing (for example, in case I connect to a friendly free-WiFi hotspot which kindly forwards all hostnames to some proxy, causing my private connection requests to be directed to Starbucks' gateway server, which is conveniently in a non-private IP block - thus passing through my firewall as well).</p>
  
  <p>I've looked into a few solutions; the most promising seems to be running a personal configurable DNS forwarder on my system, with a kludge dummy adapter with 127.0.0.1 as a static DNS entry at the top of the binding list; this should force all DNS requests to pass through my forwarder, which can then filter and handle the private domain requests as necessary.  The problem lies in handling the remaining requests; passing them back to the Windows DNS stack seems like it would just produce an infinite forwarding loop, and no implementation (as far as I know) has special functionality like collecting the DNS server entries from Windows DHCP (other than the dummy entry) and trying them one by one.</p>
  
  <p>Letting the local forwarder stay silent seems like it may be a partial solution, since Windows will go on to try the other DNS servers; the worry is that Windows, in being "smart", may decide to skip the local forwarder on future requests as well; furthermore, there is the problem of incurring an ~2 second timeout on every new DNS request, which would be unfortunate.  An NXDOMAIN response would not work, since this would be binding (i.e. Windows would not continue trying the remaining servers).</p>
  
  <p>As a side note, unfortunately using a public DNS server (like OpenDNS, etc.) at the end of the chain also won't really work - as it happens, my laptop also connects to other private networks, which have their own private DNS servers and internal hostnames, served of course by DHCP - I want to avoid setting up a manual configuration for that as much as possible.</p>
  
  <p>Also tried setting up DNSSEC for my domain, until I realized that Windows 7 nicely includes DNSSEC support, but not a verifier; since it simply follows the "authenticate" bit set by its local friendly DNS server, it clearly won't do much against a spoofer.</p>
  
  <p>TLDR: I want to interject some custom handling to forward DNS for my personal domain to a personal server, but leave all other DNS handling with Windows' default behavior.  Anyone have tips?</p>
  
  <p>EDIT: As an addendum, should note that I'm looking for a system-wide solution, not just for Firefox - the connections in question are file shares, among other services.</p>