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