Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
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.
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.
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.