![]() |
IOBit Software
|
|
|
||||||
| Software Software such as operating systems like Windows XP, Windows Vista, Windows 7 etc., or specific programs. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Can someone tell me what the hosts file is and does?
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
| Sponsored links |
|
|
|
#2
|
||||
|
||||
|
eclayton,
Found this, let me know if you want the link for the long version. The short answer is that the Hosts file is like an address book. When you type an address like www.yahoo.com into your browser, the Hosts file is consulted to see if you have the IP address, or "telephone number," for that site. If you do, then your computer will "call it" and the site will open. If not, your computer will ask your ISP's (internet service provider) computer for the phone number before it can "call" that site. Most of the time, you do not have addresses in your "address book," because you have not put any there. Therefore, most of the time your computer asks for the IP address from your ISP to find sites. If you put ad server names into your Hosts file with your own computer's IP address, your computer will never be able to contact the ad server. It will try to, but it will be simply calling itself and get a "busy signal" of sorts. Your computer will then give up calling the ad server and no ads will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block. Steve
__________________
PLEASE DO NOT PM ME WITH QUESTIONS REGARDING MARRIAGE RELATED ISSUES Momma always said "be good".......but she's been wrong before. |
|
#3
|
||||
|
||||
|
Thanks, Matacumbie,
So where is the Hosts file located? I wouldn't mind having that link either! ![]()
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
|
#4
|
||||
|
||||
|
eclayton,
Here, http://www.accs-net.com/hosts/what_is_hosts.html other articles and issues I came across the file was in different places. Steve
__________________
PLEASE DO NOT PM ME WITH QUESTIONS REGARDING MARRIAGE RELATED ISSUES Momma always said "be good".......but she's been wrong before. |
|
#5
|
||||
|
||||
|
eric,
my hosts file is in C:\WINDOWS\system32\drivers\etc (posted mine, b/c i thought they were supposed to be in C:\WINDOWS\system32\drivers) oh yeah...windows xp |
| Sponsored links |
|
|
|
#6
|
||||
|
||||
|
Eric - if I remember right you're using Win2000, so from Ace's post replace "windows" with "winnt" and there it is. You can also do a Find on "hosts" to get at it quicker.
|
|
#7
|
||||
|
||||
|
Use the hosts file that NICK ADSL UK posts: http://forums.majorgeeks.com/showthread.php?t=38130
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
#8
|
||||
|
||||
|
Quote:
Okay, so, if I use the list that Nick posted, and I'm using Spyware blaster, do I just copy and paste those files in the hosts file section of Spyware Blaster? There are also some that are supposed to go into the restricted pages......seems I have my work cut out for me if I do this, but from the sounds of it, it's worth it...... Do I have this right?
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
|
#9
|
||||
|
||||
|
Quote:
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
#10
|
||||
|
||||
|
Okay, that makes sense, but I'm still not sure how to edit my hosts file.
Can someone walk me through it step by step?
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
| Sponsored links |
|
|
|
#11
|
||||
|
||||
|
Well, maybe I figured this out.
I opened the second link on Nicks post, downloaded the zip file, then copied it and pasted it over top of my old hosts file in C:Windows/system32/drivers/etc I hope that was right.......
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
|
#12
|
||||
|
||||
|
ec, check out my post today in http://forums.majorgeeks.com/showthread.php?t=38366 in answer to laurieB's question on hosts file. Lots of old MG links there that expand on what is posted here. Beware laurieB 's post hijacked part way through. Look for my post today. bazza.
=== Quote:
|
|
#13
|
||||
|
||||
|
Quote:
However, the new hosts will protect you from adverts, etc.
__________________
...when you have excluded the impossible, whatever remains, however improbable, must be the truth. |
|
#14
|
||||
|
||||
|
I don't think I had a hosts file, because I never made one. Anyway, it's done now!
![]() How do I go about adding the actual addresses of the sites that I want to browse faster? How do i find the number of the site, say, for Major Geeks? I appreciate everyone's help, I'm learning alot here, it's fun! ![]()
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
|
#15
|
||||
|
||||
|
Quote:
The default one looks like this: Code:
# Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # 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 Quote:
Code:
C:\>nslookup www.majorgeeks.com Server: you.dns.server.here.com Address: xxx.xxx.xxx.xxx Non-authoritative answer: Name: www.majorgeeks.com Address: 67.19.72.100 Code:
67.19.72.100 www.majorgeeks.com
__________________
"Those who will not reason are bigots; those who cannot are fools; and those who dare not are slaves." -- Lord Byron Windows 2k/XP Stop Error and Bug Check Codes: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/DevTest_g/hh/DevTest_g/BCIntro_ea8b9fd0-2d81-4a04-a7ed-c1c6a80bd501.xml.asp |
| Sponsored links |
|
|
|
#16
|
||||
|
||||
|
Very Cool! Thanks so much for the detailed info, it was easy to do. I went ahead and did it with MG, then went to do it with Yahoo......Yahoo has a few addresses. Do I need to enter each line seperately?
__________________
"The best defense is an honest life." Horatio Caine, CSI Miami. "Everyone wastes time wishing they were somewhere else. If you can't be where you are, you're nowhere." (loose translation from Col. Potter, M.A.S.H. 4077) "I wouldn't pray to God about Math, I'm fairly certain the Devil created it." - Wenchie |
|
#17
|
||||
|
||||
|
Yes. You have to have a line break between each entry (i.e., only one per line), and there must be at least one space between the IP address and the domain name. Also, you can't use wildcards in a hosts file, so *.majorgeeks.com wouldn't be valid, even if www.majorgeeks.com and forums.majorgeeks.com were on the same server. (www.mg.c and forums.mg.c aren't even on the same network, so take note of that if you add both to your hosts file; they have different IP addresses
.)
__________________
"Those who will not reason are bigots; those who cannot are fools; and those who dare not are slaves." -- Lord Byron Windows 2k/XP Stop Error and Bug Check Codes: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/DevTest_g/hh/DevTest_g/BCIntro_ea8b9fd0-2d81-4a04-a7ed-c1c6a80bd501.xml.asp |
|
#18
|
||||
|
||||
|
hmmm i'm confused... i thought peopel just edited their hosts file to block certain sites... what was the benefit of Eric adding the majorgeeks IP?
:my particular hosts file doesn't have any addy's but it was set to "read only" in properties...
__________________
norml.org |
|
#19
|
|||
|
|||
|
Have read this post with great interest and I have located the hosts file on my C drive (am using windows CP home).
When I opened the hosts file with notepad and added a URL (had obtained the nslookup details) and then went to save it, I had to save as a new file, did not save the file I had opened up. Does this mean that "nothing" is happening? Will my saved file override the original file or is the original file without my additional entry being used?? thanks for your help |
|
#20
|
||||
|
||||
|
Quote:
So, whenever a web browser or other piece of software requests DNS name resolution, it can find frequently used domain names in the dynamic or static cache. By default, the static cache only has the one entery for localhost, so the dynamic cache is the only one used. However, there's some problems with the dynamic cache. First, the size of the cache is limited. So eventually you'll start popping out old domains for new ones. Second, domain names not from the hosts file only stay in the cache for a set amount of time (known as a time-to-live) before being removed from the cache. Additionally, if you restart the system the dynamic cache automatically gets reset. The hosts file (static cache) doesn't have a fixed limit (and, to the best of my knowledge, doesn't take up any of the dynamic's size limit) and the entries never expire, so Windows never has to go out and ask the DNS server where www.google.com is, for example. There's a few problems with the hosts file, however. First, you have to edit the file manually. It's not automatic like the dynamic cache, so it requires a lot of user action to configure. Second, because it's static it doesn't take into account DNS changes. If the IP for www.google.com happens to change, for example, you will not be able to access that website until you manyally edit the hosts file again. Still, the hosts file does have a wide number of uses. because it can point to the wrong IP address, a lot of ad sites and spy sites can be added to hosts file and told to point to the IP address 127.0.0.1, a special IP address called the loopback (actually, it's any address with the first octect of 127). It always means "this machine". So if you point all these bad sites at the loopback IP, they go nowhere and just time out. However, there are also some types of malware that purposefully alter the hosts file. What if you put in an entry that pointed www.google.com to the Bonzi Buddy homepage? Therefore, a lot of spyware protection programs make the hosts file read-only to help prevent this kind of DNS cache poisoning. If you want to see the contents of the DNS cache, you can open up a command prompt and type "ipconfig /displaydns". You can empty the dynamic cache by entering "ipconfig /flushdns". On this page, scroll down to #2 and you'll see some registry hacks to improve the performance of the Windows dynamic DNS cache (but I've never used them so I can't exactly recommend it).
__________________
"Those who will not reason are bigots; those who cannot are fools; and those who dare not are slaves." -- Lord Byron Windows 2k/XP Stop Error and Bug Check Codes: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/DevTest_g/hh/DevTest_g/BCIntro_ea8b9fd0-2d81-4a04-a7ed-c1c6a80bd501.xml.asp |
| Sponsored links |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|