From e5f231d420bc6688e7c6f080401ee81a7a9664b7 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 23 Aug 2026 16:11:16 -0500 Subject: configure udp2raw for wireguard some public wifi networks don't let you initiate connections to remote udp ports. but what about a tcp port? --- hosts/mercury/wireguard.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'hosts/mercury') diff --git a/hosts/mercury/wireguard.nix b/hosts/mercury/wireguard.nix index 1035a0e..1af84c0 100644 --- a/hosts/mercury/wireguard.nix +++ b/hosts/mercury/wireguard.nix @@ -7,11 +7,22 @@ }: { environment.systemPackages = [pkgs.wireguard-tools]; + systemd.services.udp2raw-client = { + description = "udp2raw WireGuard transport"; + wantedBy = ["multi-user.target"]; + after = ["network-online.target"]; + wants = ["network-online.target"]; + serviceConfig = { + ExecStart = "${lib.getExe pkgs.udp2raw} -c -l 127.0.0.1:51820 -r 104.53.197.192:51843 -k shared-secret -a"; + Restart = "on-failure"; + }; + }; + systemd.network.netdevs."10-wg" = { netdevConfig = { Kind = "wireguard"; Name = "wg0"; - MTUBytes = 1200; + MTUBytes = "1200"; }; wireguardConfig = { PrivateKeyFile = config.collinux.secrets."wireguard-privkey".path; @@ -21,7 +32,7 @@ { PublicKey = hosts.ganymede.wg_pubkey; AllowedIPs = ["10.100.0.0/24"]; - Endpoint = "williamsfam.us.com:51820"; + Endpoint = "127.0.0.1:51820"; } ]; }; -- cgit v1.3.1