[Samba] Samba DNS Listening IP

Rowland Penny rpenny at samba.org
Sun Sep 11 21:01:42 UTC 2016


On Sun, 11 Sep 2016 13:22:19 -0700
Greg Zartman via samba <samba at lists.samba.org> wrote:

> Is it possible to change the DNS listening IP?
> 
> I'd like to run a dnscache service for primary LAN queries, but the
> only way to do this with Samba seems to be iptables preroute
> configuration to redirect port 53 requests.
> 
> Thanks,
> 

Just run Bind9 and use this as the Samba dns server instead:

rowland at devstation:~$ dig www.koozali.org

; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> www.koozali.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57529
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 13, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.koozali.org.		IN	A

;; ANSWER SECTION:
www.koozali.org.	1799	IN	CNAME	koozali.org.
koozali.org.		1137	IN	A	212.83.168.232

;; AUTHORITY SECTION:
.			4553	IN	NS	i.root-servers.net.
.			4553	IN	NS	m.root-servers.net.
.			4553	IN	NS	a.root-servers.net.
.			4553	IN	NS	h.root-servers.net.
.			4553	IN	NS	e.root-servers.net.
.			4553	IN	NS	j.root-servers.net.
.			4553	IN	NS	g.root-servers.net.
.			4553	IN	NS	f.root-servers.net.
.			4553	IN	NS	d.root-servers.net.
.			4553	IN	NS	c.root-servers.net.
.			4553	IN	NS	b.root-servers.net.
.			4553	IN	NS	l.root-servers.net.
.			4553	IN	NS	k.root-servers.net.

;; Query time: 473 msec
;; SERVER: 192.168.0.5#53(192.168.0.5)
;; WHEN: Sun Sep 11 21:57:29 BST 2016
;; MSG SIZE  rcvd: 285

rowland at devstation:~$ dig www.koozali.org

; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> www.koozali.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20926
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 13, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.koozali.org.		IN	A

;; ANSWER SECTION:
www.koozali.org.	1794	IN	CNAME	koozali.org.
koozali.org.		1132	IN	A	212.83.168.232

;; AUTHORITY SECTION:
.			4548	IN	NS	e.root-servers.net.
.			4548	IN	NS	d.root-servers.net.
.			4548	IN	NS	k.root-servers.net.
.			4548	IN	NS	c.root-servers.net.
.			4548	IN	NS	a.root-servers.net.
.			4548	IN	NS	b.root-servers.net.
.			4548	IN	NS	h.root-servers.net.
.			4548	IN	NS	j.root-servers.net.
.			4548	IN	NS	m.root-servers.net.
.			4548	IN	NS	l.root-servers.net.
.			4548	IN	NS	g.root-servers.net.
.			4548	IN	NS	i.root-servers.net.
.			4548	IN	NS	f.root-servers.net.

;; Query time: 3 msec
;; SERVER: 192.168.0.5#53(192.168.0.5)
;; WHEN: Sun Sep 11 21:57:34 BST 2016
;; MSG SIZE  rcvd: 285

This way you get the best of both worlds ;-)

Rowland




More information about the samba mailing list