WIN2K and Hosts file question...

Recently I integrated the relatively well known Dan Pollock hosts file into my home WIN2K Professional workstation Hosts file.

The goal was to prevent my workstation pointing to advertising URL’s and it works well.

However, now, when I log on to various URL’s as I’m doing my surfing, my system asks for a Networking login and password for each URL which is an advertsing site which is now being diverted to 127.0.0.1 via the Hosts file. This hasn’t happened on other machines running other OS variations like WIN98 and WINXP.

Is there a registry setting or some known OS setting I need to know about to get around this? What happens is that the inbound html stream hangs for each advertising URL and won’t go any further unless I hit the Networking Cancel button to proceed, which is a small pain in the ass as you can imagine. I have confirmed that if I reload the original Hosts file, the Network Logon issue goes away but then, I start getting the crappy popups again!

All feedback welcome and thanking you all in advance!

Kind Regards, Ive.

Are you running any kind of web server on your local machine? If it is looking to 127.0.0.1 for each advertisement, and you are running a web server of some kind requiring a login, you will have this trouble.

If you are not running a server that you know of, do a netstat -a to see if anything is listening on port 80.

If you are still stuck, post the output fromt he netstat -a command.

Ahhh yes… indeed I’m running IIS on this particular machine. It’s the 5.1 version of IIS which only allows one website at a time. It’s a website development workstation.

So it could be a login permissions thing? Perhaps I have to modify the anonymous login parameters in some way?

Once again, thank you very much in advance…

You’re not going to be able to direct the ads to 127.0.0.1 and also have your dev IIS server answering all 127.0.0.1 traffic unless you set the dev server to accept annonymous authentication (ie turn authentication off).

In IIS 6.0 that’s controlled by the IIS MMC; look under the website’s properties page under the directory security tab; I’m not sure about IIS 5.1.

You can try a couple of other things if messing with IIS’s settings will bung up your development efforts.

You can set IIS to only accept a host header of "localhost"and it’ll ignore the adverts directed to 127.0.0.1. Again I’m talking IIS 6.0; 5.1 may not have that capability.

Another technique is to replace every advert 127.0.0.1 reference with 0.0.0.0 instead. That may or may not work; sometimes it leads to TCP hangs or huge timeout delays.

Yet another approach is to bind a second IP address to your NIC. If it’s now on 192.168.1.1, add a second address at, say, 192.168.1.3 & replace all the advert 127.0.0.1 ref’s with 192.168.1.3. The configuren IIS to listen for your dev traffic on 127.0.0.1 only, not all IP addresses. Again I’m talking IIS 6.0; 5.1 may not have that capability.

Finally, you could just point the adverts at 192.168.1.x for any x that is not present on your network. That may lead to slow loads of non-advertising graphics & icons & other auxiliary page content, but it will work to kill the ads.

Success! Indeed, IIS was the culprit.

Even though I was providing anonymous access via IIS and was NOT requiring login authentication, my problem was caused by the fact that my anonymous access account was a disabled user account within WIN2K. As soon as I pointed my anonymous web access username within IIS to an enabled guest username, the problem went away.

Many thank you’s for your assistance guys.