networking - Windows 7 ICS - disable DNS proxy

08
2014-07
  • Zove Games

    I'm using ICS (Internet Connection Sharing) to bridge my computer's internet connection to a wi-fi hosted network. However, I would like to define custom DNS host-to-IP mappings on the ICS network.

    I tried editing C:\Windows\System32\drivers\etc\hosts.ics, but windows just ignores and overwrites my changes.

    I tried running my own DNS server, but obviously it won't bind because windows is already running its own ICS DNS server.

    I tried disabling the ICS DNS server through registry settings, but my registry does not contain the key HKLM\System\CurrentControlSet\Services\ICSharing

    How can I make custom DNS rules for ICS?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    networking - With Windows 7, why is an entry in the hosts file not working?
  • Questioner

    I updated some entries in the hosts file at C:\WINDOWS\System32\drivers\etc. As a test, I decided to make Google point to 127.0.0.1.

    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    127.0.0.1       localhost
    ::1             localhost
    127.0.0.1       google.com
    

    This works fine on Windows Vista, but not on Widows 7. When I type google.com into my browser, it goes directly to Google's website.

    I am not using a proxy server, and I think there might be some temporary DNS settings that need to be flushed, but I'm not sure.

    Does anyone know how to fix this?


  • Related Answers
  • William Hilsum

    You may have to restart Internet Explorer or Firefox, or whatever browser you are using.

    Also, try going to command prompt and typing:

    ipconfig /flushdns
    

    Lastly, double check you are typing google.com in the address bar and remember that both google.com and www.google.com are completely different as far as DNS is concerned and you will need to add an entry for both.

  • idkwhattoputhere

    An addition to @wil's answer.

    the spaces between the IP and the host name is so important under windows 7

    127.0.0.1       localhost
    

    Under vista, a tab works perfectly, but under windows 7, it seems that it must be 8 spaces

  • Lervzc

    Here is what i did, when that all above solutions failed. go to: C:\Windows\winsxs Search for "hosts" for me it is located at: C:\Windows\winsxs\x86_microsoft-windows-w..nfrastructure-other_31bf3856ad364e35_6.1.7600.16385_none_045b589158ae90da\hosts

    right-click it>> properties>> security>> advance>> owner tab change ownership to administrators, next change permissions of the file to full control to administrators group.

    Edit the hosts file with the entries.

    Disable chrome's dns pre-fetching as it could cache ip addresses of many sites. Also check your internet settings and disable any proxy servers you are using.

  • Seasoned Advice (cooking)

    win 7 firewall control common domain name and does not override them with your hosts file.

    so that localhost works, instead google.com no.

    so just disable windows firewall service, and restart pc.

    bye