WireGuard: Difference between revisions

imported>Sjau
No edit summary
imported>Sjau
added masquerading
Line 22: Line 22:
   # Ensure IP forwarding is enabled.
   # Ensure IP forwarding is enabled.
   boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
   boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
  # Add a masquerade rule to iptables so the peers can talk to one another
  networking.firewall.extraCommands = ''
    iptables -t nat -A POSTROUTING -s10.100.0.0/32 -j MASQUERADE
  '';


   networking.wireguard.interfaces = {
   networking.wireguard.interfaces = {