LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-15-2012, 04:59 PM   #1
BeaverusIV
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Arch Linux 2010.05
Posts: 136

Rep: Reputation: 18
Using VPN for certain things


My current setup has me on Arch with an Ubuntu VM to run everything I want to do over VPN but it is quite cumbersome and I would prefer to get back to using one system.

The problem I have is that certain services I use at work are bound to my IP address so I can't use a VPN to access those but everything else I want to go through the VPN. I don't want ISPs playing favourites with what gets bandwidth and what doesn't, also injecting their own ads/tracking into pages, ugh.

Anyway, is there a way to do this? I have several browsers installed, can I dedicate one to VPN-only traffic or non-VPN traffic?

Outside of VPN I need to do HTTP(S)/SMB/(S)FTP.
 
Old 11-18-2012, 10:51 AM   #2
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
route is your friend

Hi -- quick answer, without knowing a lot about your VPN config, is to use routing on your Arch box to control what uses the VPN and what doesn't.

Let's say you're at home and your external IP is 200.1.1.2 and your work network is 201.1.1.0/24. Let's also say that your external gateway from your ISP is 200.1.1.1.

Based on what you've said so far, your VPN connection is replacing your default route with a route to the VPN server. To make your traffic to your office network route over the Internet, you need to add a static route, like this:

route add -net 201.1.1.0/24 gw 200.1.1.2

This will send everything destined for 201.1.1.0/24 over your main Internet connection.

There's no way to make a certain web browser use the VPN while another browser does not. What you could do is use web proxy server for something like that, but that's a whole different solution altogether.
 
1 members found this post helpful.
Old 11-18-2012, 01:24 PM   #3
BeaverusIV
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Arch Linux 2010.05
Posts: 136

Original Poster
Rep: Reputation: 18
Thanks, this helps as I can access sites I need to via IP address rather than URL and can add rules for them as well (most are hosted by us anyway). Will update once I've tried this out.
 
Old 11-19-2012, 03:27 PM   #4
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
No need to use IP addresses

"I can access sites I need to via IP address rather than URL "

Wait, wait... you don't have to use IP addresses to make this work. The route works on the IP block for your network, but if DNS translates the hostname in your URL to an address in the routed network, your traffic will be routed correctly.
 
1 members found this post helpful.
Old 12-11-2012, 05:43 PM   #5
BeaverusIV
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Arch Linux 2010.05
Posts: 136

Original Poster
Rep: Reputation: 18
How do I find out my external gateway address?

Okay, I found out you just meant gateway, I added that in and good to go. Suhweet.

Last edited by BeaverusIV; 12-12-2012 at 03:50 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
LXer: 5 things I like in Ubuntu 11.04 (Unity) and 10 things which I don't LXer Syndicated Linux News 0 05-02-2011 12:30 AM
LXer: Getting Things GNOME - Useful Tool to Get Things Done! LXer Syndicated Linux News 0 12-07-2010 05:40 PM
LXer: The bug reporting culture: 10 things to avoid, 10 things you can do LXer Syndicated Linux News 0 01-21-2008 02:10 AM
Suse: confused on many things, why is installing things so hard? blackflare Linux - Newbie 11 10-16-2007 04:35 AM
LXer: Things found on the way to other things. LXer Syndicated Linux News 0 01-06-2007 08:03 PM

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

All times are GMT -5. The time now is 07:56 PM.

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