HOSTS file not being read

Discussion in 'Windows Desktop Systems' started by muzikool, Dec 6, 2005.

  1. muzikool

    muzikool Act your wage. Political User

    I've got entries in my HOSTS file that resolve NETBIOS names on the network here. I can't ping the names but I can ping the IP addresses. Also, the sites I have blocked (going to localhost) are loading fine in my browser. So, I've determined that the HOSTS file is not being read for some reason.

    Things I've tried:

    *Rebooting
    *releasing and renewing my IP
    *flushing the DNS cache

    Any ideas?
     
  2. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    Stand alone machine, or part of a network?

    When did this start happening?
     
  3. muzikool

    muzikool Act your wage. Political User

    Part of a network (at work).

    It happened after I cleared the HOSTS file (to only localhost) to test some things. I then put the original HOSTS file back in, and since then I've had trouble.

    The MS KB suggested the same things I've already tried. :ermm:
     
  4. Mastershakes

    Mastershakes Moderator

    Messages:
    1,721
    Location:
    Montreal
    Is it known as hosts.txt or hosts?

    Go to cmd prompt, make sure.

    type in this, if it gives no errors, your host file should start working again.

    rename hosts.txt hosts (press enter)
     
  5. muzikool

    muzikool Act your wage. Political User

    hosts

    There is no file extension.
     
  6. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    Yeah the hosts file doesn't have an extension.

    It's possible it's a file that is configured through the network, is it possible to copy it from another PC?

    EDIT: Also, can you delete it, let Windows re-create the file, then alter the content?
     
  7. Mastershakes

    Mastershakes Moderator

    Messages:
    1,721
    Location:
    Montreal
    When you swapped it out, it gained that .txt extention... my guess anyways... still looking.
     
  8. muzikool

    muzikool Act your wage. Political User

    Nope, no .txt extension. It even has the generic file icon.

    I tried removing all entries again, saving, adding, resaving, rebooting, flushing dns cache again. Ugh.

    I'm going to delete it altogether and let Windows recreate it.
     
  9. muzikool

    muzikool Act your wage. Political User

    Problem solved.

    I deleted the HOSTS file altogether and rebooted. Windows did not recreate one after the reboot, but adding it back in manually worked.

    Not sure why all this happened. Not sure why Microsoft's suggestions didn't work either.
     
  10. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    Windows has a habit of not working when you need it, and then working again later :p
     
  11. muzikool

    muzikool Act your wage. Political User

    Yeah, I remember that now. :p
     
  12. Mastershakes

    Mastershakes Moderator

    Messages:
    1,721
    Location:
    Montreal
    Cool - only other thing I could think of was this - verifying that the registry is pointing to your hosts file. Glad you fixed it. Hate those ads ;)

    «HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters»

    Value should be "%SystemRoot%\system32\drivers\etc"
     
  13. muzikool

    muzikool Act your wage. Political User

    It would have been strange if that entry had been modified. Sometimes Windows has a mind of its own.
     
  14. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    that's a hot find :)

    Muzikool, I believe (although I could be wrong), the hosts file won't auto-recreate until you try to access the internet. When you say that Windows didn't recreate it, did you check right after boot, before utilizing your internet connection?
     
  15. muzikool

    muzikool Act your wage. Political User

    I browsed around a bit before looking for it. It never showed up.
     
  16. Claud1o

    Claud1o OSNN One Post Wonder

    Messages:
    1
    Thank you so much, I guess it's the first thing I should have tried. I've wasted so much time on this one it's unbelievable. I'm so sick of Windows and all of this nonsense one has to put up with in order to keep it working. I messed up a demo and made a pathetic impression being unable to access my virtual hosts. This might just have been the last straw.

    Sorry for the rant but I am really so sick of all I had to endure with this horrific OS. I had better stop now as I really feel I'm going postal.

    Thanks for the solution,
    Claudio