You are not logged in.

#1 2022-12-30 09:49:00

Utini
Member
Registered: 2015-09-28
Posts: 481
Website

2x VPN at the same time for different purposes?

Hello everyone,

I am using my private laptop from home and also the office to connect via RDP to my "office desktop".
I can only connect to my office desktop via RDP when connected to my companies FortiVPN.
Since I don't want to route all the traffic from my private laptop through the companies FortiVPN, I created an OpenVPN server on my home network.
I would like to route all my laptops traffic through that OpenVPN server except one IP (RDP office desktop IP) which should go through the FortiVPN.

So I am trying to create the following setup which requires 2x VPN at the same time:
1x OpenVPN: Office Network -> Home Network -> Use this for all connections except RDP (specific IP) connection
1x OpenFortiVPN: Office Network -> Office Network -> Use this for RDP (specific IP) connection only

No VPN (from office WIFI/LAN network):
I can't connect (or ping) my office desktop via RDP this way (because that only works through the companies OpenFortiVPN).
"Whatsmyip" displays my companies IP.

OpenVPN:
So far I configured my OpenVPN and OpenFortiVPN profile in KDE Networkmanager.
I am able to route all my traffic through my OpenVPN by only connecting to OpenVPN.
Obviously I can't connect (or ping) my office desktop via RDP this way.

OpenFortiVPN:
By only connecting to the OpenFortiVPN, I am able to connect via RDP to my office desktop.
I added custom routes in the VPN settings in order to only send the RDP IP traffic through the VPN.
This seems to work because e.g. when at home "whatsmyip" shows my home IP.
When pinging from my home office (with the OpenFortiVPN connection enabled) I get 3ms to 8.8.8.8.
The ping would be much higher if I was pinging through the OpenFortiVPN.

OpenVPN + OpenFortiVPN:
I can also connect both VPNs at the same time.
By first enabling the OpenVPN and then enabling the OpenFortiVPN I can't ping/access my office desktop.
By first enabling OpenFortiVPN and then enabling OpenVPN I can ping/access my office desktop.
"Whatsmyip" also shows the IP from my home network (even when doing this test from the work network).

But do I really use both VPN parallel now or is it a serial chain? E.g.:
Laptop -> OpenFortiVPN -> OpenVPN -> Internet
.. that would mean all my private traffic is again passing through the office network / OpenFortiVPN.

Is there any 100% foolproof method to verify that all my traffic goes over OpenVPN except the RDP connection?

Thanks!


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

#2 2023-01-04 19:02:11

xerxes_
Member
Registered: 2018-04-29
Posts: 842

Re: 2x VPN at the same time for different purposes?

Is there any 100% foolproof method to verify that all my traffic goes over OpenVPN except the RDP connection?

How about traceroute, tracepath? Also check it's switches. Yet maybe: ifconfig, ip a, ip r, arp, etc. will show anything useful.

Offline

Board footer

Powered by FluxBB