wireguard network rewiring fix

This commit is contained in:
Danilo Reyes 2024-11-06 02:58:05 -06:00
parent 9273958e64
commit c5155d3117

View File

@ -22,10 +22,10 @@ in
ips = [ "10.100.0.1/24" ]; ips = [ "10.100.0.1/24" ];
listenPort = port; listenPort = port;
postSetup = '' postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o enp2s0 -j MASQUERADE
''; '';
postShutdown = '' postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o enp2s0 -j MASQUERADE
''; '';
privateKeyFile = config.sops.secrets."wireguard/private".path; privateKeyFile = config.sops.secrets."wireguard/private".path;
peers = [ peers = [