Encrypted DNS health, comparing a zone's views, --local everywhere
jarld checks the DoT and DoH listeners every 10 minutes as a client would (page, dashboard, jarl encrypted-dns health, jarl_encrypted_dns_up). The Compare views tab and jarl zone diff show what differs between a zone's views, with Use this version. --local works on unlinked zones. A changed certificates.dir is followed by encrypted DNS's tls statements. Sharing an already shared version replaces other views' overrides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
67ae0091b3
commit
13ffd8cad4
31 files changed
+1153
-18
No files matched your search
@@ -353,6 +353,7 @@ and `linked_with` (the other views).
|
||||
|--------|------|------|
|
||||
| POST | `/zones/{zone}/link` | `{"with": ["external"]}` (default: every view with that zone). Names and types that are the same everywhere become shared, the rest stay local |
|
||||
| POST | `/zones/{zone}/unlink` | Takes the zone out of its link; its records stay, all local |
|
||||
| GET | `/zones/{zone}/compare` | The zone across the views that have it (`?views=a,b`; `?all=1` also the same rows): `views`, `linked`, `same` (count) and `rows` (name, type, `same`, per view `records`, `ids`, `linked`). The zone may be named without a view |
|
||||
|
||||
`POST /zones` takes `"link_with": "VIEW"` to create a zone linked with
|
||||
that view's zone of the same name.
|
||||
|
||||
@@ -193,7 +193,10 @@ jarl option set listen-on 'port 853 tls dot { 10.0.10.5; }' --add
|
||||
```
|
||||
|
||||
A certificate named uses can't be deleted or lose its `dns` use until
|
||||
named no longer names its files.
|
||||
named no longer names its files. If you change `certificates.dir`, jarld
|
||||
writes the certificates to the new place when it starts and points the
|
||||
`tls` statements encrypted DNS wrote there (a hand-written `tls`
|
||||
statement you change yourself).
|
||||
|
||||
## A certificate you renew yourself
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ jarl zone unlink adbraun.lol --view vps
|
||||
jarl record add adbraun.lol nas A 10.0.10.20 --view internal --local # this view only
|
||||
jarl record set adbraun.lol www A 10.0.10.5 --view internal --local # override the shared www A here
|
||||
jarl record update 1234 --local | --shared
|
||||
jarl zone diff adbraun.lol [--view V --view W] [--all] # what differs between the views
|
||||
```
|
||||
|
||||
When a zone exists in several views, add `--view NAME` to commands that
|
||||
@@ -417,6 +418,7 @@ See [exposure.md](exposure.md).
|
||||
jarl encrypted-dns # what is set up, what to give clients
|
||||
jarl encrypted-dns setup --hostname dns.adbraun.lol --address 10.0.10.5 [--address IPv6] [--doh-port 8443] [--no-doh]
|
||||
jarl encrypted-dns check --address 10.0.10.5 --doh-port 443
|
||||
jarl encrypted-dns health # check the listeners now, as a client would
|
||||
jarl encrypted-dns disable
|
||||
```
|
||||
|
||||
|
||||
@@ -113,6 +113,31 @@ Clients check the certificate against the host name, so the name must
|
||||
resolve to this server for them: the setup adds it to your private views.
|
||||
Open the ports in the server's firewall for your own networks only.
|
||||
|
||||
## Health
|
||||
|
||||
jarld checks the listeners itself, a minute after it starts and then
|
||||
every 10 minutes, the way a client would: it connects to each, checks the
|
||||
certificate named serves (for the host name, current, and the one Jarl
|
||||
last wrote, so a renewal named hasn't reread shows up) and asks for the
|
||||
host name. The Encrypted DNS page shows the result per listener (**Check
|
||||
now** checks again), the dashboard a card and the problems, Prometheus
|
||||
`jarl_encrypted_dns_up{kind,address,port}`:
|
||||
|
||||
```sh
|
||||
jarl encrypted-dns health # check now; exit 1 when a listener doesn't work
|
||||
```
|
||||
|
||||
What it can say:
|
||||
|
||||
| | |
|
||||
|--|--|
|
||||
| nothing listens on ADDR port P | named couldn't bind the port: look in named's log (ports below 1024 need named to start as root, as the Debian service does) |
|
||||
| no answer within 5s | a firewall on the server |
|
||||
| a certificate for X, not HOST | named serves another certificate |
|
||||
| an older certificate | named hasn't reread the renewed files (`rndc reconfig`) |
|
||||
| not from a CA this server trusts (warning) | a staging or test CA: clients reject it unless they trust it |
|
||||
| REFUSED (warning) | it works, but this server's own address gets a view that doesn't answer for the host name |
|
||||
|
||||
## What Jarl checks
|
||||
|
||||
* A `tls` statement whose files don't exist is an error
|
||||
@@ -129,3 +154,4 @@ Open the ports in the server's firewall for your own networks only.
|
||||
| POST | `/encrypted-dns/check` | `{"addresses", "dot", "doh", "dot_port", "doh_port"}`: `conflicts` (address, port, what) and `free_doh_port` |
|
||||
| POST | `/encrypted-dns` | `{"hostname", "certificate", "addresses", "dot", "doh", "dot_port", "doh_port", "views"}`: staged or applied like any change; 409 while the certificate hasn't been obtained |
|
||||
| DELETE | `/encrypted-dns` | Turns it off |
|
||||
| POST | `/encrypted-dns/health` | Checks the listeners now: `checked`, `probes` (kind, address, port, `ok`, `problem`, `warning`, certificate names, expiry and serial, `trusted`, `rcode`, `ms`). `GET /encrypted-dns` has the last check as `health` |
|
||||
@@ -132,6 +132,7 @@ same values.
|
||||
| `jarl_certificate_expiry_timestamp_seconds{certificate,source}` | When each certificate Jarl manages expires ([certificates.md](certificates.md)). |
|
||||
| `jarl_certificate_failing{certificate,source}` | 1 when obtaining (or reading) the certificate failed the last time, or it has expired. |
|
||||
| `jarl_certificate_renewal_failures{certificate}` | Failed attempts to obtain a certificate since its last success. |
|
||||
| `jarl_encrypted_dns_up{kind,address,port}` | 1 when the DoT or DoH listener answered with the right, current certificate at the last check ([encrypted-dns.md](encrypted-dns.md#health)). |
|
||||
|
||||
### Queries (with `stats.enabled`)
|
||||
|
||||
@@ -232,6 +233,11 @@ groups:
|
||||
expr: jarl_certificate_expiry_timestamp_seconds - time() < 10 * 86400
|
||||
annotations:
|
||||
summary: "Certificate {{ $labels.certificate }} expires within 10 days"
|
||||
- alert: EncryptedDNSDown
|
||||
expr: jarl_encrypted_dns_up == 0
|
||||
for: 20m
|
||||
annotations:
|
||||
summary: "DNS over {{ $labels.kind }} on {{ $labels.address }} port {{ $labels.port }} isn't working (see the Encrypted DNS page)"
|
||||
- alert: BlockingPausedForLong
|
||||
expr: jarl_blocking_paused == 1
|
||||
for: 24h
|
||||
|
||||
@@ -209,6 +209,23 @@ each view (Jarl lists them). Share the right version afterwards. Unlinking
|
||||
keeps every record, all local; a link left with one zone is dissolved, as
|
||||
when the other zone is deleted.
|
||||
|
||||
**Comparing the views.** The zone's **Compare views** tab, or `jarl zone
|
||||
diff adbraun.lol`, lines the views up and shows each name and type that
|
||||
differs: a view's own records, or a name one view lacks. **Use this
|
||||
version** (`jarl record update ID --shared`) makes one view's version
|
||||
every view's. It works for zones that aren't linked too, to see what
|
||||
linking them would keep local.
|
||||
|
||||
```
|
||||
$ jarl zone diff adbraun.lol
|
||||
NAME TYPE INTERNAL EXTERNAL
|
||||
nas A 10.0.10.20 [local, id 812] 203.0.113.20 [local, id 790]
|
||||
5 names and types differ, 21 are the same; linked
|
||||
```
|
||||
|
||||
`--local` also works on a zone that isn't linked (its records are local
|
||||
anyway), so scripts don't need to know; `--shared` there is refused.
|
||||
|
||||
**Permissions** are checked in every view a change reaches. A token with
|
||||
a grant for one view only (`views=internal`) can change that view's local
|
||||
records and make overrides, but not a shared record, since that would
|
||||
|
||||
Reference in new issue
Block a user