Idiot's Guide to Configuring Wireguard - Client Tunnel

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
tembares
DD-WRT Novice


Joined: 10 Jul 2012
Posts: 28
Location: Sint Maarten, D.W.I

PostPosted: Wed Apr 01, 2020 20:20    Post subject: No WIREGUARD connection with TUNSAFE as client Reply with quote
Good day,

Again, thank you for the script. I only found this page and that one from IVPN to use a WireGuard connection as client for our DD-WRT router.

That is why I tried both manuals to (try to) connect with TUNSAFE.

To get my private key, I execute 'wg showconf oet1'. I highlighted the PRIVATE KEY.

At tunsafe.com I used the file configurator, using 'custom key pair', where I entered my private key.

As a result I downloaded the configuration file, containing:
Code:
[Interface]
PrivateKey = YE...A=
Address = 10.239.140.13/8
DNS = 1.1.1.1

[Peer]
PublicKey = FO...M=
Endpoint = 190.2.141.162:51840
AllowedIPs = 0.0.0.0/0


I used the information above to fill in the SETUP-TUNNELS page (see attachment).
After, I copy/paste the scripts in the ADMINSTRATION-COMMANDS page (see attachment).
Because, this didn't work, I tried also the IVPN one.

Remarkable between 'your' and 'IVPN' instructions are, that they use the DNS-address. In the configuration file DNS is set to 1.1.1.1, but you instructed not to use it.

I do not get an internet connection to or from TUNSAFE. In fact, I do not know what the cause is Crying or Very sad

I can follow instructions, but I am not a specialist in solving this issue. Can someone help me?

Thank you in advance![/code]
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Wed Apr 01, 2020 21:22    Post subject: Reply with quote
Look at the wireguard setup guide, see my signature at the bottom of this post for some general information, it is not specifical for this case but might help
_________________
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
Hellakenut
DD-WRT Novice


Joined: 22 Mar 2019
Posts: 27
Location: Gamma Quadrant

PostPosted: Fri Apr 03, 2020 7:45    Post subject: Reply with quote
As egc suggested, try his Wireguard script provided in his client setup guide. I'm currently working on a better version of the script provided in my guide, however I haven't had a lot of time to test it out because my husband has been working from home due to the *current* state of the world right now. Laughing

I'm not personally familiar with TunSafe as a VPN service, however it is not necessary to include the output of the configuration file in the script itself. The config file is meant to give you the info to plug into the boxes within the DD-WRT "Tunnels" tab when Wireguard is selected as the protocol.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Fri Apr 03, 2020 8:27    Post subject: Reply with quote
I am currently working on an update for the WireGuard GUI in DDWRT to add buttons to route the allowed IP's and a button to NAT out via the tunnel in this way you do not need any script.

Will be ready next week, but it is up to the main developer if and when it will be implemented.

I have it running on my routers and it works very good Smile

_________________
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
Hellakenut
DD-WRT Novice


Joined: 22 Mar 2019
Posts: 27
Location: Gamma Quadrant

PostPosted: Fri Apr 03, 2020 8:39    Post subject: Reply with quote
Ayyy, this is what I like to hear! Very Happy I just recently looked up the change logs for newer releases of DD-WRT builds and didn't see anything mentioned for Wireguard's GUI that would fix the need for a corrective script. It's been a year now since I made this guide so I haven't bothered upgrading my build unless it would improve Wireguard's support.

I really hope your additions are approved!
tembares
DD-WRT Novice


Joined: 10 Jul 2012
Posts: 28
Location: Sint Maarten, D.W.I

PostPosted: Sat Apr 04, 2020 12:17    Post subject: Reply with quote
egc wrote:
I am currently working on an update for the WireGuard GUI in DDWRT to add buttons to route the allowed IP's and a button to NAT out via the tunnel in this way you do not need any script.

Will be ready next week, but it is up to the main developer if and when it will be implemented.

I have it running on my routers and it works very good Smile


Thank you for working on the addition. If you like somebody to test and to make it dummy-proof, I look forward to help you with that.

I followed your instructions, unfortunately it didn't work for me, yet.

_________________
Netgear R6700v3 (from MAR2020) - Firmware: DD-WRT v3.0-r42819 std (03/30/20)
JulianAntras
DD-WRT Novice


Joined: 18 Mar 2015
Posts: 30

PostPosted: Sat Apr 04, 2020 16:32    Post subject: Reply with quote
AzireVPN dont have an option to submit the Local Public Key before generate the file xxxx.conf
And in the gui of the ddwrt dont let-me change the Local Public Key to my own.

So there is any way to work with ddwrt changing the Local Public Key in the ddwrt?

Or anyone knows how to configure with AzireVPN?

Code:

[Interface]
PrivateKey = UKxxxxxxxxxxxxxxxxxxxxxxxxxEU=
Address = 12.2.1.128/19, 220e:1c22:4:2000::122/64
DNS = 12.222.22.2, 2002:22c:22ec:1337::2

[Peer]
PublicKey = vtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEM=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = nl1.wg.azirevpn.net:443
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Sat Apr 04, 2020 17:09    Post subject: Reply with quote
Have a look at the guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135

You can set keys with nvram variables

_________________
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
JulianAntras
DD-WRT Novice


Joined: 18 Mar 2015
Posts: 30

PostPosted: Sat Apr 04, 2020 17:22    Post subject: Reply with quote
egc wrote:
Have a look at the guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135

You can set keys with nvram variables


Didn't find anything about changing the public key, can you help-me?

Best Regards
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Mon Apr 06, 2020 9:26    Post subject: Reply with quote
JulianAntras wrote:
egc wrote:
Have a look at the guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135

You can set keys with nvram variables


Didn't find anything about changing the public key, can you help-me?

Best Regards

Changing public key should not be necessary, you are using your private key and the other side already knows your public key.
you can always view your public key with (from CLI/SSH/telnet): wg

_________________
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
JulianAntras
DD-WRT Novice


Joined: 18 Mar 2015
Posts: 30

PostPosted: Mon Apr 06, 2020 10:10    Post subject: Reply with quote
AzireVPN dont have a local to introduze my public key that ddwrt generate, only i can download a file that works ok in windows, and android.

The file contains:
Code:
[Interface]
PrivateKey = UKxxxxxxxxxxxxxxxxxxxxxxxxxEU=
Address = 12.2.1.128/19, 220e:1c22:4:2000::122/64
DNS = 12.222.22.2, 2002:22c:22ec:1337::2

[Peer]
PublicKey = vtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEM=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = nl1.wg.azirevpn.net:443



But ddwrt have is own public key, so i think this is a problem i already check other manuals like strongvpn they have in the website a field to introduce the ddwrt public key before generate the file.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Mon Apr 06, 2020 10:20    Post subject: Reply with quote
JulianAntras wrote:
AzireVPN dont have a local to introduze my public key that ddwrt generate, only i can download a file that works ok in windows, and android.

The file contains:
Code:
[Interface]
PrivateKey = UKxxxxxxxxxxxxxxxxxxxxxxxxxEU=
Address = 12.2.1.128/19, 220e:1c22:4:2000::122/64
DNS = 12.222.22.2, 2002:22c:22ec:1337::2

[Peer]
PublicKey = vtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEM=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = nl1.wg.azirevpn.net:443



But ddwrt have is own public key, so i think this is a problem i already check other manuals like strongvpn they have in the website a field to introduce the ddwrt public key before generate the file.


if I understand you correctly they give you a private key to use.

So just fill in the private key in DDWRT

_________________
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
JulianAntras
DD-WRT Novice


Joined: 18 Mar 2015
Posts: 30

PostPosted: Mon Apr 06, 2020 10:30    Post subject: Reply with quote
And i dont need to chenge the public key in the ddwrt for that is on the file?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Mon Apr 06, 2020 10:33    Post subject: Reply with quote
I do not see a public key for DDWRT in the file, have you looked in the setup guide (in my signature at the bottom of this post) about basic setup of WireGuard?
_________________
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
JulianAntras
DD-WRT Novice


Joined: 18 Mar 2015
Posts: 30

PostPosted: Mon Apr 06, 2020 10:36    Post subject: Reply with quote
This is the file i use one android and windows and have a public key look.

Quote:
[Interface]
PrivateKey = UKxxxxxxxxxxxxxxxxxxxxxxxxxEU=
Address = 12.2.1.128/19, 220e:1c22:4:2000::122/64
DNS = 12.222.22.2, 2002:22c:22ec:1337::2

[Peer]
PublicKey = vtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEM=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = nl1.wg.azirevpn.net:443
Goto page Previous  1, 2, 3, 4, 5, 6  Next Display posts from previous:    Page 4 of 6
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