Loading ...
Sorry, an error occurred while loading the content.

55531Re: [linux] Re: Whatever happened to "Linux Magazine"?

Expand Messages
  • Godwin Stewart
    Apr 2, 2009
    • 0 Attachment
      Hash: SHA1

      On 02/04/09 14:48, Harold Williams wrote:

      > At the risk of looking really dumb...Could someone explain what using
      > /etc/hosts means?

      /etc/hosts contains the IP addresses of domain names. The resolver goes
      through it when looking to resolve a domain name before asking DNS.
      Therefore, if you have a line stating that, for example, ads.doubleclick.net
      is on IP address, your browser will use that address and redirect
      requests for that host to localhost instead of looking up the domain via DNS.

      It's a quick and dirty way of making ads hosted on domains "redirected" this
      way impossible for your browser to find and therefore display, but it does
      have two drawbacks:

      1) You need to have a line for every subdomain under a domain that you want
      to conceal. So, if you want to conceal, say, host1.exmple.net,
      host2.example.net all the way through host1000.example.net, you'd need to
      add 1000 such lines to /etc/hosts.

      2) It causes your networking subsystem to waste time trying to open a
      connection on your own machine.

      The DNS method is preferable because:

      1) You can make the whole "example.net" domain disappear in one go with one
      simple directive in your local nameserver's configuration file.

      2) Domains concealed in this way really do disappear. The resolver is fed
      information that the hostname you're trying to resolve simply doesn't exist.
      No attempt to open a connection on your machine will take place.

      - --
      G. Stewart - grs.ygroups@...

      The quickest way to double your money is to fold it in half and put it
      back in your pocket.
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.7 (GNU/Linux)
      Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

      -----END PGP SIGNATURE-----
    • Show all 25 messages in this topic