Using two vpns

tuleki

New Around Here
I have been trying to experiment with vpns. I'm running asus merlin. And on that I run a vpn client. A pptp/l2tp one. So everything behind my router uses that.

These last few days I've been toying with PiVPN on my Raspberry. I wanted to try to tunnel in to my network, to be able to access my movie collection from outside.
So, I installed PiVPN, chose WireGuard. By default, it asks to use the IP get from the L2TP vpn.. so I changed that IP to my real one in pivpnHOSTS=<ip>, setupVars.conf.
I create a vpn file to use on my laptop. Change the ip on that as well to my real ip.

After that, I go to merlin > wan > virtual server / port forwarding and enter the port 51820 in external (and internal) port, then add the ip adress 192.168.1.166 (raspberry). Thinking that would work.
But it doesn't! If I disconnect from the L2TP vpn, it works. When I turn it back on, I cannot connect to my rpi from outside.

Should it be possible to do this?
 

Tech Junky

Very Senior Member
Vpns change the routing table and restrict access to the lan devices.

Put the raspberry in front of the router and things should work better, faster, and more secure.
 

tuleki

New Around Here
One idea I had, if that couldn't work.. is to exclude the raspberry from the vpn? Maybe that's what you meant.
 

Tech Junky

Very Senior Member
Splitting it is an option but I was talking about putting it as the wan and bridge the router behind it. Or disable the pptp on the router and just push everything through the pi. It would be double nat but you can put routes in the pi to map to devices.

I run a diy setup as the router / VPN and other stuff on a single box. Running wg gets faster speeds and lower CPU usage but takes a bit of googling if you want inbound access to the LAN. L2TP really should be sunset at this point. If you bridge the router though LAN access should be simpler.
 

tuleki

New Around Here
Usually I can figure out a possible solution, but I'm pretty green on networking, vpn and routing. :p

I have a external drive on the router through usb. So I can access that from my pc and appletv, when I download or watch stuff. So the pc, appletv and router need to be on the same network.
And I use a free pptp/l2tp service, to have some kind of anonymity at least. That's why I connect to that vpn on my router, so my devices can still access each other.

With that in mind, what would you propose? :p
 

arpydude

Occasional Visitor
I have been trying to experiment with vpns. I'm running asus merlin. And on that I run a vpn client. A pptp/l2tp one. So everything behind my router uses that.

These last few days I've been toying with PiVPN on my Raspberry. I wanted to try to tunnel in to my network, to be able to access my movie collection from outside.
So, I installed PiVPN, chose WireGuard. By default, it asks to use the IP get from the L2TP vpn.. so I changed that IP to my real one in pivpnHOSTS=<ip>, setupVars.conf.
I create a vpn file to use on my laptop. Change the ip on that as well to my real ip.

After that, I go to merlin > wan > virtual server / port forwarding and enter the port 51820 in external (and internal) port, then add the ip adress 192.168.1.166 (raspberry). Thinking that would work.
But it doesn't! If I disconnect from the L2TP vpn, it works. When I turn it back on, I cannot connect to my rpi from outside.

Should it be possible to do this?
default wg is 58210 unless you changed it on your pivpn
 

Tech Junky

Very Senior Member
With that in mind, what would you propose
ISP <> pi as gateway<> router

There are wg providers like Nord that call it Nordlynx and run about $2/mo when you stack deals. You simply install the Nord app on the pi and connect. You can set it to auto connect on boot and it protects the whole network.

The problem with free is there's no guarantee it's 100% protecting your privacy.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top