WireGuard client setup guide

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking
Author Message
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12813
Location: Netherlands

PostPosted: Fri May 01, 2020 15:52    Post subject: WireGuard client setup guide Reply with quote
WireGuard client setup guide

Note: you can only see and download the guide if you are logged in!

This guide covers the setup of a WireGuard client to a WireGuard VPN Provider, e.g. to one of the commercial VPN providers.

Set up of WireGuard as a server(i.e. for connecting to your home from outside) is covered here: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=322206.

Advanced WireGuard setup: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787

WireGuard is an open-source VPN solution written in C by Jason Donenfeld and others, aiming to fix many of the problems that have plagued other modern server-to-server VPN offerings like IPSec/IKEv2, OpenVPN, or L2TP.
It can be seen as a replacement for OpenVPN although it does not have the versatility, possibilities and track record of OpenVPN.
However, it has two advantages over OpenVPN, it is much faster especially on lower-spec hardware such as Soho routers (my own R7800 goes from 85 Mb/s on OpenVPN to 270 Mb/s with WireGuard) and is easy to setup if you know how, the guides will help you with that.

Some key points about WireGuard:
• Layer 3 only no bridging
• UDP only punches through firewall
• Like SSH authenticated keys
• Executes in Linux Kernel
• Static routing

What makes it so much faster then OpenVPN is not the cryptography, this is more or less the same (use of PKI to calculate/exchange a key with PFS for symmetric encryption). It is the fact that all is done in Kernel space while OpenVPN has to constantly switch between User and Kernel space.
Inherently the executing in Kernel space is less secure, if security is broken than you are compromised big time.
Another disadvantage is that it only supports static routing, so if you use WireGuard to connect to a commercial VPN provider they keep track of your IP address.
A lot of VPN providers are taking measure to mitigate this by using double NAT or special no log servers ( https://www.azirevpn.com/docs/security ) but be sure to look into it.

To work with this guide you need a DDWRT build of 52054 or higher.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sat Jan 27, 2024 9:32; edited 86 times in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12813
Location: Netherlands

PostPosted: Fri May 01, 2020 15:53    Post subject: WireGuard Watchdog script Reply with quote
Modern builds have a watchdog built-in so no need to use the script!

Attached a WireGuard watchdog script which will restart WireGuard or reboot the router if the connection is lost.

WireGuard has robust roaming (from client and server side) so normally you should not need this at all.

There could be special circumstances (e.g.: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=326767&postdays=0&postorder=asc&start=0 ) where it could be useful.

You need permanent storage e.g. jffs/usb to use the script.

Setup instructions are in the script.

Note: you can only see and download the guide if you are logged in

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sun Apr 10, 2022 10:51; edited 5 times in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12813
Location: Netherlands

PostPosted: Fri May 01, 2020 15:54    Post subject: Reply with quote
for future use
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum