how to set up wired and wireless to be used by different applications

c4urself asked:

My wired interface (eth0) is connected to a corporate VPN (which disallows all sorts of things via a proxy) while at the same time the wireless interface is connected to a guest wireless network on eth1 which has no restrictions.

How can I configure things (Ubuntu) in such a way that my wireless handles all browser connections while my wired handles the rest (nfs, etc.).

My answer:

Since you’re using an Ubuntu desktop, I presume you’re managing your connections with NetworkManager.

You will need to do two things:

  1. Edit your Ethernet interface in NetworkManager, choose Routes and then select Use this connection only for resources on its network.
  2. Add static routes here for all of the IP address ranges in use on your corporate network that you need to access. The gateway for these should be your current gateway IP address for the eth0 interface. You can obtain a list of these networks from your network admin staff.

NetworkManager Routes

Once you have completed this, all of your traffic will go out via your wireless connection unless it’s on one of the networks you specified a static route for.

You will probably need to set up your browser as well, so that it only proxies traffic bound for IP address ranges inside the corporate network. Better yet, use two Firefox profiles: one for the corporate network and one for general Internet usage.

(Part of this answer, and the above image, borrowed from the Ask Ubuntu question Force network-manager to use wireless for an Internet connection.)

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.