WireGuard: Difference between revisions

m Fix broken link format in the wg-quick section
Voklen (talk | contribs)
Include specifying the external interface in the proxy setup.
 
Line 201: Line 201:
== Proxy server setup ==
== Proxy server setup ==


Same as peer setup, skip the endpoint option, with the following
To route your internet traffic through the server, first check the name of your active network interface. This can be done through running this command:
addition:
<pre>
ip route get 9.9.9.9
</pre>
and the result should be something similar to:
<pre>
9.9.9.9 via 192.168.1.1 dev enp2s0 src 192.168.1.35 uid 0
</pre>
The item after <code>dev</code> is your active interface, in this case <code>enp2s0</code>.
 
After that, set up WireGuard the same way as the [[#Peer_setup|peer setup]], except do not include the <code>Endpoint</code> option. Then, add the following options to your configuration, using the active network interface you previously found for <code>externalInterface</code>:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 209: Line 218:
     enable = true;
     enable = true;
     enableIPv6 = true;
     enableIPv6 = true;
     externalInterface = "ens6";
     externalInterface = "enp2s0";
     internalInterfaces = [ "wg0" ];
     internalInterfaces = [ "wg0" ];
   };
   };