Encrypted DNS: Difference between revisions

imported>YarekTyshchenko
Add example config for stubby and cloudflare
imported>Papanito
add example of dnscrypt forwarding
Line 58: Line 58:


See [https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml the upstream example configuration file] for more configuration options.
See [https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml the upstream example configuration file] for more configuration options.
==== Local network - Forwarding rules ====
Maybe you'd like queries for your local domain to go to your router, and not to an upstream DNS resolver. By doing so, names of your local online devices can be found. For this you have to create a file with [https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-forwarding-rules.txt forwarding rules] which you then include in your config:
<syntaxhighlight lang="nix">
{
  services.dnscrypt-proxy2 = {
    enable = true;
    settings = {
      ...
      forwarding_rules = "/etc/nixos/services/networking/forwarding-rules.txt";
      ...
    };
  };
  ....
}
</syntaxhighlight>


=== Using alongside another DNS server ===
=== Using alongside another DNS server ===