<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<br>
On 08/12/2009 11:23 AM, Chris G wrote:
<blockquote cite="mid:20090812182344.GC15820@chris" type="cite">
  <pre wrap="">On Wed, Aug 12, 2009 at 01:30:20PM -0400, <a class="moz-txt-link-abbreviated" href="mailto:richardvoigt@gmail.com">richardvoigt@gmail.com</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On Wed, Aug 12, 2009 at 10:58 AM, Chris G<a class="moz-txt-link-rfc2396E" href="mailto:cl@isbd.net">&lt;cl@isbd.net&gt;</a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">I run a fairly default version of dnsmasq on my xubuntu 9.04 Linux box
so that I don't have to maintain losts of network (or hosts)
configurations around our network.

I have just added:-

&nbsp; &nbsp;127.0.0.1 &nbsp; &nbsp; &nbsp; <a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a> &nbsp;ssl.www.google-analytics.com

to my /etc/hosts file. &nbsp;I'm not paranoid about snooping but I am fed
up with having to wait for <a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a> to respond, it's
often quite slow taking several seconds with the address displayed at
the bottom of Firefox.

So, it appears to work, but why does 'host' respond as follows:-

&nbsp; &nbsp;chris$ host <a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a>
&nbsp; &nbsp;<a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a> has address 127.0.0.1
&nbsp; &nbsp;<a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a> is an alias for www-google-analytics.l.google.com.
&nbsp; &nbsp;<a class="moz-txt-link-abbreviated" href="http://www.google-analytics.com">www.google-analytics.com</a> is an alias for www-google-analytics.l.google.com.

Why don't the aliases disappear as well?
      </pre>
    </blockquote>
    <pre wrap="">Did you clear your cache?

    </pre>
  </blockquote>
  <pre wrap=""><!---->Whose cache?  I restarted dnsmasq with a "kill -1", is there anything else?

  </pre>
</blockquote>
The dnsmask man page says:<br>
.<br>
.<br>
.<br>
NOTES<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When&nbsp; it&nbsp; receives a SIGHUP, <font color="#ff0000"><big><b>dnsmasq
clears its cache</b></big></font> and then re-loads<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /etc/hosts and /etc/ethers and&nbsp; any&nbsp; file&nbsp; given&nbsp; by&nbsp;
--dhcp-hostsfile,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --dhcp-optsfile&nbsp; or&nbsp; --addn-hosts.&nbsp;&nbsp; The&nbsp; dhcp&nbsp; lease&nbsp; change
script is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; called for all existing DHCP leases. If --no-poll is&nbsp; set&nbsp;
SIGHUP&nbsp; also<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; re-reads&nbsp; /etc/resolv.conf.&nbsp;&nbsp; SIGHUP does NOT re-read the
configuration<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When it receives a SIGUSR1, dnsmasq writes&nbsp; statistics&nbsp; to&nbsp; the&nbsp;
system<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log.&nbsp; It&nbsp; writes&nbsp; the cache size, the number of names which have
had to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; removed from the cache before they expired in order to&nbsp; make&nbsp;
room&nbsp; for<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new&nbsp; names&nbsp; and&nbsp; the total number of names that have been
inserted into<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the cache. For each upstream server it&nbsp; gives&nbsp; the&nbsp; number&nbsp; of&nbsp;
queries<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sent, and the number which resulted in an error. In --no-daemon
mode or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when full logging is enabled (-q), a complete dump of the&nbsp;
contents&nbsp; of<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the cache is made.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When it receives SIGUSR2 and it is logging direct to a file (see
--log-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; facility ) dnsmasq will close and reopen the log file. Note that
during<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this operation, dnsmasq will not be running as root. When it
first cre-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ates the logfile dnsmasq changes the ownership of the file to
the&nbsp; non-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp; user&nbsp; it&nbsp; will run as. Logrotate should be configured to
create a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new log file with the ownership which matches the existing&nbsp; one&nbsp;
before<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sending&nbsp; SIGUSR2.&nbsp;&nbsp; If TCP DNS queries are in progress, the old
logfile<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; will remain open in child processes which are handling TCP
queries&nbsp; and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; may&nbsp; continue&nbsp; to&nbsp; be&nbsp; written.&nbsp; There is a limit of 150
seconds, after<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; which all existing TCP processes will have expired: for this
reason, it<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is&nbsp; not&nbsp; wise&nbsp; to configure logfile compression for logfiles
which have<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; just been rotated. Using logrotate, the required options are
create and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delaycompress.<br>
<br>
</body>
</html>