Add tailscale to aloria
This commit is contained in:
parent
38f8b9428b
commit
05f36f27cb
|
|
@ -128,7 +128,7 @@ in {
|
|||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["0.0.0.0/0" "::/0"];
|
||||
allowedIPs = ["0.0.0.0/0"];
|
||||
endpoint = "external.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ in {
|
|||
address = ["10.0.0.5/24"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||
listenPort = 51820;
|
||||
autostart = true;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [
|
||||
|
|
@ -162,6 +162,7 @@ in {
|
|||
enable = true;
|
||||
extraUpFlags = [
|
||||
"--login-server=https://headscale.thomasave.be"
|
||||
"--accept-routes"
|
||||
];
|
||||
authKeyFile = "/home/user/.secrets/Tailscale/Aloria/authkey";
|
||||
};
|
||||
|
|
@ -177,5 +178,22 @@ in {
|
|||
"net.ipv6.conf.all.disable_ipv6" = 1;
|
||||
"net.ipv6.conf.default.disable_ipv6" = 1;
|
||||
"net.ipv6.conf.lo.disable_ipv6" = 1;
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv4.conf.all.forwarding" = 1;
|
||||
};
|
||||
|
||||
systemd.services.tailscale-ethtool-tweaks = {
|
||||
description = "Apply ethtool tweaks for Tailscale subnet routing performance";
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network-online.target"];
|
||||
wants = ["network-online.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = pkgs.writeShellScript "tailscale-ethtool-tweaks" ''
|
||||
NETDEV=$(${pkgs.iproute2}/bin/ip -o route get 1.1.1.1 | ${pkgs.coreutils}/bin/cut -f 5 -d " ")
|
||||
${pkgs.ethtool}/bin/ethtool -K "$NETDEV" rx-udp-gro-forwarding on rx-gro-list off
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue