[SOLVED]Bridging problem with OpenVpn tunnel

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


Joined: 03 Dec 2021
Posts: 58

PostPosted: Mon Dec 27, 2021 13:26    Post subject: [SOLVED]Bridging problem with OpenVpn tunnel Reply with quote
Hello everyone, the firmware version I am using is r47853, and I am connected to the OpenVpn channel. Now there is a demand, I don't know how to achieve it:

I have 3 wireless SSIDs, namely dd-1, dd-2, and dd-3. My requirement is that dd-1 and dd-2 go directly through the WAN channel, and dd-3 goes through the OpenVpn channel.

I have read the help file of openvpn, but my English level is not very good, so I didn't understand how to set it up. Can anyone tell me the setup steps in detail, or the detailed command line。


Last edited by zhuli66 on Sat Jan 15, 2022 14:09; edited 3 times in total
Sponsor
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Mon Dec 27, 2021 13:37    Post subject: Re: Policy routing problem in OpenVpn channel Reply with quote
As shown in the screenshot, is it set here, but I don’t understand how to set it.

[/img]
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Mon Dec 27, 2021 14:53    Post subject: Reply with quote
I have transferred this thread to the Advanced networking forum where it can better be dealt with.

Have a look at the OpenVPN Client setup guide under Policy Based routing.

Links in my signature at the bottom of this post

_________________
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
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Tue Dec 28, 2021 13:00    Post subject: Reply with quote
egc wrote:
I have transferred this thread to the Advanced networking forum where it can better be dealt with.

Have a look at the OpenVPN Client setup guide under Policy Based routing.

Links in my signature at the bottom of this post




How to set unbridged VAP? I do not know.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Tue Dec 28, 2021 13:37    Post subject: Reply with quote
https://wiki.dd-wrt.com/wiki/index.php/Guest_WiFi_+_abuse_control_for_beginners

Also See attachment

_________________
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
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Tue Dec 28, 2021 14:49    Post subject: Reply with quote
egc wrote:
https://wiki.dd-wrt.com/wiki/index.php/Guest_WiFi_+_abuse_control_for_beginners

Also See attachment





According to the document you gave, I have built an unbridged VAP.

Next, I want to set that only this VAP can use the OpenVpn channel, and other APs use the WAN channel. What should I do?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Tue Dec 28, 2021 17:01    Post subject: Reply with quote
Have a look at the OpenVPN Client setup guide under Policy Based routing.

Links in my signature at the bottom of this post

_________________
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
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Wed Dec 29, 2021 13:39    Post subject: Reply with quote
egc wrote:
Have a look at the OpenVPN Client setup guide under Policy Based routing.

Links in my signature at the bottom of this post


My firmware is r47853. I read the document link you signed and set it up but it didn't work. Let me talk about the situation below. The IP range set by my two APs is 192.168.8.1/24, and the IP range set by the VAP is 192.168.9.1/24. Then I set the PBR in OpenVpn as shown in the screenshot below:


After I set it up and restarted, the two APs and VAPs still use the VPN tunnel. And I need two APs to go directly through the WAN channel. Do other settings need to be made for it to take effect?
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Thu Dec 30, 2021 7:18    Post subject: Reply with quote
Who knows, let's talk about it。
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Thu Dec 30, 2021 8:26    Post subject: Reply with quote
That is how it works on my router Smile

My main subnet is 192.168.13.1/24
My VAP is 192.168.14.1/24

Only when connected to my VAP I use the VPN

I check with: ipleak.net

Also you can check the routing as outlined in the guide:
Quote:
root@EA6900:~# ip route show
default via 192.168.0.1 dev vlan2
5.152.213.186 via 192.168.0.1 dev vlan2
10.200.0.1 via 10.200.0.45 dev tun1
10.200.0.45 dev tun1 scope link src 10.200.0.46
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev vlan2 scope link src 192.168.0.13
192.168.13.0/24 dev br0 scope link src 192.168.13.1
192.168.14.0/24 dev wl0.1 scope link src 192.168.14.1
root@EA6900:~# ip route show table 10
0.0.0.0/1 via 10.200.0.45 dev tun1
default via 192.168.0.1 dev vlan2
5.152.213.186 via 192.168.0.1 dev vlan2
10.200.0.1 via 10.200.0.45 dev tun1
10.200.0.45 dev tun1 scope link src 10.200.0.46
127.0.0.0/8 dev lo scope link
128.0.0.0/1 via 10.200.0.45 dev tun1
192.168.0.0/24 dev vlan2 scope link src 192.168.0.13
192.168.13.0/24 dev br0 scope link src 192.168.13.1
192.168.14.0/24 dev wl0.1 scope link src 192.168.14.1
root@EA6900:~# ip rule show
0: from all lookup local
32765: from 192.168.14.1/24 lookup 10
32766: from all lookup main
32767: from all lookup default
root@EA6900:~#

_________________
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: Thu Dec 30, 2021 11:16    Post subject: Reply with quote
I do not know what the VAP interface is in your case (ifconfig) but in my case it is wl0.1

So instead of 192.168.14.1/24, I can also use in the PBR box:
Code:
iif wl0.1


Code:
root@EA6900:~# ip rule show
0:      from all lookup local
32765:  from all iif wl0.1 lookup 10
32766:  from all lookup main
32767:  from all lookup default

_________________
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
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Thu Dec 30, 2021 14:49    Post subject: Reply with quote
egc wrote:
I do not know what the VAP interface is in your case (ifconfig) but in my case it is wl0.1

So instead of 192.168.14.1/24, I can also use in the PBR box:
Code:
iif wl0.1


Code:
root@EA6900:~# ip rule show
0:      from all lookup local
32765:  from all iif wl0.1 lookup 10
32766:  from all lookup main
32767:  from all lookup default



My VAP interface is wlan0.1, after replacing the example you gave, it looks like this, right:
iif wlan0.1
root@linksys1900:~# ip rule show
0: from all lookup local
32765: from all iif wlan0.1 lookup 10
32766: from all lookup main
32767: from all lookup default

Then, I filled in the above code in the PBR box, but it is still invalid, all network segments are through VPN tunnels.
I filled in the position of the screenshot below:
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Thu Dec 30, 2021 15:32    Post subject: Reply with quote
Well that is not quite right.

I am awfully sorry but I do not seem to be able to explain things to you.

I cannot explain it any better then as outlined in the guide, also there is written what you should do to check.

Excerpt from the 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
zhuli66
DD-WRT User


Joined: 03 Dec 2021
Posts: 58

PostPosted: Sat Jan 01, 2022 11:56    Post subject: Reply with quote
egc wrote:
Well that is not quite right.

I am awfully sorry but I do not seem to be able to explain things to you.

I cannot explain it any better then as outlined in the guide, also there is written what you should do to check.

Excerpt from the guide:


In my opinion, it should be outside of PBR, and I have to set other items to take effect.

It's just that my English is not very good. I read the guide with translation software, so I didn't understand it,Where did i go wrong。
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Sat Jan 01, 2022 14:31    Post subject: Reply with quote
I am fluent in many languages but the only Chinese word I know are "ni hao"

So we have to do with my "English"

I tried to explain things some more but that is all I can do.

If it does not work as you want then check with the commands as described

The routing tables, ip rules etc. will show what is really happening.

_________________
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
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