Support local DNS publishing over a restricted Unix socket

This commit is contained in:
parkel committed 2026-11-21 01:30:34 +01:00
1 parent ffdeb5fe69
commit 6e075c25f4
6 files changed
+134 -12

No files matched your search

+22
View File
@@ -273,6 +273,28 @@ it again. Coulobre checks the SOA serial, reloads the individual zone, and
waits for BIND9 to report the requested serial. Reapply the same manifest to
resume after an interrupted reload. See the [BIND9 command reference](https://bind9.readthedocs.io/en/v9.18.39/manpages.html#rndc) and [RFC 1982](https://www.rfc-editor.org/rfc/rfc1982.html).
### Enable local DNS publishing
On a BIND9 node with the same RNDC setup, install Coulobre in a root-owned
virtual environment at `/opt/coulobre`. Create the managed zone directory and
enable the publishing socket.
```sh
getent group coulobre-dns-provisioning >/dev/null || sudo groupadd --system coulobre-dns-provisioning
sudo install -d -o root -g root -m 0755 /etc/bind/coulobre
sudo install -m 0644 deploy/systemd/coulobre-dns-apply.socket \
deploy/systemd/coulobre-dns-apply@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now coulobre-dns-apply.socket
```
Grant the socket group only to the service identity responsible for publishing
zones. Send one version 1 or 2 zone manifest as UTF-8 JSON to
`/run/coulobre-dns-apply.sock`, with a limit of 1 MiB. Shut down the writing
half of the connection and read the JSON reply to EOF. For a valid manifest,
the reply identifies the domain and SOA serial. A `configured` reply means
BIND9 has loaded that serial. A `failed` reply includes a diagnostic.
## Request a virtual mailbox
Open a hosting account and select **Request mailbox**. Enter the part before