Is it possible to modify the entries in the cached lookup? I need to temporarily change the resolution of an IP address of a domain name to something else. I can't wait until DNS updates.

Sorry, forgot to mention that the interface of the server has DNS set to itself. DNS server is running.


Create an authoritative zone in your Windows 2003 DNS with the copy of the updated zone.

This is a common practice (for instance) to rewrite the company's web IP address or to block a site.

  • i thought that you're not supposed to make an authoritive zone for domains that you do not own/manage.
    – Mike
    Apr 8 '10 at 4:43
  • 1
    In your own network you do whatever you want! :)
    – lrosa
    Apr 8 '10 at 4:59
  • I would do it absolutely the same way. Apr 8 '10 at 5:20
  • Good! Nice to be helpful!
    – lrosa
    Apr 8 '10 at 5:34

You can edit the hosts file (under c:\windows\system32\drivers\etc) to put an IP and hostname combination which will override the DNS resolver. Just remember to remove the entry when you're done to avoid any confusion in the future.

  • I've done that... but it still resolves the address to the other IP
    – Mike
    Apr 8 '10 at 4:30
  • Did you flush the local DNS cache? ipconfig -flushdns Apr 8 '10 at 4:32
  • Yes, I have flushed the DNS cache. Still resolving the old IP
    – Mike
    Apr 8 '10 at 4:37
  • The .../etc/hosts file is used by local (e.g. the machine in with the file is) resolver. The DNS server does not read the .../etc/hosts file when does name resolutions for clients
    – lrosa
    Apr 8 '10 at 5:08
  • It works only for server itself, not for clients. Apr 8 '10 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy