From 9c82e500075bc113f2f367e5a1d93e96e10aa04f Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:12:41 +0200 Subject: [PATCH] tailscale add exit node on Debian 13 --- tailscale/tailscale-exit-node-setup.md | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tailscale/tailscale-exit-node-setup.md diff --git a/tailscale/tailscale-exit-node-setup.md b/tailscale/tailscale-exit-node-setup.md new file mode 100644 index 0000000..3568796 --- /dev/null +++ b/tailscale/tailscale-exit-node-setup.md @@ -0,0 +1,33 @@ +# TESTED ON A DEBIAN 13 VPS +``` +curl -fsSL https://tailscale.com/install.sh | sh + +sudo tailscale up --advertise-exit-node +# Warning: IP forwarding is disabled, subnet routing/exit nodes will not work. +# See https://tailscale.com/s/ip-forwarding +# Warning: UDP GRO forwarding is suboptimally configured on eth0, UDP forwarding throughput capability will increase with a configuration change. +# See https://tailscale.com/s/ethtool-config-udp-gro + + +# See https://tailscale.com/s/ip-forwarding +echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf +echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf +sudo sysctl -p /etc/sysctl.d/99-tailscale.conf +# net.ipv4.ip_forward = 1 +# net.ipv6.conf.all.forwarding = 1 +# net.ipv4.ip_forward = 1 +# net.ipv6.conf.all.forwarding = 1 + + +# See https://tailscale.com/s/ethtool-config-udp-gro +NETDEV=$(ip -o route get 8.8.8.8 | cut -f 5 -d " ") +sudo ethtool -K $NETDEV rx-udp-gro-forwarding on rx-gro-list off + +sudo mkdir -p /etc/networkd-dispatcher/routable.d/ + +printf '#!/bin/sh\n\nethtool -K %s rx-udp-gro-forwarding on rx-gro-list off \n' "$(ip -o route get 8.8.8.8 | cut -f 5 -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.' +```