Commit Graph

4 Commits

Author SHA1 Message Date
Paul Aurich
564c3c3539 Create /etc/resolv.conf in initramfs for tailscale client
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] https://github.com/tailscale/tailscale/issues/6110
2023-05-03 19:53:13 -07:00
Paul Aurich
41ed765b9a Keep attempting to bring up the network
After a total power outage (system and networking gear), it's possible
that the system boots up and blow through all the timeouts for DHCP
before the network is operational. Unfortunately, I can't always solve
that.
2022-12-06 20:13:10 -08:00
Paul Aurich
0a7c2d4e63 update shellcheck ignores for newer shellcheck 2022-01-31 19:36:00 -08:00
Paul Aurich
797252e021 initramfs hook for tailscale
This is intended to be used with an ephemeral auth key with an ACL tag,
and ACL rules that restrict the ephemeral node to inbound-only traffic.
It does not share instance state with tailscale running in Linux.

Reference:
- https://tailscale.com/kb/1111/ephemeral-nodes/
- https://tailscale.com/kb/1068/acl-tags/#generate-an-auth-key-with-an-acl-tag
- https://tailscale.com/kb/1068/acl-tags/#using-tags-in-acls-for-access-control
2022-01-31 19:36:00 -08:00