|
| 1 | +# Docker DNS setup |
| 2 | + |
| 3 | +There are several DNS components in the Docker setup: |
| 4 | + |
| 5 | +* A non-validating resolver, used for DNS resolving by almost all tests. |
| 6 | + As we have our own DNSSEC validation test, we want to see bogus responses as well. |
| 7 | +* A validating resolver, used to validate DANE records through ldns-dane. |
| 8 | +* An authoritative server for the connection test zone. |
| 9 | +* The DNS records in the zone for `INTERNETNL_DOMAINNAME`. |
| 10 | + These are hosted elsewhere, but have certain requirements for the instance to work. |
| 11 | + |
| 12 | +The resolvers do not require any specific configuration. |
| 13 | +In this document, `INTERNETNL_DOMAINNAME` is `example.com`. |
| 14 | + |
| 15 | +## Common parts |
| 16 | + |
| 17 | +For accessing the absolute minimum basic functionality of the application the following DNS records must be configured: |
| 18 | + |
| 19 | + example.com. A 192.0.2.1 |
| 20 | + AAAA 2001:db8:1::1 |
| 21 | + |
| 22 | +The following extra records must be configured for language switching: |
| 23 | + |
| 24 | + www.example.com. CNAME example.com. |
| 25 | + nl.example.com. CNAME example.com. |
| 26 | + en.example.com. CNAME example.com. |
| 27 | + |
| 28 | +The hostname (`INTERNETNL_DOMAINNAME`) should have SPF, DKIM and DMARC, |
| 29 | +as some mail servers may filter on this, and it could affect mail tests. |
| 30 | +For a domain that does not otherwise send email, use: |
| 31 | + |
| 32 | + example.com. TXT "v=spf1 a -all" ; The "a" mechanism is needed for the mail test (see rfc7208, section-2.3). |
| 33 | + _domainkey.example.com. TXT "v=DKIM1; p=" ; empty DKIM to score 100% for this non-sending subdomain that does have SPF "a" mechanism which is needed for mail test. |
| 34 | + _dmarc.example.com. TXT "v=DMARC1; p=reject; sp=reject;" |
| 35 | + |
| 36 | +The `INTERNETNL_DOMAINNAME` host should also have a working MX and correct FCrDNS. |
| 37 | + |
| 38 | + |
| 39 | +## Specific settings for batch mode |
| 40 | + |
| 41 | +For batch, the connection test is not used, and the authoritative server should not be publicly available. |
| 42 | +Set `IPV4_IP_PUBLIC=127.0.0.1` and `IPV6_IP_PUBLIC=::1` in `docker/host.env`. |
| 43 | + |
| 44 | + |
| 45 | +## Specific settings for single test mode |
| 46 | + |
| 47 | +The single test instance also has an IPv6-only host: |
| 48 | + |
| 49 | + ipv6.example.com. AAAA 2001:db8:1::1 |
| 50 | + www.ipv6.example.com. CNAME ipv6.example.com. |
| 51 | + nl.ipv6.example.com. CNAME ipv6.example.com. |
| 52 | + en.ipv6.example.com. CNAME ipv6.example.com. |
| 53 | + |
| 54 | +For the connection test the following records are also required: |
| 55 | + |
| 56 | + conn.example.com. CNAME example.com. |
| 57 | + en.conn.example.com. CNAME example.com. |
| 58 | + nl.conn.example.com. CNAME example.com. |
| 59 | + www.conn.example.com. CNAME example.com. |
| 60 | + |
| 61 | + conn.ipv6.example.com. CNAME ipv6.example.com. |
| 62 | + nl.conn.ipv6.example.com. CNAME ipv6.example.com. |
| 63 | + en.conn.ipv6.example.com. CNAME ipv6.example.com. |
| 64 | + www.conn.ipv6.example.com. CNAME ipv6.example.com. |
| 65 | + |
| 66 | + test-ns-signed.example.com. NS example.com. |
| 67 | + test-ns6-signed.example.com. NS ipv6.example.com. |
| 68 | + |
| 69 | +The Docker image will create two DNS zones, served by the authoritative server. |
| 70 | +These are signed, and therefore also require the correct `DS` records. |
| 71 | + |
| 72 | +Obtain the `DS` records by inspecting the logs of the `unbound` service and |
| 73 | +finding the 2 lines beneath `Please add the following DS records for domain`: |
| 74 | + |
| 75 | + $ docker logs internetnl-prod-unbound-1 2>&1 | grep -A2 "Please add the following DS records for domain" |
| 76 | + Please add the following DS records for domain example.com: |
| 77 | + test-ns-signed.example.com. IN DS 55295 8 2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 78 | + test-ns6-signed.example.com. IN DS 33292 8 2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| 79 | + |
| 80 | +Then, configure those two DS records in their parent zone. |
| 81 | + |
| 82 | +You can verify DNSSEC using: |
| 83 | + |
| 84 | + - https://dnsviz.net/d/test.a.conn.test-ns-signed.example.com/dnssec/ |
| 85 | + - https://dnsviz.net/d/test.aaaa.conn.test-ns-signed.example.com/dnssec/ |
| 86 | + |
0 commit comments