[Dnsmasq-discuss] Strange (well, I can't udnerstand it) /etc/hosts effect
JD
jd1008 at gmail.com
Wed Aug 12 22:23:57 BST 2009
On 08/12/2009 11:23 AM, Chris G wrote:
> On Wed, Aug 12, 2009 at 01:30:20PM -0400, richardvoigt at gmail.com wrote:
>
>> On Wed, Aug 12, 2009 at 10:58 AM, Chris G<cl at isbd.net> wrote:
>>
>>> 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 www.google-analytics.com 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 www.google-analytics.com 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 www.google-analytics.com
>>> www.google-analytics.com has address 127.0.0.1
>>> www.google-analytics.com is an alias for www-google-analytics.l.google.com.
>>> www.google-analytics.com is an alias for www-google-analytics.l.google.com.
>>>
>>> Why don't the aliases disappear as well?
>>>
>> Did you clear your cache?
>>
>>
> Whose cache? I restarted dnsmasq with a "kill -1", is there anything else?
>
>
The dnsmask man page says:
.
.
.
NOTES
When it receives a SIGHUP, *dnsmasq clears its cache* and then
re-loads
/etc/hosts and /etc/ethers and any file given by
--dhcp-hostsfile,
--dhcp-optsfile or --addn-hosts. The dhcp lease change
script is
called for all existing DHCP leases. If --no-poll is set
SIGHUP also
re-reads /etc/resolv.conf. SIGHUP does NOT re-read the
configuration
file.
When it receives a SIGUSR1, dnsmasq writes statistics to the
system
log. It writes the cache size, the number of names which have
had to
removed from the cache before they expired in order to make
room for
new names and the total number of names that have been
inserted into
the cache. For each upstream server it gives the number of
queries
sent, and the number which resulted in an error. In --no-daemon
mode or
when full logging is enabled (-q), a complete dump of the
contents of
the cache is made.
When it receives SIGUSR2 and it is logging direct to a file (see
--log-
facility ) dnsmasq will close and reopen the log file. Note that
during
this operation, dnsmasq will not be running as root. When it
first cre-
ates the logfile dnsmasq changes the ownership of the file to
the non-
root user it will run as. Logrotate should be configured to
create a
new log file with the ownership which matches the existing one
before
sending SIGUSR2. If TCP DNS queries are in progress, the old
logfile
will remain open in child processes which are handling TCP
queries and
may continue to be written. There is a limit of 150
seconds, after
which all existing TCP processes will have expired: for this
reason, it
is not wise to configure logfile compression for logfiles
which have
just been rotated. Using logrotate, the required options are
create and
delaycompress.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20090812/7a57a3f3/attachment-0001.htm
More information about the Dnsmasq-discuss
mailing list