[Dnsmasq-discuss] DNS configuration
Simon Kelley
simon at thekelleys.org.uk
Thu Sep 30 13:11:51 BST 2010
Glandvador wrote:
> Hi all,
>
> I want to replace my current dchpd + bind server on my small (mostly
> memory) appliance with dnsmasq.
>
> I use the following dnsmasq configuration:
>
> I have declared:
>
> address = /mydomain.com/192.168.10.1
>
> where the 192.168.10.1 is my appliance IP. I am doing that in order to
> resolve queries to http://mydomain.com to my appliance.
>
> I also have declared some hosts:
>
> address = /host1.mydomain.com/192.168.10.2
> address = /host2.mydomain.com/192.168.10.3, etc.
>
> This almost works, but a unknown host like unknown.mydomain.com will
> resolve to mydomain.com i.e 192.168.10.1
>
> Is a way to achieve something like:
>
> By default all requests to:
> 1) *.mydomain.com returns invalid
> 2) mydomain.com is resolved by dnsmasq
> 3) somehost.mydomain.com is resolved by dnsmasq
> 4) someotherhost.mydomain.com is resolved by external servers
>
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
You will need at least version 2.53 for the server=/<domain>/# syntax to
work.
HTH
Simon.
More information about the Dnsmasq-discuss
mailing list