Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 14:35:08 +0100
From:      Henri Hennebert <hlh@restart.be>
To:        Roberto de Sousa <r_de_sousa@yahoo.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: NSupdate from CLI
Message-ID:  <4905C38C.1090704@restart.be>
In-Reply-To: <184591.23555.qm@web45201.mail.sp1.yahoo.com>
References:  <184591.23555.qm@web45201.mail.sp1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Roberto de Sousa wrote:
> Hello all,
> Can someone direct me where to go to find out example of how to create a script using nsupdate from CLI to add host to forward and reversing zone of DNS?
> I am new to Unix and just installed my freeBSD box which running apache and BIND last month.
> 
> Any advise or information will be highly appreciated.

In your named.conf you have eg:

         zone "example.com" {
                 type master;
                 file "dynamic/db.example.com";
                 allow-update { key host1.example.com.; };
         };
         key "host1.example.com." {
                 algorithm hmac-md5;
                 secret "XXXX...XXXX==";
         };

and on host1 you use this script:

#!/bin/sh
NSSERVER="xxx.xxx.xxx.xxx"
MYNAME=host1.example.com
MYADDR=$1
/usr/bin/nsupdate -y host1.example.com.:XXXX...XXXX== \
     1>/dev/null 2>&1 <<EOF
server ${NSSERVER}
update delete $MYNAME. A
update add ${MYNAME}. 60 A ${MYADDR}
send
EOF


The key can be generated by

dnssec-keygen -a HMAC-MD5 -b 128 -n ENTITY password

Le line Key: in Kpassword.+157+xxxxxx.private
contains a key witch can be used in place off XXXX...XXXX==

Henri
> 
> Thanks all.
> 
> Roberto
> 
>  
> buka wainhira la hatene, buka atu hatene liu tan 
> 
> abracos 
> 
> 
> 
>       Make the switch to the world&#39;s best email. Get Yahoo!7 Mail! http://au.yahoo.com/y7mail
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4905C38C.1090704>