View Single Post

  #6 (permalink)  
Old 11-30-2004
Matteo Corti
 
Posts: n/a
Default Re: some dnsmasq problems

On 2004-11-30, Peter T. Breuer <ptb@lab.it.uc3m.es> wrote:
> buck <buck@private.mil> wrote:
>> On 29 Nov 2004 23:55:39 +0100, Matteo Corti <corti@inf.ethz.ch> wrote:
>>
>> >On 2004-11-29, Tauno Voipio <tauno.voipio@iki.fi.NOSPAM.invalid> wrote:
>> >> Matteo Corti wrote:

>> Content snipped.
>>
>> The computer on which dnsmasq runs should have a resolv.conf
>> containing "nameserver 127.0.0.1" (and NOTHING ELSE) - assuming you
>> want it to cache for itself as well as other computers on your LAN.

>
> Eh? How would it know who to use as dns forwarder if that were the case?
> No - it can have all it likes, PLUS 127.0.0.1. Dnsmasq reads
> resolv.conf to figure out the forwarders.
>
> -r, --resolv-file=<file>
> Read the IP addresses of the upstream nameservers from
> <file>, instead of /etc/resolv.conf.
>
>> Every other computer should have a resolv.conf containing the ip of
>> the dnsmasq machine in its "nameserver" line

>
> That's right.
>
>> I bet your DHCP is overwriting your resolv.conf file(s).

>
> Probably.


Hi,

I got the solution. The problem was the NIS (YP) server on the
gateway. Some NIS servers are able to do dns queries but not the one
coming with fedora.

in ypserv.conf:

# Should we do DNS lookups for hosts not found in the hosts table ?
# This option is ignored in the moment.
dns: no

but RedHat cleverly sets nis as an option for the dns lookup in
/etc/nsswitch.conf:

hosts: files nis dns

With the consequence that:
* host was using the correct dns server
* all the others where using nis before dns but the nis server was
answering 127.0.0.1 for my ip.

I changed /etc/nsswitch.conf and everything works like a charm :-)

BTW: if you have the DNS servers in the resolv.conf of the machine
running dnsmasq nothing happens (you just lookup on the remote server
instead of the local dns, not useful but not harmful).

Many many thanks to everybody that tried to help.

Matteo

--
Matteo Corti
Computer Systems Institute
Swiss Federal Institute of Technology Zurich
Reply With Quote