How to allow OpenVPN client internet access not thru VPN?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
Rocketboy235
DD-WRT User


Joined: 14 Oct 2016
Posts: 109
Location: United States

PostPosted: Fri Aug 27, 2021 5:28    Post subject: How to allow OpenVPN client internet access not thru VPN? Reply with quote
Hello,

So I am currently running an OpenVPN server on my EA8500 DD-WRT router with the latest August 25, 2021 build and I recently have some trouble trying to have client devices that connect to the OpenVPN server on the router not have it's internet rerouted through the VPN. Client device is a n iPhone with iOS 14.

Currently, when I connect to the VPN, I only do that to access the local devices on the network and have no need to use the VPN internet. However, it seems that the VPN server is trying to reroute my internet requests through the VPN when I want it to just bypass that and use the cellular network only. I'm not sure if I need to do some special configuration but this wasn't a problem before until several months back so I'm not sure.

Would anyone here have an idea what's going on exactly?

Thanks in advance!

_________________
DD-WRT Router Arsenal:

Linksys EA8500 - BS 47256 (previously r46446)
TP Link TL-WR1043ND v1.8 - BS 42819 (previously r45955)
Motorola WR850G v3 - BS 21286
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Fri Aug 27, 2021 5:46    Post subject: Reply with quote
On the OpenVPN server do not enable Redirect Default Gateway.
Instead only push the local route to the client.
i.e if the local subnet of your router is 192.168.1.0/24 then add in the OpenVPN server additional config:

Code:
push "route 192.168.1.0 255.255.255.0 vpn_gateway"


See https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1157344 ,OpenVPN Server setup guide page 19

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


Joined: 14 Oct 2016
Posts: 109
Location: United States

PostPosted: Sat Aug 28, 2021 17:10    Post subject: Reply with quote
Thank you, egc!

So the settings I had configured was basically what you mentioned though I did not have word vpn_gateway included (worked without it in the past) so I added that. After reading page 19, I realized I had the push dhcp-option for my local router DNS in the configuration so I removed that and that seemed to fix my issue. Interesting that I was able to get it working previously with that incorrect configuration.

_________________
DD-WRT Router Arsenal:

Linksys EA8500 - BS 47256 (previously r46446)
TP Link TL-WR1043ND v1.8 - BS 42819 (previously r45955)
Motorola WR850G v3 - BS 21286
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sat Aug 28, 2021 17:16    Post subject: Reply with quote
Glad you solved it.

vpn_gateway is the default so you can omit it, I find it useful as then I know what I am doing 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