Avatar of D_wathi
D_wathi
Flag 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                  :::*                                -
--------------------------------------                                                                                                                


DNSDHCPLinux Networking

Avatar of undefined
Last Comment
D_wathi

8/22/2022 - Mon
Papertrip

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

Open in new window

Papertrip

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

D_wathi

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.

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Papertrip

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
Papertrip

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
D_wathi

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

Awesome.

I look forward to your next question :)
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
D_wathi

ASKER
really really great support.