LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2019, 11:11 AM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
2 NIC, one for VPN use only, one for normal use howto?


I would like to have my company VPN setup full time on a specific NIC while my other NIC runs on my normal LAN at the house.

I would also like to lock specific applications to using only the NIC on the VPN if and only if the VPN is running, else do not connect.

I am running Fedora 29 and have no clue were to even start with this process.

The company VPN locks my computer into their Firewall rules as is to be expected, but they lock all traffic into their rules. That means I am unable to perform tasks on my Fedora system while also working. So no access to my Plex server to listen to music while I work from home...

I would like only a select group of applications, Citrix being one of them, to always go out the NIC with the VPN active and connected. If that VPN is not connected then display some kind of connection error would be great, but not required.

Thanks in advance. I plan on installing the second NIC before this weekend comes and goes.
 
Old 01-16-2019, 11:54 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
You could run a separate Fedora instance under qemu/kvm using the new NIC to connect to the VPN. Your regular desktop and NIC can continue running normally this way.
 
Old 01-16-2019, 12:03 PM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
running a VM just to handle the VPN does not seem efficient as I will be running a Citrix client on top of that.
 
Old 02-07-2019, 05:51 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
anyone else have an idea?
 
Old 02-10-2019, 05:28 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,290

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Routing one nic to the vm is the easy bit. Routing certain apps to the nic in question is the difficult bit. If you're already running Citrix (poor you) as well, that's even worse. It may be possible to route certain IPs (e.g. Netflix, youtube) through a certain nic while pushing the default through the other. While you are waiting for a solution, why not forego normal access while working, if it won't route through your company VPN & firewall?
Code:
ifconfig eth0 down
ifconfig eth1 up
This is as much a question of changing your preferred work pattern as networking. If you're using particular apps, can you store them locally and simply upload & download data? If you're maintaining their network or accessing their network for data, you don't want simultaneous external access, surely?
 
1 members found this post helpful.
Old 02-10-2019, 07:53 AM   #6
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Most VPN software prevents what is called "split tunneling" which is exactly what business_kid describes. With 2 connections open, the security of a VPN is negated because now external connections have access through the PC as an "intermediary".
 
Old 02-10-2019, 09:10 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by lleb View Post
The company VPN locks my computer into their Firewall rules as is to be expected, but they lock all traffic into their rules. That means I am unable to perform tasks on my Fedora system while also working. So no access to my Plex server to listen to music while I work from home...
I think this is the way how a VPN should work. And if you could solve what you wish - that means the VPN is not good enough.
What I could suggest is similar to post #2, probably you can do it with docker.
 
1 members found this post helpful.
Old 02-21-2019, 09:43 PM   #8
primerib
Member
 
Registered: Mar 2010
Posts: 48

Rep: Reputation: 20
Instead of using two nics, how about creating a network namespace and a veth pair to link to it to establish the initial vpn connection. Or, connecting to the vpn using the 2nd nic and then moving the connection into a namespace to jail it. Then any programs he runs in the namespace would have the vpn ip, and any programs he runs in regular space (or whatever you can it.. rootspace maybe?) would have his regular ip.

Last edited by primerib; 02-21-2019 at 10:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC Bonding: Does not failover successfully. Only one NIC is active Akhran Debian 2 02-18-2011 07:26 PM
VPN pptpd connected vpn server only access need help please u4david Linux - Networking 1 10-17-2008 03:54 PM
VPN - is there a way to use VPN & normal connection at the same time? natv Linux - Networking 4 09-05-2007 08:48 AM
ndiswrapper how to use one nic for one thing another nic for other stuff ? zonemikel Linux - Hardware 1 08-30-2006 05:57 AM
Binding named to only one NIC of a dual NIC machine - possible? Paul_Randle Linux - Networking 3 08-24-2005 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration