7.4.12

Samba4 and Bind9 dlz DNS

Big thanks to Amitay over on the samba-technical list for this.

Using Static IP Linux clients
You can use samba-tool dns commands to create a reverse zone:
To create a reverse zone for 192.168.1.0/24 subnet,

$ samba-tool dns zonecreate<server>  1.168.192.in-addr.arpa

And then you can add record (e.g. test1.my.domain ->  192.168.1.1)

$ samba-tool dns add<server>  1.168.192.in-addr.arpa 1 PTR test1.my.domain

OK. We're started. For us with DNS server at 192.168.1.2, it becomes:

samba-tool dns zonecreate 192.168.1.2 hh3.site
and
samba-tool dns zonecreate 192.168.1.2 1.168.192.in-addr.arpa

Next we add a Linux client called
 hh10.hh3.site
 to the
 hh3.site
 and 
1.168.192.in-addr.arpa zones

forward zone
samba-tool dns add 192.168.1.2 hh3.site hh10.hh3.site A 192.168.1.10
Password for [Administrator@HH3.SITE]:
Record added successfully

reverse zone
samba-tool dns add 192.168.1.2 1.168.192.in-addr.arpa 10 PTR hh10.hh3.site
Password for [Administrator@HH3.SITE]:
Record added successfully

test it
host hh10.hh3.site
hh10.hh3.site has address 192.168.1.10

host 192.168.1.10
10.1.168.192.in-addr.arpa domain name pointer hh10.hh3.site.

Now you can lose your /etc/host entries for the server and client:-)