Route home VPN server internet traffic through PIA and maintain LAN Access?

This forum is for general conversation and user-user networking.
brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Wed Apr 05, 2017 2:35 pm

Hello. I would like for my phone to stay connected to my home LAN through an OpenVPN server connection hosted by my home DD-WRT router. This would give me constant access to my network attached storage. Through the established VPN server tunnel, I would also like to surf the internet from my home router through the Private Internet Access client that is running on it. I realize this will create some latency issues, but I would like to set this up. I have been successful with setting up the OpenVPN server and Private Internet Access client on my router, but I am still having issues. I can currently access my network attached storage via the OpenVPN server tunnel (running on my DD-WRT router), however, as soon as I route through Private Internet Access I lose the ability to connect to my network attached storage. Please help.
Using OpenVPN community edition.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2113
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby TinCanTech » Wed Apr 05, 2017 2:46 pm

Google "policy based routing"

brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Wed Apr 05, 2017 4:48 pm

Thanks for your response TinCanTech. I have policy based routing enabled on the VPN client portion of the DD-WRT router. I use that to control (by IP address) which of my devices are going through the tunnel to Private Internet Access servers. Is that what you are referring to? I can get my home VPN server clients into the Private Internet Access tunnel using policy based routing, but when I do I lose access to my local area network devices.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2113
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby TinCanTech » Wed Apr 05, 2017 5:12 pm

There are even examples documented on this forum.

Google "site:forums.openvpn.net policy based routing"

brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Thu Apr 06, 2017 11:36 am

Thanks again TinCanTech. WIth your help I can definitely tell I am getting closer to resolving my issue. I spent yesterday evening, and this morning since 3AM, searching "openvpn.net policy based routing." I have tried a few things but am still not having any luck. I will either have access to my LAN devices, or have internet access via Private Internet Access VPN, but I can not accomplish both.

It seems that I am going to have to adjust iptable rules by marking packets and using mangle to route things appropriately, but I am not sure exactly what needs to be altered (ip forwarding, firewall rules, etc) and in what order the steps need to be completed. Most of the examples I have encountered when I search "openvpn.net policy based routing" do not seem to apply in my situation, and even though my goal is to learn this stuff, it is hard for me to manipulate these commands on my own.

I will continue doing research to see if I can find something, but if you could help clarify the needed steps, I think it will help me find something that will work. If you need any more information concerning my setup please ask. Thanks again for your help.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2113
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby TinCanTech » Fri Apr 07, 2017 12:28 am

brian620220 wrote:if you could help clarify the needed steps
Starter:
viewtopic.php?f=17&p=61620

Number Three on duckduckgo .. you need to look harder ..

brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Sat Apr 08, 2017 2:07 pm

Hey TinCanTech,

I hate to keep bothering you, but I am in a bad way here. I have searched for information since last Saturday, and have looked at the information that you have pointed me too, but I am having a hard time molding it into what I need for my situation. How many commands do you think I will need to accomplish what I am trying to do? I have tried various things, some just being a couple firewall commands, and then some of them being 8-12 iptable/ip rule and route commands. If I just knew how many commands I may need to accomplish my goal it may help me to filter out some of the information on the posts that I have been checking.

Just a quick recap:
I have an OpenVPN server running on my DD-WRT router. The server has an IP address of 10.8.91.1 and the IP address that I am given when connected to the server is 10.8.91.2. I want to have access to a network attached storage drive that is operating on my network at 192.168.2.5. My home network has a gateway (via DD-WRT router) of 192.168.2.250, and through GUI policy based routing on the router, most of my internet traffic is routed through Private Internet Access VPN. The problem that I am having is that when I route my client connection through the VPN server and then try to route my external internet traffic through the Private Internet Access server, I can no longer connect to my network attached storage. I have another router that I could implement to create a second subnet if you thought that may help in accomplishing my goal. I really do appreciate your help. I am trying to learn, but not very advanced in my abilities yet, so I am having a hard time following some of the information in the posts.

Thanks again!

ronaldinho
OpenVPN User
Posts: 15
Joined: Mon Apr 03, 2017 8:44 am

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby ronaldinho » Mon Apr 10, 2017 10:11 am

Interesting problem, my friend had the same, I will contact him and see if I can help .

brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Mon Apr 10, 2017 1:27 pm

That would be awesome! Thanks ronaldinho.

brian620220
OpenVpn Newbie
Posts: 6
Joined: Wed Apr 05, 2017 2:32 pm

Re: Route home VPN server internet traffic through PIA and maintain LAN Access?

Postby brian620220 » Mon Apr 17, 2017 10:33 am

ronaldinho wrote:Interesting problem, my friend had the same, I will contact him and see if I can help .


Hello Ronaldinho,

I was wondering, if you ever had a chance to check with your friend to see if, and how he was able to resolve his issue. I am still trying to come up with a fix for my problem, but hitting brick walls every way that I go.

Thanks


Return to “Off Topic, Related”

Who is online

Users browsing this forum: No registered users and 2 guests