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

Enable systemd-resolved and use as default resolver #288

Closed
wants to merge 1 commit into from
Closed

Enable systemd-resolved and use as default resolver #288

wants to merge 1 commit into from

Conversation

darkmuggle
Copy link
Contributor

When booting with DHCP6 and DHCP4, the most recent DHCP response will
overwrite /etc/resolv.conf. By using systemd-resolvd, we get ability to
have scoped DNS resolvers.

To keep the NetworkManager configurations in the same place, the
overlay.d directory has been renamed.

In the event a user does not want to use systemd-resolved, they can
easily disable it by:

  • replacing /etc/resolv.conf with their own
  • populate a new /etc/NetworkManager/conf.d/99-user with:
    [main]
    dns=default
    systemd-resolved=false

@darkmuggle
Copy link
Contributor Author

This is a WIP idea, that I wanted to put out there for discussion. This allows the system to use scoped resolvers. I'm not sure if this is a great idea -- or ifs been discussed -- but I gave it a shot while digging into the way that FCOS's networking works.

[main]

# Send the connection DNS configuration to systemd-resolved.
systemd-resolvd=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systemd-resolvd=true

# Use systemd-resolved for name resolution.
dns=systemd-resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to your commit message, it sounds like you'd want the auto-detect behavior of leaving dns= unspecified.

@lucab
Copy link
Contributor

lucab commented Feb 25, 2020

@darkmuggle not against this, but I fear we may be overly optimistic.

I think the bug you are implicitly referencing is coreos/fedora-coreos-tracker#393. That one is about initramfs networking, where we (currently) don't run NM.

So I guess that:

@jlebon
Copy link
Member

jlebon commented Feb 25, 2020

Yeah, I think the first step is to switch to NM in the initrd and see where we land. That specific issue may melt away entirely.

@darkmuggle
Copy link
Contributor Author

Yeah, I think the first step is to switch to NM in the initrd and see where we land. That specific issue may melt away entirely.

That would be ideal. I threw this out for consideration and debate. I anticipate leaving this as a draft, until after NM in the initrd.

@lucab
Copy link
Contributor

lucab commented Feb 25, 2020

As a data-point, Container Linux has been using systemd-resolved for a long time. I don't remember huge issues/regression or user friction with it, but there have been some CVEs in the past. However, it was used in its natural ecosystem (networkd+timesyncd+resolved), not on the side of NM.

@dustymabe
Copy link
Member

Discussed this with a member of the NM team. They pointed out that systemd-resolved is the best way to do DNS configuration and it is recommended to use it with NM. It also may become the default in the rest of Fedora (context).

@gtherond
Copy link

Hi everyone, as suggested by @dustymabe on IRC, I would add my use-case to this draft.
I would like to get DNSOverTLS at system scope with FCOS, however, as for now, it seems that it is not possible as it doesn't use systemd-resolved anymore.

systemd-resolved partially support DoT since v239 and fully support it since v243.

When booting with DHCP6 and DHCP4, the most recent DHCP response will
overwrite /etc/resolv.conf. By using systemd-resolved, we get ability to
have scoped DNS resolvers.

To keep the NetworkManager configurations in the same place, the
overlay.d directory has been renamed.

In the event a user does not want to use systemd-resolved, they can
easily disable it by:
- replacing /etc/resolv.conf with their own
- populate a new /etc/NetworkManager/conf.d/99-user with:
   [main]
   dns=default
   systemd-resolved=false
@darkmuggle
Copy link
Contributor Author

Closing this a stale. The idea may be desirable for our users, but as @lucab pointed out the motivation on this is moot. If the group wants this to be continued, I can re-open after its been tested again.

@darkmuggle darkmuggle closed this Apr 16, 2020
@jlebon
Copy link
Member

jlebon commented Apr 16, 2020

FWIW: https://fedoraproject.org/wiki/Changes/systemd-resolved

So any subtle compatibility bug between systemd-resolved and NM will likely be shaken out if this goes forward.

@dustymabe
Copy link
Member

@jlebon do you think it's worth implementing for next now?

@gtherond
Copy link

I would still push for this one on my own as I'm still blocked with the DTLS implementation for now and as it's a worthy security measure.

@travier
Copy link
Member

travier commented Aug 27, 2020

See ongoing discussion in #575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants