Encrypted DNS: Difference between revisions
m from `services.dnscrypt-proxy2` to `services.dnscrypt-proxy` https://search.nixos.org/options?channel=unstable&show=services.dnscrypt-proxy.configFile&query=dnscrypt-proxy |
m improve formatting |
||
| Line 81: | Line 81: | ||
=== Blocklist === | === Blocklist === | ||
Fetch a blocklist file (e.g. oisd) as a flake input: | Fetch a blocklist file (e.g. oisd) as a flake input: | ||
{{file|flake.nix|nix|3= | |||
{ | { | ||
inputs = { | inputs = { | ||
| Line 100: | Line 99: | ||
}; | }; | ||
} | } | ||
}} | |||
<syntaxhighlight lang="nixos"> | |||
{ config, lib, pkgs, inputs, ... }: | { config, lib, pkgs, inputs, ... }: | ||
let | let | ||
| Line 228: | Line 228: | ||
To update digests get the TLS certificate that signs the responses and calculate the digest: | To update digests get the TLS certificate that signs the responses and calculate the digest: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="console"> | ||
echo | openssl s_client -connect '1.1.1.1:853' 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 | $ echo | openssl s_client -connect '1.1.1.1:853' 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Or using <code>kdig</code> from <code>knot-dns</code> | Or using <code>kdig</code> from <code>knot-dns</code> | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="console"> | ||
kdig -d @1.1.1.1 +tls-ca +tls-host=one.one.one.one example.com | $ kdig -d @1.1.1.1 +tls-ca +tls-host=one.one.one.one example.com | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Networking]] | [[Category:Networking]] | ||
[[Category:DNS]] | [[Category:DNS]] | ||