Wireguard client Tunnel on secondary router with WAN disable

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


Joined: 24 Sep 2023
Posts: 3

PostPosted: Sun Sep 24, 2023 1:52    Post subject: Wireguard client Tunnel on secondary router with WAN disable Reply with quote
Hello all,

I set up a Wireguard client tunnel with a commercial vpn on a secondary router following this link:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=319319.
This worked perfectly fine when my router's WAN connection type was set to Automatic DHCP. Now I changed my WAN connection type to disabled for other reasons but the Wireguard client does not work anymore.

I was reading here and there that I needed to add the following rules but no luck:
Code:

iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)   
route add -host $(nvram get oet1_rem0) gw $(nvram get lan_gateway) dev $(get_wanface)


I am running DD-WRT v3.0-r53469 std (09/08/23).

Any pointers would be highly appreciated.
Thanks!
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12770
Location: Netherlands

PostPosted: Sun Sep 24, 2023 7:09    Post subject: Reply with quote
That thread you are referring to is outdated.

Current setup guides see https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=327397 which is a sticky in this forum.

It looks like you want to setup a WG client on a Wireless Access Point aka dumb AP, information regarding that is in the Advanced setup guide

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


Joined: 24 Sep 2023
Posts: 3

PostPosted: Sun Sep 24, 2023 20:34    Post subject: Reply with quote
Thanks a lot! I followed the Client on the WAP section in the Advanced setup guide and I believe I got it working!

The one thing I would want to change is the DNS which is now using the one from my primary router (xfinity router). Would there be any ways to change the DNS when using the Wireguard tunnel?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12770
Location: Netherlands

PostPosted: Mon Sep 25, 2023 7:59    Post subject: Reply with quote
The WireGuard setup page has a DNS box, the DNS server(s) you enter there will be used when the tunnel is active.
(There is even Split DNS in case you are using PBR, see the Client setup guide)

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


Joined: 24 Sep 2023
Posts: 3

PostPosted: Mon Oct 02, 2023 17:04    Post subject: Reply with quote
Thanks a lot! I saw that DNS box in the Wireguard setup page but that did not work. I ended up unbridging wl0 and wl1 and forcing a DNS server from there.
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