Bind forgets my changes with nsupdate

2023-10-06 Thread Paul van der Vlis via bind-users

Hello,

I try to give a dynamic IP to a name, using nsupdate. This works fine, 
but after some hours the IP is gone from the master (which I update).


Something like this:
Host home.customer.nl not found: 3(NXDOMAIN)

The IP is then still available from the slaves, what gets it from the 
master.


I do something like this to give the IP, using a script:

root@server:~# /usr/bin/nsupdate -k /etc/customer.key
> server ns1.vandervlis.nl
> zone customer.nl.
> update delete home.customer.nl.
> update add home.customer.nl. 3600 A 1.2.3.4
> send
> quit

I don't see anything about the removal in the logs. But I saw a "freeze" 
and a "thaw" in the logs for the domain.


Any idea why the IP removes after some time?

With regards,
Paul van der Vlis



--
Paul van der Vlis Linux systeembeheer Groningen
https://vandervlis.nl/
--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread Mark Andrews
You need to figure out what is updating the zone. This isn’t named.

-- 
Mark Andrews

> On 6 Oct 2023, at 19:28, Paul van der Vlis via bind-users 
>  wrote:
> 
> Hello,
> 
> I try to give a dynamic IP to a name, using nsupdate. This works fine, but 
> after some hours the IP is gone from the master (which I update).
> 
> Something like this:
> Host home.customer.nl not found: 3(NXDOMAIN)
> 
> The IP is then still available from the slaves, what gets it from the master.
> 
> I do something like this to give the IP, using a script:
> 
> root@server:~# /usr/bin/nsupdate -k /etc/customer.key
> > server ns1.vandervlis.nl
> > zone customer.nl.
> > update delete home.customer.nl.
> > update add home.customer.nl. 3600 A 1.2.3.4
> > send
> > quit
> 
> I don't see anything about the removal in the logs. But I saw a "freeze" and 
> a "thaw" in the logs for the domain.
> 
> Any idea why the IP removes after some time?
> 
> With regards,
> Paul van der Vlis
> 
> 
> 
> -- 
> Paul van der Vlis Linux systeembeheer Groningen
> https://vandervlis.nl/
> -- 
> Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
> this list
> 
> ISC funds the development of this software with paid support subscriptions. 
> Contact us at https://www.isc.org/contact/ for more information.
> 
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread Paul van der Vlis via bind-users

Op 06-10-2023 om 10:28 schreef Paul van der Vlis via bind-users:

Hello,

I try to give a dynamic IP to a name, using nsupdate. This works fine, 
but after some hours the IP is gone from the master (which I update).


Something like this:
Host home.customer.nl not found: 3(NXDOMAIN)

The IP is then still available from the slaves, what gets it from the 
master.


I do something like this to give the IP, using a script:

root@server:~# /usr/bin/nsupdate -k /etc/customer.key
 > server ns1.vandervlis.nl
 > zone customer.nl.
 > update delete home.customer.nl.
 > update add home.customer.nl. 3600 A 1.2.3.4
 > send
 > quit

I don't see anything about the removal in the logs. But I saw a "freeze" 
and a "thaw" in the logs for the domain.


Any idea why the IP removes after some time?


Hmm, I see I have cronjob what causes this problem:

-
# change serial
SERIAL=`named-checkzone $domain $domain | egrep -ho '[0-9]{10}'`
sed -i 's/'$SERIAL'/'$(($SERIAL+1))'/' $domain

# sign zone
rndc freeze $domain
dnssec-signzone -S -K /etc/bind/keys/ -g -a -o $domain $domain
rndc reload $domain
rndc thaw $domain
-

But how could I refresh the key without loosing the IP?

With regards,
Paul





--
Paul van der Vlis Linux systeembeheer Groningen
https://vandervlis.nl/
--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread Paul van der Vlis via bind-users

Op 06-10-2023 om 10:39 schreef Mark Andrews:

You need to figure out what is updating the zone. This isn’t named.


Thanks for your answer.
It makes me find the reason. See my other message.

With regards,
Paul


--
Paul van der Vlis Linux systeembeheer Groningen
https://vandervlis.nl/
--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread Mark Andrews
Just configure named to sign the zone. 

-- 
Mark Andrews

> On 6 Oct 2023, at 22:30, Paul van der Vlis  wrote:
> 
> Op 06-10-2023 om 10:39 schreef Mark Andrews:
>> You need to figure out what is updating the zone. This isn’t named.
> 
> Thanks for your answer.
> It makes me find the reason. See my other message.
> 
> With regards,
> Paul
> 
> 
> -- 
> Paul van der Vlis Linux systeembeheer Groningen
> https://vandervlis.nl/
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread Michael Richardson

In general, you don't want to mix dynamic update zones with ones that you
want to edit by hand.  I see that you are doing manual DNSSEC signing in your
cron job.

Your choices are:
a) do everything with dynamic update, and turn on automatic DNSSEC management
   in bind9.

b) do your DNSSEC signing inline.
   I blogged poorly about my setup:
   https://www.sandelman.ca/mcr/blog/sysadmin/bind9-dnssec-formula/

c) a mix of the above.
   My solution is not to mix dynamic update with other access.
   Instead, I put in CNAMEs in the signed zone to a sub-zone (or other zone)
   where I do exclusive dynamic update.  This isn't perfect, but it works
   well enough to allow dns-01 (certbot/LetsEncrypt) to be able to refresh my
   certificates.





signature.asc
Description: PGP signature
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Bind forgets my changes with nsupdate

2023-10-06 Thread 201907-bind
>   My solution is not to mix dynamic update with other access.
>   Instead, I put in CNAMEs in the signed zone to a sub-zone (or other zone)
>   where I do exclusive dynamic update.  This isn't perfect, but it works
>   well enough to allow dns-01 (certbot/LetsEncrypt) to be able to refresh my
>   certificates.

Not perfect? What issues did you see? Thanks!
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users