Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I set up my hosts file in Windows 7, so I can't access certain time-wasting sites. It works fine when I am back home, but as soon as I connect to my University's WLAN, I can still access all sites that I thought were blocked.

So apparently I need to either modify a different file OR need to find out which IP adress to use.

My University's WLAN requires me to authenticate via a login screen, but I'm afraid I don't know much more about its specifications.

share|improve this question

1 Answer 1

1) This could account for your issue. If you right-click the hosts file and select properties, it should show a Type of File of just "file". If it shows something else, like "Text Document (.txt)" then it has an extension. The hosts file should have no extension. By default, Windows does not show extensions.

2) Are the entries in the hosts file in the proper format? To block a site using a hosts file, enter a line with the loopback address of 127.0.0.1 which points to your own computer, then a space or tab, then the domain that you are blocking. For instance:

127.0.0.1 superuser.com

3) Some computer infections will repopulate the hosts file with whatever they wish to be there. Others will intercept DNS calls and send you to wherever they wish you to go. If your computer may be infected, then check it and remove any of the viruses/malware.

More ... The DNS Client Resolver on each computer loads up whatever is in the hosts file, then each lookup that is done, so that it does not have to request it from a DNS server again in the near future. So if it does not find it in the local DNS Cache, then it sends a query to a DNS server for the answer. In Windows, the hosts file is found under C:\Windows\System32\drivers\etc.

There is not an IP address to use that is specific to each blocked website -- just the one that points to your own computer, 127.0.0.1 (or any IP Address that you wish that does not lead to the site you wish to block).

Some people take the hosts file to extremes and have hundreds of thousands of entries. That is counter productive to the web performance of the computer. If you need that many, then use OpenDns.com or run your own DNS Server. They are designed to filter many addresses; your DNS Resolver Client is a client; it is not meant to do the work of a server.

-- Patrick B.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.