WireGuard Tunnel: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
=== Configure the client route ===
 
{{Warn|Be very careful doing this if you have no offline access to the client! If something is configured incorrectly, this has a chance of killing the client's internet connection until it is fixed.}}
 
Now, all you need to do is configure WireGuard on the client to route all traffic through the server. You do this by configuring the <code>[Peer]</code> section on the client to have an <code>AllowedIPs</code> value of <code>0.0.0.0/0</code>. For example:
sudo systemctl restart wg-quick@wg0
}}
 
{{Info|If you were connected to the client via SSH, your connection will probably drop out here, as the client is now routing all of its traffic through the server and is not using its public IP for anything other than connecting to the tunnel. To reconnect to the client, you can use <code>ssh 10.0.32.2</code> from the server or another client on the tunnel. Read below for how to forward this port to the server's public IP.}}
 
If all went well, all traffic on the client should now be routed through the server:

Navigation menu