[Dnsmasq-discuss] dnsmasq and samba internal dns server on the same machine

Yann Lehmann aristide at free-it.ch
Sun Apr 24 17:42:40 BST 2016


Hi

I am trying to setup a computer to act as an active directory controller 
with samba (which brings an internal DNS server), but I also need it to 
work as a dhcp server.

I have found how to set up the machine to have samba respond to dns 
requests for the records it knows and forward queries for external 
addresses to dnsmasq.

According to this [1], I have set up a 'lo:0' loopback interface with 
address '127.0.0.5'.

dnsmasq is only listening on this address ('listen-address=127.0.0.5' 
and 'bind-interfaces' are both set in '/etc/dnsmasq.conf').

samba is restricted to listen on 'eth0' and 'lo' only.

This seems to work fine for dns queries.

A dig query from the host itself for an address known by samba's 
internal dns server (for example '_kerberos._tcp.mydomain') gets 
answered by the "server" '127.0.0.1#53(127.0.0.1)' and nothing gets 
logged by dnsmasq.

A query for an address unknown by samba's dns server gets forwarded to 
dnsmasq, which itself forwards it to my ISP's dns servers (according to 
the log of dnsmasq).

Unfortunately, dnsmasq doesn't respond to dhcp-requests.

Is there a way to enable only dns-requests on the 'lo:0' interface and 
only dhcp-requests on the 'eth0' interface ?

Thanks and regards
Yann



More information about the Dnsmasq-discuss mailing list