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

Create /etc/resolv.conf in initramfs for tailscale client #2

Merged
merged 2 commits into from
May 4, 2023

Conversation

darkrain42
Copy link
Owner

On Debian systems, unless configured by something else, there isn't an /etc/resolv.conf in the initramfs, which hinders DNS resolution. Tailscale has its fallback DNS functionality, but that has problems in the corner-case situation of a Debian initramfs environment:

  • no /etc/resolv.conf means tailscale (or golang?) attempts to use 127.0.0.1 as a DNS resolver
  • the loopback interface (lo) isn't brought up in the initramfs. linux sends the DNS traffic off-device (destined for 127.0.0.1)

Even with the Tailscale fix for that issue, it's a fallback and there's a noticeable delay, so do the correct thing here and create /etc/resolv.conf.

darkrain42 added 2 commits May 3, 2023 19:53
On Debian systems, unless configured by something else, there isn't an
/etc/resolv.conf in the initramfs, which hinders DNS resolution.
Tailscale has its fallback DNS functionality, but that has problems [1]
in the corner-case situation of a Debian initramfs environment:

- no /etc/resolv.conf means tailscale (or golang?) attempts to use
  127.0.0.1 as a DNS resolver
- the loopback interface (lo) isn't brought up in the initramfs. linux
  sends the DNS traffic off-device (destined for 127.0.0.1)

Even with the Tailscale fix for that issue, it's a fallback and there's
a noticeable delay, so do the correct thing here and create
/etc/resolv.conf.

[1] tailscale/tailscale#6110
@darkrain42 darkrain42 self-assigned this May 4, 2023
@darkrain42 darkrain42 merged commit f475be8 into main May 4, 2023
@darkrain42 darkrain42 deleted the configure-resolv-conf branch May 4, 2023 03:05
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.

1 participant