aboutsummaryrefslogtreecommitdiff
path: root/hosts/ganymede/wireguard.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-08-23 16:11:16 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-08-23 16:11:24 -0500
commite5f231d420bc6688e7c6f080401ee81a7a9664b7 (patch)
treee1c9080bc4c39b3cf347852c8c605ea5b2adb89a /hosts/ganymede/wireguard.nix
parenta9a621755213155d46c07370a90d8e40dbb2675f (diff)
configure udp2raw for wireguardHEADmain
some public wifi networks don't let you initiate connections to remote udp ports. but what about a tcp port?
Diffstat (limited to 'hosts/ganymede/wireguard.nix')
-rw-r--r--hosts/ganymede/wireguard.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/hosts/ganymede/wireguard.nix b/hosts/ganymede/wireguard.nix
index 27d50bb..6e6ae05 100644
--- a/hosts/ganymede/wireguard.nix
+++ b/hosts/ganymede/wireguard.nix
@@ -11,15 +11,31 @@
networking.firewall = {
allowedUDPPorts = [51820];
+ allowedTCPPorts = [51843];
trustedInterfaces = ["wg0"];
};
+ systemd.services.udp2raw-server = {
+ description = "udp2raw WireGuard transport";
+
+ wantedBy = ["multi-user.target"];
+ after = ["network-online.target"];
+ wants = ["network-online.target"];
+
+ serviceConfig = {
+ ExecStart = "${lib.getExe pkgs.udp2raw} -s -l 0.0.0.0:51843 -r 127.0.0.1:51820 -k shared-secret -a";
+
+ Restart = "on-failure";
+ RestartSec = "2s";
+ };
+ };
+
systemd.network.netdevs."50-wg0" = {
netdevConfig = {
Kind = "wireguard";
Name = "wg0";
- MTUBytes = 1200;
+ MTUBytes = "1200";
};
wireguardConfig = {