Request DDNS Support inside samba4, its quite easy.

KS Tan kstan79 at gmail.com
Sat Jul 28 17:15:53 GMT 2007


Hi all,

I'd do little of research whether implementing DDNS  in samba4 is simple
or hard, seems like quite easy and hopefully samba4 team can add in the
features:-

I suggest following items:-

inside smb.conf, add in new optional parameter(this is my samble)
DDNS Support =  yes
DDNS Server =192.168.141.50
TSIG Private Path = /etc/bin/Kmis1.testing.org.+157+48378.private
nsupdate path = /usr/bin/nsupdate (but I think this can be optional)


Inside the source code, simply let C run a shell command during new
computer join/login active directory(I'm not familiar C, so I use other
way to present):-


System(NSUPDATE_PATH  + " -k " + TSIG_PATH + " << EOF" + "\n" +
"server " +  DDNS_SERVER + " 53" + "\n" +
"update delete " + CLIENTCOMPUTERNAME . REALM + " A \n" + 
"update add " + CLIENTCOMPUTERNAME + REALM + "86400 A " + CLIENTIP +
"\n" +
"\n" +
"EOF" );

The sample command like below:
------------------------------------------------------------------------------
/dns/usr/local/bin/nsupdate -k  /etc/bin/Kmis1.testing.org.+157
+48378.private <<EOF
server 192.168.141.50 53
update delete demo.test.com A (make sure the entry never exist before,
otherwise will become dns round robin)
update add demo.test.com 3600 A 192.168.141.99

EOF

If a computer disjoin from directory, we can use this:
------------------------------------------------------------------------------
/dns/usr/local/bin/nsupdate -k  /etc/bin/Kmis1.testing.org.+157
+48378.private <<EOF
server 192.168.141.50 53
update delete demo.test.com A

EOF


The rest of the part we can do outside samba4(like configure ddns and
generate TSIG).

my reference:-
http://www.boran.com/security/sp/bind9_20010430.html
http://www.shakabuku.org/writing/dyndns.html
Hope this help.

Ks



More information about the samba-technical mailing list