Hosts file and suppressing access
 
  Tweaks.com
 Home    Members    Calendar    Who's On        Main Site
 



««12

Hosts file and suppressing accessExpand / Collapse
Author
Message
Posted 7/27/2003 4:58 PM


New Member

New MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew Member

Group: Forum Members
Last Login: 3/28/2004 7:08 PM
Posts: 54, Visits: 1
Within the folder;



System32\drivers\etc



The following files are present:



hosts (my creation)

hosts.bak (my creation)

hosts.sav (my creation)

lmhosts.sam

networks

protocol

services



The file "hosts.sav" gets copied over "hosts" whenever I want to activate the suppression of certain websites.



When I want to have full access, I simply delete the "hosts" file.



Problem is, that whenever I reboot (with the "hosts" file active (read: present)) and then (first thing) attempt access to a controlled website that is listed under the ACTIVE file "hosts", I GAIN ACCESS. This is not suppoesed to happen. It is only when I copy/replace the current version with "hosts.sav" that THEN it will (correctly) not enter certain websites.



Very strange thing. It is almost like the browser (Opera or MSIE) does not bother looking at the "hosts" file UNLESS I apply focus to it.





Any ideas on why this happens in XP? Workarounds?





Thanks in advance,



Miles



Post #683
Posted 7/27/2003 4:58 PM


Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: 8/24/2006 7:13 PM
Posts: 3,118, Visits: 4

there is some work piddled with here on the priorities of how the DNS (domain name service) is done.  from what i can figure these priorities determine the order that DNS is aquired.


the onboard dns cache, the local network , the hosts file, and from the dns server (on the web as pointed to by the dns server in the net settings).


i would guess that in this situation you mentined that DNS is going to the cache, and resolving, without going to your hosts file first.  


it would be faster (or just as fast) to ketch the dns right from the dns cache, even if the hosts file was there.


ya see originally the hosts file was to RESOLVE addresses :-)  not to break them purposfully.


see this here article for thier description, and thier present priorities, there would be every reason to change the priority for specific TYPES of use, depending on the resources that one has to obtain dns.


http://support.microsoft.com/default.aspx?scid=kb;en-us;250662 (older windows info)


also there is reasearch that shows that lowering the priority number of these reg entries seems to resolve dns faster, like numbers of 1 & 2 instead of 500???


the dns cache is a service in XP and can be disabled, also registry entries can reduce the cache level to 0.


location for priorities in the XP registry  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider]


 


unnessisary notes: DNS is what turns a NAME to a IP # , so the computer can use it.



OK, so i am Guessing, but i try hard
Post #26599
Posted 7/27/2003 4:58 PM


Senior Forum Advisor

Senior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum AdvisorSenior Forum Advisor

Group: Senior Advisor
Last Login: 12/4/2005 12:31 AM
Posts: 4,743, Visits: 5
I use a modified Hosts file. If I want access to a *blocked* site I just go to (in IE of course) to tools > internet options > Connections tab > lan settings > and put a check in *automatically detect settings* > then I restart IE and the site loads.

Cheers

Post #26600
Posted 7/27/2003 4:58 PM


New Member

New MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew Member

Group: Forum Members
Last Login: 3/28/2004 7:08 PM
Posts: 54, Visits: 1
Further testing results in specific locations not working:



Example:



I can block the address:



a.r.tv.com



all day. However, I have to refresh the "hosts" file each time I attempt access to the following:



https://myaccounts.navyfcu.org/cgi-bin/ifsewwwc



The first try results in NO ACCESS. If I quit the browser and try again, I will make it through even though the hosts files is active.



Strange,



Miles

Post #26601
Posted 7/27/2003 4:58 PM
Forum Moderator

Forum ModeratorForum ModeratorForum ModeratorForum ModeratorForum ModeratorForum ModeratorForum ModeratorForum ModeratorForum ModeratorForum Moderator

Group: Moderators
Last Login: 8/13/2007 11:17 AM
Posts: 3,966, Visits: 1,057
Might be in your temporary Internet files.

 __________________________________________________

Post #26602
Posted 7/27/2003 4:58 PM


New Member

New MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew Member

Group: Forum Members
Last Login: 3/28/2004 7:08 PM
Posts: 54, Visits: 1
I have dumped the cache in Opera and then removed all Temporary Files via Webroots Window Washer each time I attempt to reset for a new test.







Miles

Post #26603
Posted 7/27/2003 4:58 PM


Senior Member

Senior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior MemberSenior Member

Group: Forum Members
Last Login: 8/24/2006 7:13 PM
Posts: 3,118, Visits: 4

here is the reg for killing the cache


http://home.covad.net/~zeiler07/Reg/DisableDNSCaching.html


a reg that can be altered to change priorities


http://home.covad.net/~zeiler07/Reg/FasterPageLoading.html


and the service called DNS client.


if your on cable, you can nuke all that stuff and the cache wont work at all, hopefully.   if your on dial-up stoping the dns cache might make access slower.


how about putting proper resolveable addresses in the hosts file, like at the top have the places that you DO want to go to in the hosts file with thier ip addresses, then you dont have any problem arriving on the sites that you DO want to get to?



OK, so i am Guessing, but i try hard
Post #26604
Posted 7/27/2003 4:58 PM


New Member

New MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew MemberNew Member

Group: Forum Members
Last Login: 3/28/2004 7:08 PM
Posts: 54, Visits: 1
Will try the links that you prescribed and perhaps change to the ip addresses.



I do use cable.







Much thanks,



Miles

Post #26605