VPN Client + Remote Tunnel

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


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 14:24    Post subject: VPN Client + Remote Tunnel Reply with quote
This is not really a DD-WRT specific question and I am certain that this question has been asked many times before, but I am not finding the answer and my search queries only turn up non relevant information.

I have DD WRT installed on my main router and have setup WireGuard to be able to tunnel into my local network remotely. I have a static IP through my ISP. I have a paid subscription to a VPN provider and setup a VPN client on DD WRT using OpenVPN client keys. When I enable the VPN client, obviously my WAN IP appears to have changed which then breaks my ability to tunnel in using WireGuard. Is there a way to have the VPN client running and still tunnel in?
Sponsor
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Thu May 19, 2022 15:55    Post subject: Reply with quote
Im not a VPN expert, the expert is egc and his traveling atm, so his reply may take time to come.

In any case post screenshots of the setup pages relevant to both OpenVPN and Wireguard and wait for the real expert to reply.

Also state router model and version plus the DD-WRT version you are running.

Please note current DD-WRT version is 48897 any older versions aren't supported anymore.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)


Last edited by the-joker on Thu May 19, 2022 16:00; edited 1 time in total
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu May 19, 2022 15:59    Post subject: Reply with quote
Sticky: OpenVPN guides and documentation
Sticky: WireGuard guides and documentation
NOTE: Please ensure you are running the current release.

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


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 16:21    Post subject: Reply with quote
The router is a Netgear R7000 and it is running the newest version of DD-WRT available for it (44715). Admittedly that is an old and unsupported version. Both the OpenVPN client and the WireGuard VPN Server are functioning just fine. It is the nature of a starting a client VPN, when connecting to a paid VPN service (in this case IP Vanish), that your WAN will be spoofed to the server you are connecting to.

So makes my WireGuard connection not possible. Example:
Static WAN IP (Not my real one): 12.345.67.89
After starting my VPN client it becomes (again not a real IP):98.765.43.21.
Therefor my WireGuard connection cannot be made. If I am three hours away from my LAN and I fire up my WireGuard client on my laptop, it is trying to connect to: 12.345.67.89, which is being obscured by my routers connection to IPVanish WAN:98.765.43.21.
I am imagining that using a domain name is the solution, so that rather then trying to connect to an IP address, I would be trying to connect to a domain. IE: www.randomexample.com
rlsrlf2013
DD-WRT Novice


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 16:31    Post subject: Reply with quote
It looks like egc mentions this on page 24 of the WireGuard turorial: DDWRT WireGuard Advanced Setup v21.pdf.

Was really hoping not to have to run OpenVPN on individual devices, and simply just let DD-WRT do the heavy lifting.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Thu May 19, 2022 17:05    Post subject: Reply with quote
rlsrlf2013 wrote:
The router is a Netgear R7000 and it is running the newest version of DD-WRT available for it (44715). Admittedly that is an old and unsupported version

This isn't remotely anything near the truth or adjacent to the truth. Its only the truth if you are using the oudated router database to lookup this, and the forums state clearly not to. Its confusing I get it, but no one here has access to the router database or other DD-WRT sites, just literally the forums.

See http://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022/05-18-2022-r48897/

you will need to reset to defaults and upgrade to that build and reconfigure manually.

MANY fixes to VPN related stuff went in and also for wireguard, so anything older is a NO.

Kthx.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
rlsrlf2013
DD-WRT Novice


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 17:11    Post subject: Reply with quote
Interesting. I didn't know that there were newer versions for that router. I just downloaded from the main section of the website after searching by router model. Build 44715 is just what comes up and it says that it was from November of 2020.
rlsrlf2013
DD-WRT Novice


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 17:14    Post subject: Reply with quote
I know that my WireGuard info will get booted out if I upgrade, but are config files from build 44715 compatible with 48897?
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu May 19, 2022 17:16    Post subject: Reply with quote
rlsrlf2013 wrote:
Interesting. I didn't know that there were newer versions for that router. I just downloaded from the main section of the website after searching by router model. Build 44715 is just what comes up and it says that it was from November of 2020.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

See 4.h.

Quote:
DO NOT USE THE ROUTER DATABASE


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


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Thu May 19, 2022 19:23    Post subject: Reply with quote
Whenever you run both a VPN server and client on the same router, this can prove problematic if the router itself is bound to the VPN client. Any attempt to reach the VPN server over the WAN will have its replies routed over the VPN client! And that's a violation of RPF (reverse-path filtering). The router will block it!

There are many solutions, but the most common is to enable PBR on the VPN client, which typically removes the router itself from the VPN client, thus making the router's services (including the VPN server) accessible again over the WAN.

Another solution is to use static routes to bind the public IP of your remote clients to the VPN server, to the WAN. Of course, this assumes those public IPs are predictable (workplace, vacation home, favorite wifi cafe, etc.). For situations of true roaming, it's usually impractical.

Then there's always my remote access script.

https://pastebin.com/gnxtZuqg

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Thu May 19, 2022 20:40    Post subject: Reply with quote
rlsrlf2013 wrote:
Interesting. I didn't know that there were newer versions for that router. I just downloaded from the main section of the website after searching by router model. Build 44715 is just what comes up and it says that it was from November of 2020.

The router database builds are not to be used. Please ignore those builds.

The current builds are http://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022

And note that your old build now over two years old, both security issues and does not have the current wireguard code.

You will also need to do a nvram reset and reconfigure from scrach to run the current builds without issues.

Regarding current settings you cannot restore an old backup to current version, you can but it will cause issues.

Running nvram show > /tmp/backup-human-readable.txt via terminal, then grab that file to your desktop via scp of sftp, it will have all your current settings in a human readable format for later consultation.

You can also, take screenshots of your setup pages or print them to pdf which should contain text to be able to copy and paste after the fact.

The reconfigure after upgrade and nvram reset

Current build is 05-18-2022-r48897

Anything else is unsupported and wont work properly tunneling wise since like I already said, many many many fixes to tunneling went in since then.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
rlsrlf2013
DD-WRT Novice


Joined: 19 May 2022
Posts: 11

PostPosted: Thu May 19, 2022 22:07    Post subject: Reply with quote
So I upgraded to 48897 and reconfigured everything. I think eibgrad's response is what I was expecting to hear. Even with DDNS enabled and the endpoint set as a DDNS domain name, the WireGuard VPN will only work when my VPN client is disabled. I was really hoping to avoid a two router setup is all. It kills my connection speeds.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Thu May 19, 2022 23:50    Post subject: Reply with quote
Now you're running a modern build wait for egc, hes the tunneling expert, I'm pretty sure, there's something being missed here.

Im still waiting for the screenshots of your setup to all applicable pages, egc will need them, in fact anyone will need them to help spot any issues.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Fri May 20, 2022 1:16    Post subject: Reply with quote
rlsrlf2013 wrote:
So I upgraded to 48897 and reconfigured everything. I think eibgrad's response is what I was expecting to hear. Even with DDNS enabled and the endpoint set as a DDNS domain name, the WireGuard VPN will only work when my VPN client is disabled. I was really hoping to avoid a two router setup is all. It kills my connection speeds.


I provided solutions that do NOT require a two router setup. As I said, using PBR w/ the VPN client will solve the problem, even if you have to route the entire local network over the VPN (e.g., 192.168.1.0/24). You're just doing this to get the router itself OFF the VPN client.

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
rlsrlf2013
DD-WRT Novice


Joined: 19 May 2022
Posts: 11

PostPosted: Fri May 20, 2022 2:33    Post subject: Reply with quote
eibgrad I did see that you offered a few single router options. I am not very familiar with split tunneling (pbr?) even outside of router based setups. Do you have a link to a set of instructions? I have gone down that path and it has only lead me to failure so far.
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