[Samba] Configure DHCP to update DNS records with BIND9

Rowland penny rpenny at samba.org
Tue Aug 13 18:06:27 UTC 2019


On 13/08/2019 18:56, jokie74 at webstatics.de wrote:
> Hi Rowland,
>
> many thanks for your advise here. Unfortunately I am not a BIND keyuser... I added all what the "How-to" website asked me to 😊
Which 'how-to' ?
>
> root at SAMBA:~# cat /etc/bind/named.conf.local
> //
> // Do any local configuration here
> //
>
> // Consider adding the 1918 zones here, if they are not used in your
> // organization
> //include "/etc/bind/zones.rfc1918";
> dlz "AD DNS Zone" {
>       database "dlopen /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_11.so";
> };
>
> Instead of including the samba named.conf, I added the entry directly...
Not a good idea, I would change it to a link
>
> After I configured as you suggested, everything looks good
>
> root at SAMBA:~# cat /var/log/syslog |grep dhcp
> Aug 13 19:46:17 SAMBA dhcpd[21975]: DHCPREQUEST for 192.168.0.105 (192.168.0.1) from 88:71:b1:b4:3d:8e (UPC-TV-BOX-1) via home.lan
> Aug 13 19:46:17 SAMBA dhcpd[21975]: DHCPACK on 192.168.0.105 to 88:71:b1:b4:3d:8e (UPC-TV-BOX-1) via home.lan
> Aug 13 19:47:44 SAMBA dhcpd[21975]: Commit: IP: 192.168.0.120 DHCID: b0:6e:bf:5f:f1:46 Name: BUERO-PC
> Aug 13 19:47:44 SAMBA dhcpd[21975]: execute_statement argv[0] = /usr/local/bin/dhcp-dyndns.sh
> Aug 13 19:47:44 SAMBA dhcpd[21975]: execute_statement argv[1] = add
> Aug 13 19:47:44 SAMBA dhcpd[21975]: execute_statement argv[2] = 192.168.0.120
> Aug 13 19:47:44 SAMBA dhcpd[21975]: execute_statement argv[3] = b0:6e:bf:5f:f1:46
> Aug 13 19:47:44 SAMBA dhcpd[21975]: execute_statement argv[4] = BUERO-PC
> Aug 13 19:47:44 SAMBA named[19244]: samba_dlz: allowing update of signer=dhcpduser\@HOME.LAN name=BUERO-PC.HOME.LAN tcpaddr=127.0.0.1 type=A key=4202548530.sig-samba.home.lan/160/0
> Aug 13 19:47:44 SAMBA named[19244]: samba_dlz: allowing update of signer=dhcpduser\@HOME.LAN name=BUERO-PC.HOME.LAN tcpaddr=127.0.0.1 type=A key=4202548530.sig-samba.home.lan/160/0
> Aug 13 19:47:44 SAMBA named[19244]: client @0x7f0831053330 127.0.0.1#44779/key dhcpduser\@HOME.LAN: updating zone 'home.lan/NONE': deleting rrset at 'BUERO-PC.HOME.LAN' A
> Aug 13 19:47:44 SAMBA named[19244]: client @0x7f0831053330 127.0.0.1#44779/key dhcpduser\@HOME.LAN: updating zone 'home.lan/NONE': adding an RR at 'BUERO-PC.HOME.LAN' A 192.168.0.120
> Aug 13 19:47:44 SAMBA named[19244]: samba_dlz: allowing update of signer=dhcpduser\@HOME.LAN name=120.0.168.192.in-addr.arpa tcpaddr=127.0.0.1 type=PTR key=3686372350.sig-samba.home.lan/160/0
> Aug 13 19:47:44 SAMBA named[19244]: samba_dlz: allowing update of signer=dhcpduser\@HOME.LAN name=120.0.168.192.in-addr.arpa tcpaddr=127.0.0.1 type=PTR key=3686372350.sig-samba.home.lan/160/0
> Aug 13 19:47:44 SAMBA named[19244]: client @0x7f0830fc4fb0 127.0.0.1#46721/key dhcpduser\@HOME.LAN: updating zone '0.168.192.in-addr.arpa/NONE': deleting rrset at '120.0.168.192.in-addr.arpa' PTR
> Aug 13 19:47:44 SAMBA named[19244]: client @0x7f0830fc4fb0 127.0.0.1#46721/key dhcpduser\@HOME.LAN: updating zone '0.168.192.in-addr.arpa/NONE': adding an RR at '120.0.168.192.in-addr.arpa' PTR BUERO-PC.HOME.LAN.
> Aug 13 19:47:44 SAMBA dhcpd: DHCP-DNS Update succeeded
>
> Thanks a lot...

Can I suggest that if you use anything from the Samba wiki, you follow 
it as closely as possibly, it is known to work and if something changes 
and it stops working, it will get fixed and the wikipage updated.

Know you have got it working, can I introduce you to this web page: 
http://apt.van-belle.nl/

There you will find the latest Samba version for Ubuntu 18.04

Rowland




More information about the samba mailing list