Skip to content

Instantly share code, notes, and snippets.

@arbal
Last active June 16, 2024 19:42
Show Gist options
  • Save arbal/8d19ac49aaac52e2ce663688209eb978 to your computer and use it in GitHub Desktop.
Save arbal/8d19ac49aaac52e2ce663688209eb978 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo 'net.ipv4.ip_forward = 1' | sudo tee /etc/sysctl.d/20-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/20-tailscale.conf
sudo sysctl -p /etc/sysctl.d/20-tailscale.conf
printf '#!/bin/sh\n\nethtool -K %s rx-udp-gro-forwarding on rx-gro-list off \n' "$(ip route show 0/0 | cut -f5 -d" ")" | sudo tee /etc/networkd-dispatcher/routable.d/50-tailscale
sudo chmod 755 /etc/networkd-dispatcher/routable.d/50-tailscale
sudo /etc/networkd-dispatcher/routable.d/50-tailscale
test $? -eq 0 || echo 'An error occurred.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment