Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
I switched to Knot from Bind and would like to clear few small questions. I'm using Knot DNS as primary, with OVH as secondary DNS. OVH asks to add an ownercheck subdomain, for verification purposes. I did this but it does not gets resolved. My configuration:
# uname -aLinux server.domain.com 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux# firewall-cmd --permanent --zone=public --add-service=dns# firewall-cmd --reload# cat /etc/knot/knot.conflog: - target: syslog any: errorserver: listen: 198.40.136.42@53 listen: 198.40.136.43@53 max-udp-payload: 1280 max-ipv6-udp-payload: 1280 rundir: /run/knot user: knot:knotzone: - domain: domain.com storage: /var/lib/knot/zones file: domain.com.zone# cat /var/lib/knot/zones/domain.com.zone$TTL 1d$ORIGIN domain.com.@ IN SOA ns1.domain.com. hostmaster.domain.com. ( 14 ; serial 6h ; refresh 1h ; retry 2w ; expire 1d ) ; negative cache IN A 198.27.60.138 IN NS ns1.domain.com. IN NS ns2.domain.com.ns1 IN A 198.40.136.42ns2 IN A 198.40.136.43ownercheck IN TXT d437c164# systemctl start knotMar 20 00:43:46 server systemd: Starting Knot DNS server...Mar 20 00:43:46 server knotc: Configuration is validMar 20 00:44:36 server systemd: Started Knot DNS server.
I can connect fine to the actual 53 port, from my Mac:
$ nc -z 198.40.136.42 53Connection to 198.40.136.42 port 53 [tcp/domain] succeeded!
Did I missed something obvious? I don't have Knot Resolver installed.
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Is already enabled, I'll do the rest of checks you recommended in a bit:
# firewall-cmd --list-all | grep services services: ssh dhcpv6-client ntp http https dns# cat /usr/lib/firewalld/services/dns.xml<?xml version="1.0" encoding="utf-8"?><service> <short>DNS</short> <description>The Domain Name System (DNS) is used to provide and request host and domain names. Enable this option, if you plan to provide a domain name service (e.g. with bind).</description> <port protocol="tcp" port="53"/> <port protocol="udp" port="53"/></service># kzonecheck -v /var/lib/knot/zones/domain.com.zoneNo semantic error found
My question is, how are the DNS changes pushed to public servers with Knot? I had to stop Bind services on the old server, in order to let propagate the new settings from new server with Knot.
@dsalzman feel free to make this issue confidential, if you want me to post true server settings. I replaced the real values with random ones.
@dsalzman everything started to work, it took forever to propagate. :)
I have a sidebar question, if you don't mind. What would be the use of Knot Resolver, in my case? All I want is to publish my own DNS server settings, do I need the Resolver?
@dsalzman If I understand correctly, Knot Resolver is a caching DNS resolver that can help speed up and secure DNS resolution on my server. I will never use that, but I want to forward these DNS resolutions to 1.1.1.1. That's why I'm using:
# nmcli con mod enp3s0 ipv4.dns 1.1.1.1
Are there any advanced tutorials you recommend for securing Knot DNS? I'm reading the documentation now, did a search and there are not many guides on Knot.
zone: - domain: domain.com storage: /var/lib/knot/zones file: domain.com.zone dnssec-signing: on
I get this error:
# systemctl restart knotMar 20 16:49:20 server systemd[1]: Starting Knot DNS server...Mar 20 16:49:29 server knotd[7514]: error: [domain.com.] DNSSEC, failed to initialize (operation not permitted)Mar 20 16:49:29 server knotd[7514]: error: [domain.com.] zone event 'load' failed (operation not permitted)Mar 20 16:49:29 server systemd[1]: Started Knot DNS server.
The problem is that storage in the default template has extended use. If https://www.knot-dns.cz/docs/2.8/singlehtml/index.html#kasp-db is not specified, the default value is /var/lib/knot/master/keys in your case. And this directory is not writable by knot.
We will probably move global database options to another section to mitigate this ambiguity.
The default storage path is /var/lib/knot, therefore /var/lib/knot/keys exists with proper permissions. I'm trying to understand why you suggest the default value is /var/lib/knot/master/keys?
I already specify the storage setting at compile time:
Is the template ID forcing the directory change? In this case, is it recommended to use the default template storage as /var/lib/knot? Will the signed template inherit the /var/lib/knot/keys directory use?
@dsalzman removing the default template fixed the error, which I presume will pull the proper default settings and inherit everything into signed template:
template: - id: signed storage: /var/lib/knot/signed dnssec-signing: onzone: - domain: domain.com file: domain.com.zone template: signed
Now I have a different error:
Mar 21 16:41:11 server systemd: Starting Knot DNS server...Mar 21 16:41:11 server knotc: Configuration is validMar 21 16:41:11 server systemd: Started Knot DNS server.Mar 21 16:41:11 server knotd: error: [domain.com.] zone event 'journal flush' failed (operation not permitted)
Never mind, running the logs in debug showed another permission error, I'm going to change the directory permissions into rpm package I'm building and avoid these issues permanently.
@dsalzman thank you for your patience, is the Knot learning curve. Really happy I made the switch from Bind, I'm mostly happy how fast the Knot devs fix bugs, allowing me to build quickly new Knot rpm packages that others can use also.
There is one more question related to DNSSEC. Knot changed dramatically the domain.com.zone file. I presume the safe way to work on a zone file with the the Knot editor? There is something not clear for me into documentation, the zone-freeze is only to be able editing the actual zone file? I prefer to use this method, let me know if appropriate:
The former problem with insufficient permissions relates to KASP database access. If the path is not explicitly configured via https://www.knot-dns.cz/docs/2.8/singlehtml/index.html#kasp-db, the default value is used storage/keys. However, your storage was:
As for zone-freeze, this command is important for situations when you want to manually change zone contents (zone file modification or using knotc operations) and it's possible that the server can concurrently change the zone (ddns, dnssec signing). So, you must postpone all server-initiated events.
Permissions are OK, but information is not added into knot.conf?
Logs:
Mar 22 13:39:41 server knotd: info: control, received command 'conf-begin'Mar 22 13:39:54 server knotd: info: control, received command 'conf-set'Mar 22 13:39:58 server knotd: info: control, received command 'conf-diff'Mar 22 13:39:59 server knotd: info: control, received command 'conf-commit'
Is this a known limitation? I would like to add new zones from scratch, using only knotc commands. Even if I create an empty file, it will complain about the missing SOA:
Mar 22 16:25:01 server knotd: info: starting serverMar 22 16:25:01 server knotd: error: [alpha.com.] check, missing SOA at the zone apexMar 22 16:25:01 server knotd: error: [alpha.com.] failed to parse zone file (failed)Mar 22 16:25:01 server knotd: error: [alpha.com.] zone event 'load' failed (failed)Mar 22 16:25:01 server knotd: info: server started in the foreground, PID 32061Mar 22 16:25:01 server systemd: Started Knot DNS server.
For effective operation of dynamic configuration, the server must be started with explicit configuration database location -C path_to_confdb (usually /var/lib/knot/confdb), or it must be initialized using knotc conf-init in advance. Then the configuration file is untouched!