Route the traffic of all repeater bridge clients through VPN

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
johnrobpeter
DD-WRT Novice


Joined: 11 Jun 2013
Posts: 12

PostPosted: Sun Jul 04, 2021 19:25    Post subject: Route the traffic of all repeater bridge clients through VPN Reply with quote
Hi, I have an Asus 87U router configured to run in repeater bridge with the same subnetwork as my main router. It's connected through a 2.4Ghz wlan to my first router. Also I have one Virtual vlan for 2.4Ghz and a wlan on 5Ghz. And finally I have wireguard setup and connected to a wireguard server. The question is how do I route all the traffic from all the clients on the wlan and lan through wireguard. Also note that internet access is coming from the first router through the 2.4ghz wlan and I have access to all my resources from the main and secondary routers and a stable connection for wireguard. I am pretty sure that it should be done through IP tables but have no clue how to configure it.
My current bridge assignment is: br0-> eth01, vlan1, vlan2, wl0.1
All I need is the configuration to reroute all my clients' traffic from zone B(see the attachment) through VPN
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Sun Jul 04, 2021 20:35    Post subject: Reply with quote
You have to point your clients to the repeater as gateway.

So your clients shoud have 192.168.54.2 as gateway.

You can use dnsmasq on your primary router to hand out alternate gateways for different clients

In my signature see the WireGuard documenation, in the Advanced setup guide is a paragraph about setting up a WG client on a WAP this is comparable as setting up on a bridge

Have fun 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
johnrobpeter
DD-WRT Novice


Joined: 11 Jun 2013
Posts: 12

PostPosted: Sun Jul 04, 2021 21:11    Post subject: Reply with quote
Hey thanks for a quick reply.

Unfortunately when I change the gateway on clients to point to repeater I end up with no internet connection and tracert shows that I stop on repeater.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Jul 05, 2021 7:09    Post subject: Reply with quote
Check with the guide if you have setup accordingly including the NAT rule and have a functioning wireguard connection.
_________________
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
johnrobpeter
DD-WRT Novice


Joined: 11 Jun 2013
Posts: 12

PostPosted: Mon Jul 05, 2021 7:48    Post subject: Reply with quote
Hey,

I was following the guide and for me the command
```
route add -host $(nvram get oet1_rem0) gw $(nvram get lan_gateway) dev $(get_wanface)

```

fails. get_wanface is empty but my wan is disabled as I get the access through 2.4Ghz wifi
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Jul 05, 2021 9:53    Post subject: Reply with quote
Which means that the guide doesn't cover all scenarios like when using a wireless interface as WAN, perhaps.
_________________
"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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Jul 05, 2021 11:53    Post subject: Reply with quote
kernel-panic69 wrote:
Which means that the guide doesn't cover all scenarios like when using a wireless interface as WAN, perhaps.


True, so no guarantee that the instructions for a WAP work for a repeater bridge but both have no WAN and use br0 as their "gateway".

I am not at home so cannot test.

But you do not need any rule for a WAP provided you have a recent build, which you should be using anyway because of security updates.
Latest as of today is 47000 but check the build threads

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


Joined: 11 Jun 2013
Posts: 12

PostPosted: Mon Jul 05, 2021 12:34    Post subject: Reply with quote
hmm I don't think I am on latest saw that for my asus only this one is available
Firmware: DD-WRT v3.0-r44715 std (11/03/20)
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Jul 05, 2021 12:44    Post subject: Reply with quote
And you are going by the information on the router database. Please do not rely on the router database, it is *not* updated. Click on the image below and read:



Please take a moment to read the forum rules and guidelines as well as all the Announcements and Stickies here and in the Broadcom forum to start. You are not done reading, you never will be done reading and learning when it comes to Linux or DD-WRT.

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/

06-28-2021-r47000

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


Joined: 11 Jun 2013
Posts: 12

PostPosted: Mon Jul 05, 2021 12:55    Post subject: Reply with quote
upgraded to the latest and greatest (Firmware: DD-WRT v3.0-r47000 std (06/28/21)) but still no luck with my VPN story Smile
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon Jul 05, 2021 13:08    Post subject: Reply with quote
Something like this is probably why:

root@TL-WR1043NDv2:~# nvram get_wanface
root@TL-WR1043NDv2:~# $(get_wanface)
-sh: wlan0: not found
root@TL-WR1043NDv2:~#

@egc will have to probably look into this and add amplifying information for non-standard situations such as yours. I don't have an RT-AC87U to tinker with.

_________________
"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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Jul 05, 2021 16:30    Post subject: Reply with quote
Will have a look but can take a while, I am at this moment surfing in South West France, the waves were great today 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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Tue Jul 06, 2021 9:26    Post subject: Reply with quote
Rain today, so did a quick test with the spare router setup as repeater bridge.

WireGuard client on the repeater bridge and laptop pointing to the repeater bridge.

Working without a problem got WG connection to my WG server at home.

Attached the breakdown maybe that will give you some clues what to look for.

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


Joined: 11 Jun 2013
Posts: 12

PostPosted: Tue Jul 06, 2021 9:41    Post subject: Reply with quote
weeeird... thanks a lot for your help I guess I need to factory reset and start all over again will try it following your guide 👍
johnrobpeter
DD-WRT Novice


Joined: 11 Jun 2013
Posts: 12

PostPosted: Tue Jul 06, 2021 12:38    Post subject: Reply with quote
still no luck. Completely reconfigured and still as soon as I enable the WG on router the internet disappears. can't ping my WG server cant ping google ...
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
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