reversing_drive 0 Posted March 20, 2002 Is there a way to block access to certain URL's & IP adresses in Win2K by foraging in the registry or something? I want to use this techique to block against adservers ect.. I don't want to install 3rd party programs and stuff if it can be done mauallly in 2K. I heard it can be done in XP somehow, but how do i do it in Win2K? Oh.. if you know, for that matter is it possible in NT4? Win2K SP2, IE5.5 SP2, NT4, IE6 Cheers, Share this post Link to post
clutch 1 Posted March 20, 2002 Go to %windir%\system32\drivers\etc and open the "hosts" file in notepad. Then, just put in the domain names that you want to "block" and the IP that you want the requests to go to (like 127.0.0.1). The hosts file will be scanned first before your DNS servers, so anything listed on here will be resolved from this file rather than an outside source. To test this, enter your domain name and IP that you want to block, and then bring up the command prompt. From there, type "ipconfig /flushdns" and that will flush out any DNS mappings that are already in the localhost. Then, ping the domain name that you listed. Share this post Link to post
reversing_drive 0 Posted March 21, 2002 This sounds just like what i was after, thanks.. However i am not quite with you in configuring this file, and i just realised that i am not sure how to get the IP adress for a specific URL. Say i want to block anything and everything at the domain www.yahoo.com , including www.yahoo.com/subcategories/ What would be the snippet of text i would put in the hosts file? Thanks heaps Clutch, Cheers. Share this post Link to post
Xiven 0 Posted March 21, 2002 127.0.0.1 www.yahoo.com will block everything at www.yahoo.com Share this post Link to post
reversing_drive 0 Posted March 26, 2002 Quote: # Copyright © 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 -- Removed examples -- Is this a valid configuration of the hosts file? Any tips on how this would affect browsing the net would be greatly appreciated, Thanks Guys. Cheers, Share this post Link to post
clutch 1 Posted March 26, 2002 Well, I am not sure about the geocities one with the slash in it, but other than that it looks fine. As for browsing, it *should* speed it up a slight amount as your system will not only be saved the time of resolving those network names, but it will also save the system time in downloading anything from those sites. Share this post Link to post
reversing_drive 0 Posted March 27, 2002 Thanks, I find tis really neat:D Funny i have never heard of this before or seen utilities or plugins which tweak this file for blocking. Cheers, Share this post Link to post