WireGuard: Difference between revisions

m Added a peer name option to a code example, as suggested by a comment in the same example.
Server setup: Change systemd-networkd networkConfig from deprecated IPForwarding option to new IPv4/IPv6Forwarding
Line 311: Line 311:
===Server setup===
===Server setup===


<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
{
{
   config,
   config,
Line 347: Line 347:
       networkConfig = {
       networkConfig = {
         IPMasquerade = "ipv4";
         IPMasquerade = "ipv4";
         IPForward = true;
         IPv4Forwarding = true; # if using IPv4
        IPv6Forwarding = false; # if using IPv6, but above we don't use IPv6
       };
       };
     };
     };
   };
   };
}
}
</syntaxHighlight>
</syntaxhighlight>


===Client setup===
===Client setup===