Ubuntu – Using multiple internet connections

interfaceinternetUbuntu

I have two connections at work. One that I use to get to the Internet and the other to the company related stuff. The problem is that when I want to connect to the work related stuff, I need to switch off my wifi connection so that the browser recognizes the ethernet connection and routes request through the ethernet. If I want to access the Internet, I have to unplug my connection and then switch on the wifi.

Without these hassles, is there some way I could use both connections but perhaps maybe open a specific browser instance (like firefox or chrome) to use ethernet for a specific session?

I am using Ubuntu 9.10 by the way and have two interfaces on the same host.

Best Answer

If the two networks are in different address spaces (like, one uses 192.168.1.x/24 and the other 192.168.2.x/24) you can do some routing on your client.

# ip route add 192.168.2.0/24 via 192.168.2.254 dev eth0
# ip route add 192.168.1.0/24 via 192.168.1.254 dev eth1

The addresses, and ethernet cards, would be specific to your location.

If the addresses are the same (unlikely, but possible) then you cannot do anything about this, keep on moving wires.

I won't get into the security aspects of this much, but if there is a policy of preventing information leaks between these two networks, which I assume there may be, you probably want to keep them physically separated. If someone were to compromise your machine over the public internet, they would then have access to your company network as well.

Related Topic