Ahoj,
I've searched through the archives and read documentation+RFCs to
no avail, so I hope you can help out.
I run the authoritative DNS servers for an associative ISP in
Barcelona (eXO.cat), and we are running them in FreeBSD using Knot
DNS (2.9.5, but .6 and .7's changelogs do not point to a similar
issue being solved).
We have since then gotten a few reports from different parties of
"DNS issues", I am reasonably sure to have pinpointed this down to
badly configured DNS resolvers, but our weight is really too tiny
to force any change; and the doubt remains as to whether or not
this is on us. Without access to the resolvers it's also a tad
tricky for us to reproduce.
Things do work beautifully with pretty much all of the internet.
This appears to be related to:
https://tools.ietf.org/html/rfc7873#section-5.2.3
(sometimes in connection with 5.2.4)
Maybe someone with more experience and running at a larger scale
has pointers on this topic.
Specifically, I have observed:
Case A:
1. (Probably Bind) Resolver contacts Knot DNS with Client Cookie
and old Server Cookie
2. Knot DNS responds BADCOOKIE with the provided Client Cookie,
Old Server Cookie, and adds the new server cookie.
3. Resolver contacts Knot DNS with the same Client Cookie and old
Server Cokie
4. 2 and 3 repeat for a long time.
5. Domains end up not resolving.
Case B:
https://github.com/matrix-org/synapse/issues/8581
Their supplier says the DNS server "replies with BADCOOKIE to UDP
queries", as if that were a bad thing; but from reading RFC7873, I
understand that it is expected documented behaviour and the client
ought to try again with the given Server Cookie.
They say: "AIUI the resolver does retry, but again receives a
BADCOOKIE response."
I sadly don't have the tcpdump for those, but it could be just
like case A again.
These are the relevant bits from the config:
server:
rundir: "/var/run/knot"
user: knot:knot
listen: [ 0.0.0.0@53, ::@53 ]
log:
- target: syslog
any: info
statistics:
append: off
database:
storage: "/var/db/knot"
mod-cookies:
- id: default
badcookie-slip: 1
mod-rrl:
- id: default
rate-limit: 200 # Requests per second
template:
- id: default
storage: "/var/db/knot/primary"
semantic-checks: on
disable-any: on
serial-policy: dateserial
file: "%s.zone"
global-module: mod-cookies/default
global-module: mod-rrl/default
global-module: mod-stats
- id: secondary
storage: "/var/db/knot/secondary"
semantic-checks: on
disable-any: on
serial-policy: dateserial
file: "%s.zone"
module: mod-cookies/default
module: mod-rrl/default
module: mod-stats
- id: signed
storage: "/var/db/knot/primary"
dnssec-signing: on
zonefile-load: difference
semantic-checks: on
disable-any: on
serial-policy: dateserial
file: "%s.zone"
module: mod-cookies/default
module: mod-rrl/default
module: mod-stats
We are not using anycast clusters or anything like that.
A quick solution would be to disable cookies or to experiment with
noudp, but that's something we'd like to avoid.
The name servers in question are:
- ns3.exo.cat
- ns4.exo.cat
- ns1.unchat.cat (not association, but identical setup)
All tests I've ran against the servers and the associated domains
(e.g. exo.cat + unchat.cat) appear to be fine.
There is an odd one with https://dnsviz.net/d/unchat.cat/dnssec/,
but other tests like
https://www.zonemaster.net/result/d530cb253298b56c do not report
any issues.
Thank you in advance for any pointers you may have (and for Knot
DNS!),
--
Evilham
Hallo everybody,
this is just a little remark concerning the 'knot' upgrade from 2.9.x to
3.0.x.
The 'update-owner-name' in the 'acl' section of the configuration file
can now be either the FQDN (with trailing dot) or a relative name to the
zone, while it used to be a domain name before (without obligatory dot
at the end). The documentation was updated correctly:
Doc for 2.9:
acl
- id: owner_type_rule
action: update
update-type: [A, AAAA, MX] # Updates are only allowed to update
records of the specified types
update-owner: name # The allowed owners are specified by the list
on the next line
update-owner-name: [a.example.com, b.example.com, c.example.com]
update-owner-match: equal # The owners of records in an update
must be exactly equal to the names in the list
Doc for 3.0:
acl
- id: owner_type_rule
action: update
update-type: [A, AAAA, MX] # Updates are only allowed to update records
of the specified types
update-owner: name # The allowed owners are specified by the list on the
next line
update-owner-name: [a, b.example.com.] # Non-FQDN names are relative to
the effective zone name
update-owner-match: equal # The owners of records in an update must be
exactly equal to the names in the list
However; I did not notice the subtle change and was struggling for a
while to bring the dynamic zone update into a working state again .
Maybe, this saves a little time to someone else.
Regards and thanks for a great piece of software,
Oto Stefan
Hello Knot DNS users!
We would like to inform you about a change in Knot DNS behaviour in
versions 3.0.0 and 3.0.1. These two versions don't allow sharing of TCP
ports between programs, including other knotd instances (SO_REUSEADDR
isn't set). While this behaviour is better from point of view of
security, the downside of it is that when restarting a knotd daemon,
binding to a TCP port may fail after a restart if the restart is
immediate. In such a case, an error is logged and Knot starts its
operation on other configured ports only.
To verify that all TCP ports have been bound successfully after Knot
restart, please always check the log for possible errors. Such errors
would be close to the initial message about Knot DNS starting.
Since there was a complaint about this change, we plan to re-enable TCP
ports reuse in future releases. We also ponder making knotd exit if it
fails to bind to any of configured TCP ports. We would like hear from
you whether such a behaviour is what you, users, want best. Please, let
us know if you prefer this or a different solution.
With regards,
David Vašek
CZ.NIC
Hello all,
i stuck a little bit with the configuration of the new catalog zone feature in
knot dns 3.0.0.
The catalog zone replication is running quite well, but bootstrapping this
feature to replicate the config for zones wont work for me.
The zone name of the catalog zone is "zone.catalog".
The primary name server uses this config:
> # Configuration export (Knot DNS 3.0.0)
> zone:
> - domain: "zone.catalog."
> file: "%s"
> notify: [ "ns1.frank.REDACTED.DOM", "ns2.frank.REDACTED.DOM" ]
> acl: [ "ns1.frank.REDACTED.DOM", "ns2.frank.REDACTED.DOM" ]
> catalog-role: "interpret"
> catalog-template: "catalog-zone-template"
>
> - domain: "dom-siew9tho.invalid."
The zone has this content:
> [zone.catalog.] zone.catalog. 60 NS nshp.frank.REDACTED.DOM.
> [zone.catalog.] zone.catalog. 60 SOA nshp.frank.REDACTED.DOM. hostmaster.REDACTED.DOM. 1601540072 16384 2048 1048576 2560
> [zone.catalog.] id-ies3eidiev4ooquahgoh.zone.catalog. 0 PTR dom-siew9tho.invalid.
> [zone.catalog.] version.zone.catalog. 0 TXT "2"
Adding the following config to the primary works:
> conf-begin
> conf-set zone.domain "dom-siew9tho.invalid."
> conf-commit
> zone-begin dom-siew9tho.invalid.
> zone-set dom-siew9tho.invalid. @ 60 SOA nshp.frank.REDACTED.DOM. hostmaster.REDACTED.DOM. 1 16384 2048 1048576 2560
> zone-set dom-siew9tho.invalid. @ 60 NS nshp.REDACTED.DOM.
> zone-commit dom-siew9tho.invalid.
Query one of the secondaries (ns1) gives me:
> error: (no such zone found) [dom-siew9tho.invalid.]
The config of ns1:
> # Configuration export (Knot DNS 3.0.0)
> template:
> - id: "catalog-zone-template"
> storage: "/var/lib/knot/zones"
> file: "%s"
> semantic-checks: "on"
> dnssec-signing: "off"
> serial-policy: "unixtime"
> kasp-db: "/var/lib/knot/kasp-db"
>
> zone:
> - domain: "zone.catalog."
> file: "%s"
> master: "nshp.frank.REDACTED.DOM"
> acl: "nshp.frank.REDACTED.DOM"
> catalog-role: "interpret"
> catalog-template: "catalog-zone-template"
I'm sure i miss one or more parts and/or i have a serious misunderstanding of
the bootstrapping setup for this feature.
- frank
--
Frank Matthieß Mail: frank.matthiess(a)virtion.de
phone: +49 521 44 81 58 17
GnuPG: 9F81 BD57 C898 6059 86AA 0E9B 6B23 DE93 01BB 63D1
virtion GmbH Südring 11, DE 33647 Bielefeld
Geschäftsführer: Michael Kutzner
Handelsregister HRB 40374, Amtsgericht Bielefeld, USt-IdNr.: DE278312983