diff --git a/modules/networking.nix b/modules/networking.nix index bbf029d..e164467 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -let wireguard_port = "51902"; +let wireguard_port = "1194"; in { # Set hostname, hostid and enable WiFi @@ -103,12 +103,12 @@ in { ]; # Allow wireguard traffic extraCommands = '' - ip46tables -t raw -I nixos-fw-rpfilter -p udp -m udp --sport ${wireguard_port} -j RETURN - ip46tables -t raw -I nixos-fw-rpfilter -p udp -m udp --dport ${wireguard_port} -j RETURN + iptables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport ${wireguard_port} -j RETURN + iptables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport ${wireguard_port} -j RETURN ''; extraStopCommands = '' - ip46tables -t raw -D nixos-fw-rpfilter -p udp -m udp --sport ${wireguard_port} -j RETURN || true - ip46tables -t raw -D nixos-fw-rpfilter -p udp -m udp --dport ${wireguard_port} -j RETURN || true + iptables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport ${wireguard_port} -j RETURN || true + iptables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport ${wireguard_port} -j RETURN || true ''; }; }