hosts file to block or correct ip address

M

marks542004

Hi,

I have two situation that I believe should be fixed using the hosts
file, however it isnt working.


1. block a site by using bad ip address.

I put an entry 198.168.20.2 www.mysite.com

into hosts. This should be a bad address and get me an error accessing
the web site. However using IE6 and firefox the site comes up normally.

2. Correct an ip address. For some reason a name server is providing an
old address for a specific site. I thought an entry in hosts would
correct it but that doesnt seem to work either.


Is the hosts fuile actually used in win xp ?

My virus guard program pops up when I change the hosts file in
c:\windows\system32\drivers\etc so I assume thats the active one.

there are also hosts files in c:\windows\I386 and c:\windows\system
 
D

DanS

(e-mail address removed) wrote in @m79g2000cwm.googlegroups.com:
Hi,

I have two situation that I believe should be fixed using the hosts
file, however it isnt working.


1. block a site by using bad ip address.

I put an entry 198.168.20.2 www.mysite.com

into hosts. This should be a bad address and get me an error accessing
the web site. However using IE6 and firefox the site comes up normally.

2. Correct an ip address. For some reason a name server is providing an
old address for a specific site. I thought an entry in hosts would
correct it but that doesnt seem to work either.

Did you flush the DNS cache (at a cmd prompt- ipconfig /flushdns) ? Most
HOSTS file block redirect to 127.0.0.1, although I'm sure that has nothing
to do with it.
 
F

Frank Saunders, MS-MVP OE

DanS said:
(e-mail address removed) wrote in @m79g2000cwm.googlegroups.com:


Did you flush the DNS cache (at a cmd prompt- ipconfig /flushdns) ? Most
HOSTS file block redirect to 127.0.0.1, although I'm sure that has nothing
to do with it.

Are you using the Hosts file in
C:\Windows\System32\Drivers\etc ?
Did you run
ipconfig /flushdns
?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top