[Dnsmasq-discuss] DNS configuration
Simon Kelley
simon at thekelleys.org.uk
Sat Oct 2 08:55:07 BST 2010
On 02/10/10 08:20, Gland Vador wrote:
> On 30.09.2010 14:11, Simon Kelley wrote:
>> Glandvador wrote:
>>> Hi all,
>>>
>>> <snip some questions>
>>
>> You need something like this in /etc/dnsmasq.conf
>>
>> local=mydomain.com
>> server=/someotherhost.mydomain.com/#
>>
>> and put
>>
>> 192.168.10.1 mydomain.com
>> 192.168.10.2 host1.mydomain.com
>> 192.168.10.3 host2.mydomain.com
>>
>> in /etc/hosts
>>
>
> After installing dnsmasq version 2.55 this worked like you indicated.
> Thanks.
>
> If I understood correctly the glibc(?) resolver looks first into the
> /etc/hosts then asks the DNS server after it found nothing there.
> No way to do the same only from the dnsmasq.conf without involving
> /etc/hosts, right ?
For DNS queries, the resolver doesn't come into it, but dnsmasq has the
same rules. There isn't any way to do exactly what you want without
using /etc/hosts, but you only need those entries in /etc/hosts on the
machine running dnsmasq, not on all the clients.
> The "address=/aaa.domain.com/ip_addr" means in fact *.aaa.domain.com
> returns ip_addr. And no way to have something like:
> "address = /aaa.domain.com/ip_addr" => strict like /etc/hosts, and,
> "address = /.aaa.domain.com/ip_addr" => *.aaa.domain.com, like now ?
>
> Another question:
>
> My appliance has 3 network interfaces, and, thus, the appliance itself 3
> ip addresses for the same name, declared as:
>
> address = /hostname.domain.com/192.168.10.1
> address = /hostname.domain.com/192.168.11.1
> address = /hostname.domain.com/192.168.12.1
>
> When querying the ip address of hostname from the network
> 192.168.10.0/24, dnsmasq returns the last entry, i.e 192.168.12.1
>
> In my case, networks are completely isolated and can only speak to
> themselves and the appliance. When returning an address for host into
> another network, the request is blocked by iptables.
>
> So, is possible for dnsmasq to return the address 192.168.10.1 when the
> request comes from 192.168.10.0 network (or interface), and so on ?
> And without launching three daemons which will break the lightweight
> assumption :)
I like it when we've already solved these complex problems ;-) The magic
you need is
localise-queries
but again, you'll need to put the addresses in /etc/hosts on the machine
running dnsmasq and remove the address=lines.
HTH
Simon,
>
> Glandvador.
>
>
>
>
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
More information about the Dnsmasq-discuss
mailing list