Tune NIC offloads for Tailscale exit node
This commit is contained in:
parent
8ca0aa2901
commit
036b5d85b8
1 changed files with 16 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.port = 41641;
|
||||
|
|
@ -8,4 +8,19 @@
|
|||
"--advertise-exit-node"
|
||||
"--hostname=bucur"
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.ethtool ];
|
||||
|
||||
systemd.services.tailscale-offload-tune = {
|
||||
description = "Disable GRO forwarding for Tailscale exit node performance";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
/bin/sh -c '${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 | ${pkgs.coreutils}/bin/cut -f 5 -d " " | xargs -r ${pkgs.ethtool}/bin/ethtool -K rx-udp-gro-forwarding on rx-gro-list off'
|
||||
'';
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue