Compatible Support Forums: URL / IP blocking in Win2K ?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

URL / IP blocking in Win2K ?

#1 User is offline   reversing_drive 

  • member
  • Group: Members
  • Posts: 137
  • Joined: 26-July 01

Posted 20 March 2002 - 06:14 PM

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,
0

#2 User is offline   clutch 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 3859
  • Joined: 29-March 00

Posted 20 March 2002 - 07:44 PM

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.
0

#3 User is offline   reversing_drive 

  • member
  • Group: Members
  • Posts: 137
  • Joined: 26-July 01

Posted 21 March 2002 - 10:14 AM

This sounds just like what i was after, thanks..:D

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.
0

#4 User is offline   Xiven 

  • addict
  • Group: Members
  • Posts: 690
  • Joined: 21-May 00

Posted 21 March 2002 - 12:25 PM

127.0.0.1 www.yahoo.com


will block everything at www.yahoo.com
0

#5 User is offline   reversing_drive 

  • member
  • Group: Members
  • Posts: 137
  • Joined: 26-July 01

Posted 26 March 2002 - 01:51 PM

Quote:
[B]# 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,
0

#6 User is offline   clutch 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 3859
  • Joined: 29-March 00

Posted 26 March 2002 - 05:20 PM

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.
0

#7 User is offline   reversing_drive 

  • member
  • Group: Members
  • Posts: 137
  • Joined: 26-July 01

Posted 27 March 2002 - 06:28 PM

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,
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users