Routing through OpenVPN

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
texhead
DD-WRT Novice


Joined: 21 Sep 2017
Posts: 5

PostPosted: Thu Nov 16, 2017 0:01    Post subject: Routing through OpenVPN Reply with quote
Firstly I would love to learn how DD-WRT handles the networking and the associations between Ethernet, wireless and a VPN.



My setup:

R1. Wireless Modem Router issuing DHCP in 192.168.0.* range connected to cable network.

R2. DD-WRT on ASUS RT-AC68U (Wan to LAN on R1) with OpenVPN configured for ExpressVPN as client and this works for Ethernet and default wireless. DHCP issuing IPs in 192.168.1.* range.





My request:

1. Create second virtual wireless interface that does not go through OpenVPN.

2. Configure 1 or more Eth ports to not go through OpenVPN.



My reasons:

I want all of my network connected through the ASUS router R2 for sharing purposes.

The Hardware in the ASUS is better, especially the wireless.

I have devices that must go through the VPN and I have devices that need to bypass the OpenVPN. Both wireless and Ethernet connected devices.



Your thoughts would be appreciated, if you have any questions please ask.



Thanks
Sponsor
texhead
DD-WRT Novice


Joined: 21 Sep 2017
Posts: 5

PostPosted: Thu Nov 16, 2017 0:07    Post subject: Reply with quote
Sorry realised this should be in the Advanced Networking section.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12923
Location: Netherlands

PostPosted: Thu Nov 16, 2017 9:25    Post subject: Reply with quote
Yes it should be in the Advanced networking forum and perhaps one of the moderators wants to move it.

In the mean time first create an unbridged VAP on your Asus.
See the attached document, in that document there are also references to @mrjcd's excellent guide and to Kong's

If you got that working progress to the next step and that is Policy Based Routing.
With PBR you route clients through the OpenVPN by their IP adresses. For that fill in the IP addresses in the PBR field of the OpenVPN GUI.
Use CIDR notation: https://www.ipaddressguide.com/cidr
e.g if you want to route the single client 192.168.1.89 through the VPN just fill in 192.168.1.89/32 in the PBR field

Oh and disable SFE or use the patched SFE from @Quarksys

Check for IP, DNS and web RTC leak at www.ipleak.net



DDWRT Virtual Access Point Public.doc
 Description:

Download
 Filename:  DDWRT Virtual Access Point Public.doc
 Filesize:  249 KB
 Downloaded:  124 Time(s)


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


Joined: 21 Sep 2017
Posts: 5

PostPosted: Thu Nov 16, 2017 22:12    Post subject: Reply with quote
Thanks ecg,
Yes I have looked at this but I have a couple of questions.
I am not worried about internal security, every device should be able to share files between them.

1. Wouldn't this separate my devices so they wouldn't be able to communicate between them?

2. Is there a way to just use PBR to route packets from existing devices on the original wireless AP?

I want to keep it as simple as possible but it sounds like I have to have a separate subnet to route through the VPN.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12923
Location: Netherlands

PostPosted: Fri Nov 17, 2017 12:59    Post subject: Reply with quote
You must only use a separate subnet if you want the whole subnet routed through the VPN, this can be useful if you have one WIFI through the WAN and then the VAP through the VPN so when you switch wifi, you switch WAN c.q VPN.

But indeed clients can not see each other on different subnets (there are workarounds but not easy ones)

So if you do not want that then do not use unbridged VAPs
But give the clients you want to route through the VPN a static lease on the Services/Services tab and enter that IP address in the PBR field of the VPN client.
This is the easiest method.

And disable SFE otherwise PBR does not work (it is a bug, unfortunately the devs have not found the time to repair it although a patch is available)

_________________
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 -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum