Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hosts file not resolving names 1

Status
Not open for further replies.

brokenhalo

IS-IT--Management
Feb 24, 2008
169
0
0
US
Hello all, I have a riddle for you. This problem isn't life or death, but annoying more or less.

I use a hosts file to connect to remote clients via RDP. I don't want any of the entries in DNS. For some reason names in my host file won't resolve and its getting on my nerves that I have to copy/paste all of the IP addresses manually.

I am using Windows XP Pro, the host file has no extension and sits in the C:\Windows\System32\drivers\etc folder. The file itself is correct and the entries are placed in the correct format. I have spent hours trying to figure out why this wouldn't be working and can't arrive at any logical solution. Any help with this would be appreciated.

Brad L.
Systems Engineer
Prestige Technologies
bradlaszlo[at]prestigetech.com

"Some things Man was never meant to know. For everything else, there's Google.
 
Not that it helps your issue, but I question the whether or not the hosts file in C:\Windows\System32\drivers\etc actually works.

I say this because, supposedly, you can use this file to remove all sorts of ad content, like intellitext by using this file to resolve the links to local host so that it won't be pulled from the remote system. Never seemed to work, and changing this file seems to have no effect.

 
It should work just fine, make sure you aren't hiding extensions in your "Tools,Folder Options, View" Tab
Your hosts file could be corrupt, just delete it and create a new one , make sure you use notepad and save it without an extension

I have many , many entries and it blocks those sites just fine
#start of lines added by WinHelp2002
# [Misc A - Z]
127.0.0.1 ad.a8.net
127.0.0.1 asy.a8ww.net
127.0.0.1 #[Trojan-PSW.Win32.Maran.ei]
127.0.0.1 #[Spamdexing][Microsoft.Strider]
127.0.0.1 abc-search.info
 
I'll ask a silly question. Have you tried issuing a ping request against the hostnames in your hosts file?
 
ok - host file definitely is NOT corrupt. And also, no I cannot ping any hosts listed in the file - they don't resolve.

Brad L.
Systems Engineer
Prestige Technologies
bradlaszlo[at]prestigetech.com

"Some things Man was never meant to know. For everything else, there's Google.
 
Try ping -a <hostname> and take a look to see if an IP address is associated to your host entry
 
found this
Windows 2000/XP Pro also includes a service known as the DNS cache. You can locate it in your services listed as "DNS Client". To use Hosts you may need to stop and disable this service. Some machines seem to run Hosts without disabling this service. It is safe to turn it off and disable it.
 
You might be confused normntwrk... "It is safe to turn it off and disable it."

Actually, it is NOT safe to disable this... I emplore you to disable that service and try to point your browser to yahoo or any website for that matter by its DNS name - you will never get there. Also, if you use Active Directory you will break it. You need DNS to resolve names to IP addresses, and if you disable it you're screwed. Thanks for the research though.

Anyways, as I said before, the names listed in my host file will not resolve, this includes all ping requests.

Brad L.
Systems Engineer
Prestige Technologies
bradlaszlo[at]prestigetech.com

"Some things Man was never meant to know. For everything else, there's Google.
 
If the ping -a command didn't work, then there is something wrong with your hosts file. Rename the existing one hosts.ori and create a new file with just one entry

<IP address of your server> servername

and test it again
 
OK - deleted the hosts file and re-created it (as I have done twice before now) and somehow it works now! In this new hosts file I put 7 spaces as opposed to a single <tab>. Thanks for your help itsp1965!!!

Brad L.
Systems Engineer
Prestige Technologies
bradlaszlo[at]prestigetech.com

"Some things Man was never meant to know. For everything else, there's Google.
 
you may want to see if there is an network ACL denying you or anyone the ability to ping
 
NOTE also that when you are looking for a name this is DNS. if you cannot ping the name, try the fully qualified Domain name ping tree.forest.com

However if you cannot RDP via the WINS (NetBIOS) Name this is a WINS issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top