<html><head></head><body><div style="color:black;font-size:14px"><br></div><div style="color: black;font-size: 14px;">Hello Peter.<br></div><div style="color: black;font-size: 14px;">Thanks for your answer.<br></div><div style="color: black;font-size: 14px;">Maybe I found the issue:<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">mysql> select * from records where domain_id=13203;<br></div><div style="color: black;font-size: 14px;">+------+-----------+------+------+------------------------------------------------------------------------------+------+------+----------+-----------+------+<br></div><div style="color: black;font-size: 14px;">| id   | domain_id | name | type | content                                                                      | ttl  | prio | disabled | ordername | auth |<br></div><div style="color: black;font-size: 14px;">+------+-----------+------+------+------------------------------------------------------------------------------+------+------+----------+-----------+------+<br></div><div style="color: black;font-size: 14px;">| 6309 |     13203 | .    | SOA  | a.misconfigured.powerdns.server hostmaster 2020032401 10800 3600 604800 3600 | 3600 |    0 |        0 | NULL      |    1 |<br></div><div style="color: black;font-size: 14px;">+------+-----------+------+------+------------------------------------------------------------------------------+------+------+----------+-----------+------+<br></div><div style="color: black;font-size: 14px;">1 row in set (0.00 sec)<br></div><div style="color: black;font-size: 14px;">There is an entry (probably a mistake with some API call) which shows a bad SOA entry in a domain with only a "." in the "name" column.<br></div><div style="color: black;font-size: 14px;">In fact, the query for a non existent domain returns something like:<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;"># dig @my-dns-server-IP non-existent-domain<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">; <<>> DiG 9.11.36-RedHat-9.11.36-3.el8 <<>> @my-dns-server-IP non-existent-domain<br></div><div style="color: black;font-size: 14px;">; (1 server found)<br></div><div style="color: black;font-size: 14px;">;; global options: +cmd<br></div><div style="color: black;font-size: 14px;">;; Got answer:<br></div><div style="color: black;font-size: 14px;">;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39797<br></div><div style="color: black;font-size: 14px;">;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1<br></div><div style="color: black;font-size: 14px;">;; WARNING: recursion requested but not available<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">;; OPT PSEUDOSECTION:<br></div><div style="color: black;font-size: 14px;">; EDNS: version: 0, flags:; udp: 1232<br></div><div style="color: black;font-size: 14px;">;; QUESTION SECTION:<br></div><div style="color: black;font-size: 14px;">;non-existent-domain.                       IN      A<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">;; AUTHORITY SECTION:<br></div><div style="color: black;font-size: 14px;">.                      3600    IN      SOA     a.misconfigured.powerdns.server. hostmaster. 2020032401 10800 3600 604800 3600<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">;; Query time: 18 msec<br></div><div style="color: black;font-size: 14px;">;; SERVER: my-dns-server-IP#53(my-dns-server-IP)</div><div style="color: black;font-size: 14px;">;; WHEN: Fri Oct 28 16:08:14 CEST 2022<br></div><div style="color: black;font-size: 14px;">;; MSG SIZE  rcvd: 116<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">Do you think it's safe to simply remove it?<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">update records set disabled=1 where id=6309;<br></div><div style="color: black;font-size: 14px;">delete from records where id=6309;<br></div><div style="color: black;font-size: 14px;">Thanks<br></div><div style="color: black;font-size: 14px;">Riccardo<br></div><div class="signature" style="color:black;font-size:14px"><br></div><div><br></div><div>28/10/2022, 15:33 Peter van Dijk via Pdns-users  ha scritto:<br></div><blockquote style="border-left: 2px solid #a8a8a8;margin-left: 0px;padding-left: 10px;margin-top: 0.5rem;"><div>Hi Riccardo,<br></div><div><br></div><div>On Fri, 2022-10-28 at 09:11 +0000, Riccardo Brunetti via Pdns-users<br></div><div>wrote:<br></div><div>> Hello.<br></div><div>> We have a powerdns server which is authoritative for some zones, let's<br></div><div>> say zoneA and zoneB<br></div><div>> If we send a dns query for a zoneC we get NXDOMAIN answer instead of<br></div><div>> REFUSED.<br></div><div>> <br></div><div>> Is this the correct behavior or we are making some configuration<br></div><div>> mistake?<br></div><div>> pdns version: 4.5.2<br></div><div><br></div><div>That is not correct behaviour, so it sounds like a configuration (or<br></div><div>database content) mistake.<br></div><div><br></div><div>Can you show (unedited!) dig output for the good and the bad queries?<br></div><div><br></div><div>Kind regards,<br></div><div>-- <br></div><div>Peter van Dijk<br></div><div><a href="http://PowerDNS.COM">PowerDNS.COM</a> BV - <a href="https://www.powerdns.com/">https://www.powerdns.com/</a><br></div><div><br></div><div>_______________________________________________<br></div><div>Pdns-users mailing list<br></div><div><a href="mailto:Pdns-users@mailman.powerdns.com">Pdns-users@mailman.powerdns.com</a><br></div><div><a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br></div></blockquote><div style="color: black;font-size: 14px;"><br></div></body></html>