[SOLVED]Help With Wireguard

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
bobthesponge
DD-WRT Novice


Joined: 10 Jul 2021
Posts: 8

PostPosted: Tue Aug 03, 2021 14:08    Post subject: [SOLVED]Help With Wireguard Reply with quote
Hi dd-wrt fellows,

I'm trying to setup wireguard on my router but having an issue that handshake request doesn't get any response back from the server if I try to enable VPN from my mobile via using mobile internet.
Handshake request does work if phone is connected via router's wifi.

Current working build: r47074.
My last working build: r43028.

followed https://wiki.dd-wrt.com/wiki/index.php/Wireguard

using pretty much default settings (no extra firewall rules, etc.) + the following configs:
- Endpiont Address = myDdnsDomain
- Use Pre-shared key = enabled
- Persistent Keepalive = 20

# iptables -t nat -v -n -L
Chain POSTROUTING (policy ACCEPT 18 packets, 2891 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- * oet1 0.0.0.0/0 0.0.0.0/0 to:myTunnelIp/28.1
32 6420 SNAT all -- * vlan2 myRouterIp/24 0.0.0.0/0 to:myWanIp
0 0 SNAT all -- * vlan2 myTunnelIp.0/28 0.0.0.0/0 to:myWanIp


at the moment there is only one tunnel and one client.

any help would be very much appreciated.

Thanks
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12781
Location: Netherlands

PostPosted: Tue Aug 03, 2021 14:26    Post subject: Reply with quote
To get the best out of DDWRT and the forum read the forum guidelines with helpful pointers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

These questions can better be asked in the Advanced Networking Forum (again see guidelines)

The WireGuard documentation is a sticky in the Advanced Networking Forum:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=327397

Please upgrade to build 47117, if you still have problems ask for assistance.

_________________
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 Tue Aug 03, 2021 14:55; edited 1 time in total
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14056
Location: Texas, USA

PostPosted: Tue Aug 03, 2021 14:52    Post subject: Reply with quote
Split the posts off the other topic and moved both to Advanced Networking. Please refer to forum rules and guidelines regarding supplying ALL applicable information including router model. As @egc stated, please consider upgrading.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
bobthesponge
DD-WRT Novice


Joined: 10 Jul 2021
Posts: 8

PostPosted: Tue Aug 03, 2021 16:07    Post subject: Reply with quote
Bundle of thanks for your replies and sorry about creating a post under wireguard forum.

Currently, I'm using ASUS RT-AC87U.

Some updates:
Noticed one thing (which is strange at least to me) while double checking the wg setup that when I try to connect with mobile internet (mobile as client) then I see a a different listening port as following:
# wg
interface: oet1
public key: <key>
private key: (hidden)
listening port: 51820

peer: <key>
preshared key: (hidden)
endpoint: mobileIp:26226
allowed ips: peerIp/32
latest handshake: 6 seconds ago
transfer: 424 B received, 3.10 KiB sent
persistent keepalive: every 25 seconds

But when I connect the vpn via router wifi I see the correct listening port.


I'm going through Wireguard's client, server and advanced setup guides (PDF documentation) to compare with my setup.

I'll update to the suggested build and share the status. thanks
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12781
Location: Netherlands

PostPosted: Tue Aug 03, 2021 16:19    Post subject: Reply with quote
First update, you have a reasonable fast router and when you are using a preshared key the tunnel does not always start due to a race condition.

This has been corrected.

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


Joined: 10 Jul 2021
Posts: 8

PostPosted: Tue Aug 03, 2021 17:03    Post subject: Reply with quote
Updated to Firmware: DD-WRT v3.0-r47117 std (08/01/21)
but didn't help.

As I'm not a Networking Professional, let me know which info to collect to troubleshoot this further.
bobthesponge
DD-WRT Novice


Joined: 10 Jul 2021
Posts: 8

PostPosted: Tue Aug 03, 2021 20:07    Post subject: Reply with quote
I've managed to fix the issue. it was related to dns configuration.

Thanks a lot to everyone.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12781
Location: Netherlands

PostPosted: Tue Aug 03, 2021 20:10    Post subject: Reply with quote
Glad you solved it 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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    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