Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Has MSFT done anything with XP Lately?

My children's computers run XP as an application on their LINUX boxes. Recently, my daughter notices that her host file exclusion list is being ignored, i.e. she is getting to sites that she does not want to see on her machine.:

She coded her *\etc\hosts file is as follows:

# Copyright (c) 1998 Microsoft Corp.

# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98

# 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

127.0.0.1 www.asstr.org # Stupid site

127.0.0.1 www.bing.com # stop MSTF spying.

127.0.0.1 bing.com # stop MSTF spying.

Yet She still gets Bing.com and other blocked files.

This was working several months ago.

What has changed in XP

1 Answer

Relevance
  • 9 years ago
    Favorite Answer

    First of all, that file is "/etc/hosts".

    Second, it is NOT the "host file exclusion list". It is the local host file, part of the resolver. Its purpose is to identify which IP address is associated with those DNS domain names. The file is not needed at all if DNS is in use. But it does serve as a fall-back address resolver for times when DNS is non-responsive.

    The localhost address, 127.0.0.1, is the address that refers to the current machine. That is, is the the computer's address for talking to itself. That is why tying certain external domain addresses back to the localhost is such a handy blocking tool. You are fooling the network layer into talking to itself rather than to Bing.com or some other bad place.

    Here is the "catch". That trick only works if the local host file (/etc/hosts) is being read FIRST. Only id the file is consulted BEFORE DNS is queried. If DNS is asked for an address (given the name) and it answers, then the local /etc/hosts file is going to be ignored.

    Look at the /etc/nsswitch.conf file (NS Switch -- Name Service Switch) and make sure that "files" appears BEFORE "dns" does.

    grep hosts: /etc/nsswitch.conf

    hosts: files mdns4_minimal [NOTFOUND=return] dns

    _____^^^^^

    The "files" keyword appears first. DNS appears later further to the right.

    Finally, if a Microsoft XP system is running as a virtual machine, you will need to check the same kind of configuration (basically) on the XP system because XP is operating independently of the Linux host system. Note that the configuration files will be located in a different directory on XP than on a normal Linux system.

Still have questions? Get your answers by asking now.