August 13th, 2002, 05:15 AM
The Hosts File and online privacy
The Hosts File and online privacy
In order to understand how the hosts file works, you need at least an elementary understanding of URLs.
An absolute beginners explanation of URLs and Name Servers:
URLS are like the names listed in a telephone speed dialer. These names must to be converted into phone numbers by the speed dialer before you can call anyone. With URLs it’s basically the same, only instead of phone numbers they are converted into IP addresses. This is normally done threw the use of Name Servers. Extremely simplified, Name servers are phone books for URLs. They take the name you give it and turn it into an ip address. The use of names instead of numbers makes it easier for the user to remember.
When you type in: www.antionline.com
Your computer checks with the name server you have listed in your TCP/IP settings and translates the URL into:
This is what’s known as resolving a URL
Most Dial-up accounts automate their set-up process to add these DNS (Domain Name Server) settings automatically or by assigning them at logon time, threw the use of DHCP. For this reason most users never know they exist.
What is even lesser know, is the fact that using name servers, is the secondary method of resolving URL’s. Computers, by default, look in the hosts file first. Upon not finding it there, they then proceed to the primary DNS and then to the secondary.
How is this of value to us?
If a URL is resolved in the hosts file, the computer looks no further, so if you wanted your browser not to find the correct address you can tell it the URL is located on the local computer, by assigning it the loop-back address, 127.0.0.1 in the hosts file.
Now when you type in Microsoft.com, all you get is “404 page not found”
The most common way you are tracked on the Internet, is threw the use of ad graphics. Some graphics used for this, are only 1 pixel by 1 pixel and transparent, so you wouldn’t be aware of them unless you had your computer set up to detect them, using some thing like bugnosis from Privacy.org. These graphics load onto the web page you are viewing threw the use of html image source tags or code that tells your web browser where to get these image files from. These graphics are stored on the marketers servers and not on the server you requested the web page from. Ever time you load the web page you are also making requests to the marketers to view their graphics. These requests are logged on their servers, along with your ip address, browser type OS etc. Cookies often accompany these graphics so they can get even more personal.
To learn more about the dangers of third party graphics and web bugs:
If you are constantly annoyed, by marketers like doubleclick, trying to place cookies on you computer to track you, this is a way, other than using third party software, to stop them.
Marketing companies often use streaming media (or screaming media) to get their message to you, and you have to wait for long periods of time, especially on a 56k connection, for them to load before you can view the page you want. Blocking those ads will increase speed dramatically on ad intensive sites.
I like to add the address of each ad graphic I find, to the hosts file myself, it gives me a great sense of satisfaction to press F5 and not see it come back, but this can be rather time consuming. Below is a link that will give you a regularly updated list of these leeches. On this page, there is also a script that will automatically update your hosts file for you, if you like. (Linux users will have to copy and paste.)
For those of you who favor the DIY method you can find the hosts file:
For Win9x: c:\windows\hosts.sam
For Win2k/NT: c:\winnt\system32\drivers\etc\hosts
For WinXP: c:\windows\system32\drivers\etc\hosts
For *nix: /etc/hosts
For Macintosh: Hosts in Preference folder
Right click on the offending ad and go to properties. There you’ll see the URL where this graphic is located. Using your mouse highlight the address from the beginning of the name through the com, org, net or gov extention. Right click and copy or press Ctrl + C.
As an example: if in properties it gave the address as: “http://ads2.doubleclick.com/images/whatever” you would only copy “ads2.doubleclick.com”. This will stop any ads that may come from this server not just the one your looking at. Open the hosts file in notepad and type in the loop-back address followed by a tab then paste in the address:
Some like using 0.0.0.0 instead of 127.0.0.1 and this may be faster, because your browser doesn’t even look for the web page (graphic) but this method does not work on all systems.
I hope this has been of help to some.
Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”
August 13th, 2002, 11:52 AM
Very nice tutorial, Tedob1. Your tut covers an excellent alternative for anyone that wants online privacy, but chooses not to install privacy software. I've always preferred the do-it-yourself approach. Great work!
August 13th, 2002, 01:14 PM
Bloody marvellous that!! A tutorial that's easy to follow for a newbie.