Link to home
Start Free TrialLog in
Avatar of Goutham
GouthamFlag for India

asked on

unable to create A or PTR records using nsupdate for ddns

Dear Experts:

configured ddns using dhcp and bind packages static and dynamic zones are placed separately and also services are running fine , when try to add the A and PTR records using nsupdate iam not able to do so, please find the below log for your reference and help me to resolve. Thanks in advance.

$ sudo nsupdate -l
> update add ind.shriramdb.com 300 in a 192.168.1.96
> show
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:      0
;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
;; UPDATE SECTION:
ind.shriramdb.com.      300     IN      A       192.168.1.96

> send
update failed: REFUSED


 netstat -tanup
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.1.244:53        0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      -
tcp        0      0 192.168.1.244:22        223.178.150.5:1143      ESTABLISHED -
tcp6       0      0 :::53                   :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
udp        0      0 192.168.1.244:53        0.0.0.0:*                           -
udp        0      0 127.0.0.1:53            0.0.0.0:*                           -
udp        0      0 0.0.0.0:67              0.0.0.0:*                           -
udp        0      0 192.168.1.244:123       0.0.0.0:*                           -
udp        0      0 127.0.0.1:123           0.0.0.0:*                           -
udp        0      0 0.0.0.0:123             0.0.0.0:*                           -
udp6       0      0 :::53                   :::*                                -
udp6       0      0 fe80::250:56ff:fe9a:123 :::*                                -
udp6       0      0 ::1:123                 :::*                                -
udp6       0      0 :::123                  :::*                                -
--------------------------------------                                                                                                                


Avatar of Papertrip
Papertrip
Flag of United States of America image

Do you have the following line in the zone config block you are trying to update?
update-policy local;

Open in new window

Do you have the following line in the zone config block you are trying to update?
Could have phrased that better...

Do you have the following line in the zone config block for the zone you are trying to update?
update-policy local;

Open in new window

Avatar of Goutham

ASKER

Sir, thanks for the reply, when added  update-policy local;  
--------------------/etc/bind/named.conf.local-------------------
//## dynamic zones (updated by DDNS) ##

zone "dyn.shriramdb.com" {
        type master;
        file "/var/cache/bind/dynamic/db.dyn.shriramdb.com";
        update-policy local;
        allow-update { key "ddns-key"; };
};

zone "rev.1.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/var/cache/bind/dynamic/rev.1.168.192.in-addr.arpa";
        update-policy local;
        allow-update { key "ddns-key"; };
-------------------------------------------------------------------------------------------------
Bind does not start , for your reference posted below the /var/log/syslog
Oct  9 03:43:56 lampsrv named[7647]: adjusted limit on open files from 1024 to 1048576
Oct  9 03:43:56 lampsrv named[7647]: found 4 CPUs, using 4 worker threads
Oct  9 03:43:56 lampsrv named[7647]: using up to 4096 sockets
Oct  9 03:43:56 lampsrv named[7647]: loading configuration from '/etc/bind/named.conf'
Oct  9 03:43:56 lampsrv named[7647]: /etc/bind/named.conf.local:33: zone 'dyn.shriramdb.com': 'allow-update' is ignored when 'update-policy' is present
Oct  9 03:43:56 lampsrv named[7647]: /etc/bind/named.conf.local:41: zone 'rev.1.168.192.in-addr.arpa': 'allow-update' is ignored when 'update-policy' is present
Oct  9 03:43:56 lampsrv named[7647]: loading configuration: failure
Oct  9 03:43:56 lampsrv named[7647]: exiting (due to fatal error)
-------------------------------------------------
Please help to resolve this.

The error says it all, you can't have both in the same zone config.

I said to add only 'update-policy local;' to only the zones you have to update yourself (not DDNS zones).  You are trying to add a record to shriramdb.com, yet you added update-policy to dyn.shriramdb.com.
ASKER CERTIFIED SOLUTION
Avatar of Papertrip
Papertrip
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Goutham

ASKER

Sir, Thank you very much. it is working now. Again great support thanks a lot.
Awesome.

I look forward to your next question :)
Avatar of Goutham

ASKER

really really great support.