Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd: change fallback dns servers #92061

Closed
wants to merge 1 commit into from
Closed

Conversation

@Mic92
Copy link
Contributor

Mic92 commented Jul 2, 2020

By default systemd fallbacks first to cloudflare and than to google DNS server.
The new default is to first use Cloudflare than Quad9 than google.
The first two should have have better privacy policies than the google one.
Note that this is the default value which can be overridden by users as well.
The default should be a good compromise between global availability, speed and privacy.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
By default systemd fallbacks to google DNS server. The new default is to first
use Cloudflare than Quad9 than google. The first two should have have better
privacy policies than the google one. Note that this is the default value which
can be overriden by users as well. The default should be a good compromise
between global availability, speed and privacy.
mesonFlagsArray+=(-Dntp-servers="0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org")
mesonFlagsArray+=("-Ddns-servers=${toString defaultDnsServers}")

This comment has been minimized.

@Mic92

Mic92 Jul 2, 2020 Author Contributor

It does not change much actually... But it is probably good to have had a discussion about it.
By default nixos does not use systemd-resolved btw.

@Mic92 Mic92 changed the title systemd: change default dns servers systemd: change fallback dns servers Jul 2, 2020
Copy link
Member

mdlayher left a comment

LGTM, seems like privacy is the right priority to consider for the defaults.

Copy link
Contributor

flokli left a comment

I'd prefer if we could do this via the module system (in resolved.conf), instead of doing a world rebuild and baking this into the derivation.

Edit: It seems there's already services.resolved.fallbackDns - we could probably just specify another default here than an empty list, if it's desired.

preConfigure = ''
preConfigure = let
defaultDnsServers = [
# We use these public name services, ordered by their privacy policy (hopefully):

This comment has been minimized.

@flokli

flokli Jul 2, 2020 Contributor

I'm not sure if the ordering here actually means anything - it seems resolved picks one (or multiple) arbitrary server from the list:

https://systemd.network/resolved.conf.html#DNS=

This comment has been minimized.

@Mic92

Mic92 Jul 4, 2020 Author Contributor

Well, given that their is no preference I don't know how to proceed. Some may want to remove the google one?

@Mic92 Mic92 closed this Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.