I managed to fix it
The problem was different key and algorithm hmac-md5 and hmac-sha256.
The correct key is here:
/var/named/run-root/etc/named.conf
It was enough to copy this key
key "rndc-key" {
algorithm hmac-md5;
secret "somekey=";
};
and add it to the file
/etc/bind/rndc.conf
of course we delete:
/etc/bind/rndc.key
Feb 17 15:46:53 ns3125328 systemd[1]: Reloading BIND Domain Name Server.
Feb 17 15:46:53 ns3125328 named[180323]: received control channel command 'reload'
Feb 17 15:46:53 ns3125328 named[180323]: loading configuration from '/etc/named.conf'
Feb 17 15:46:53 ns3125328 named[180323]: unable to open '/etc/bind/bind.keys'; using built-in keys instead
Feb 17 15:46:53 ns3125328 named[180323]: looking for GeoIP2 databases in '/usr/share/GeoIP'
Feb 17 15:46:53 ns3125328 named[180323]: using default UDP/IPv4 port range: [1024, 65535]
Feb 17 15:46:53 ns3125328 named[180323]: using default UDP/IPv6 port range: [1024, 65535]
Feb 17 15:46:53 ns3125328 named[180323]: generating session key for dynamic DNS
Feb 17 15:46:53 ns3125328 named[180323]: couldn't mkdir '//run': Permission denied
Feb 17 15:46:53 ns3125328 named[180323]: could not create //run/named/session.key
Feb 17 15:46:53 ns3125328 named[180323]: failed to generate session key for dynamic DNS: permission denied
Feb 17 15:46:53 ns3125328 named[180323]: sizing zone task pool based on 11 zones
Feb 17 15:46:53 ns3125328 named[180323]: none:91: 'max-cache-size 90%' - setting to 28617MB (out of 31797MB)
Feb 17 15:46:53 ns3125328 named[180323]: using built-in root key for view _default
Feb 17 15:46:53 ns3125328 named[180323]: automatic empty zone (.....)
Feb 17 15:46:53 ns3125328 named[180323]: reloading configuration succeeded
Feb 17 15:46:53 ns3125328 named[180323]: reloading zones succeeded
Feb 17 15:46:53 ns3125328 named[180323]: zone byledowylotu.pl/IN: loaded serial 2023021722
Feb 17 15:46:53 ns3125328 named[180323]: zone byledowylotu.pl/IN: sending notifies (serial 2023021722)
Feb 17 15:46:53 ns3125328 rndc[189841]: server reload successful
Feb 17 15:46:53 ns3125328 systemd[1]: Reloaded BIND Domain Name Server.
Feb 17 15:46:53 ns3125328 named[180323]: all zones loaded
Feb 17 15:46:53 ns3125328 named[180323]: running
Feb 17 15:46:54 ns3125328 named[180323]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Feb 17 15:46:54 ns3125328 named[180323]: client @0x7fe2b406e1b0 79.98.145.34#28228 (byledowylotu.pl): transfer of 'byledowylotu.pl/IN': IXFR version not in journal, falling back to AXFR
Feb 17 15:46:54 ns3125328 named[180323]: client @0x7fe2b406e1b0 79.98.145.34#28228 (byledowylotu.pl): transfer of 'byledowylotu.pl/IN': AXFR-style IXFR started (serial 2023021722)
Feb 17 15:46:54 ns3125328 named[180323]: client @0x7fe2b406e1b0 79.98.145.34#28228 (byledowylotu.pl): transfer of 'byledowylotu.pl/IN': AXFR-style IXFR ended: 1 messages, 13 records, 494 bytes, 0.003 secs (164666 bytes/sec) (serial 2023021722)
The external DNS server was updated in no time