Job dns-primary-git
README
Skip to buildsAuthoritative DNS server
This is a MirageOS unikernel which is an authoritative DNS server on port 53 (TCP and UDP). The data to be served is pulled from a git remote repository. The server supports dynamic updates (NSUPDATE), zone transfer (AXFR and IXFR), all cryptographically authenticated and integrity protected with TSIG (HMAC with a pre-shared secret).
The git remote is expected to contain a flat file hierarchy where each zone
to be served is a separate file. HMAC secrets are stored as DNSKEY entries
in _keys
zones (i.e. example.com._keys
or _keys
).
This can be used with dns-secondary, and let's encrypt for automated provisioning of let's encrypt certificates.
Interoperability
Considering you have a _keys
file with an example HMAC-SHA256 key:
client._update. DNSKEY 0 3 163 0701XCD0muDYZIiLwv6wN/Tyoor/hd9+1zjmZ1mIlzY=
Also, take a "mirage" zone as given, and the unikernel running on "10.0.42.2" in the following.
Interoperation with utilities from bind is given:
If a NOTIFY (RFC 1996) is received, which is signed with a known hmac
secret, a git pull is done. This means an update by the operator to the zones in
git can be done, but remember to send a NOTIFY afterwards. Hint:
dig SOA mirage @10.0.42.2 +opcode=notify -y hmac-sha256:client._update:0701XCD0muDYZIiLwv6wN/Tyoor/hd9+1zjmZ1mIlzY=
A NSUPDATE (RFC 2136) can trigger zone updates. Launch it with
nsupdate -y hmac-sha256:client._update:0701XCD0muDYZIiLwv6wN/Tyoor/hd9+1zjmZ1mIlzY=
and you'll enter an interactive session:
> server 10.0.42.2
> zone mirage
> add local.mirage 3600 IN A 127.0.0.1
> send
This will trigger:
- (a) an update of the zone mirage,
- (b) increment the serial in the SOA, and
- (c) a commit and push to the git repository.
You can observe by requesting dig soa mirage @10.0.42.2
before and after
the nsupdate
execution.
Installation from source
To install this unikernel from source, you need to have opam (>= 2.1.0) and ocaml (>= 4.08.0) installed. Also, mirage is required (>= 4.5.0). Please follow the installation instructions.
The following steps will clone this git repository and compile the unikernel:
$ git clone https://github.com/robur-coop/dns-primary-git.git
$ mirage configure -t <your-favourite-target>
$ make depend
$ make build
Installing as binary
Binaries are available at Reproducible OPAM builds, see Deploying binary MirageOS unikernels and Reproducible MirageOS unikernel builds for details.
Questions?
Please open an issue if you have questions, feature requests, or comments.
Builds
Back to readme- ☑ freebsd-14 2024-11-21 05:11:32Z primary-git.hvt
SHA256:428049d9adb1be4607487f776e99feb3ab1345025240fc7d052937bcce4deaf7
(8.95MB) - ☑ freebsd-14 2024-11-15 02:20:21Z primary-git.hvt
SHA256:a3db1b732c3cb76b0ec08ac0ee815ede2e0908642d1f9ca327f66b3d4b2eb77e
(8.95MB) - ☑ freebsd-14 2024-11-07 02:06:47Z primary-git.hvt
SHA256:8f72ba889b2f9a82f620824fdfa03b73a0a9069f122ef839acb122bf956c5f65
(8.95MB) - ☒ freebsd-14 2024-10-29 13:17:42Z Build failure: exited 125
- ☑ freebsd-14 2024-10-24 02:49:01Z primary-git.hvt
SHA256:5b6bfc3e2eb212c061bfca84ac782600c0798fa39d5cc7971c938fcf655eed9d
(8.95MB) - ☑ freebsd-14 2024-10-23 01:06:40Z primary-git.hvt
SHA256:6c0decdbc859b5d8689998185ef9c10c2264f6807432741f762520eaf9ba851b
(8.95MB) - ☑ freebsd-14 2024-10-14 11:53:21Z primary-git.hvt
SHA256:6a0159545e24be04116011f9d98820764f51fa0e5856dc10006cc0dbd09cbdcc
(8.95MB)
Excluding failed builds here.