Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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.

share|improve this answer

you need multiple routes. and make sure you have a default route that's right. It's hard for me to define what it should look like without seeing your setup. http://linux.die.net/man/8/route that's a link to the route man page. I've done similar to what you're trying to do. but not exactly.

also if I remember I had to hack a manual command into ubuntu's scripts to make it set the default route right. it was nasty but it worked. I found debibuntu's networking scripts severely limited in this case.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.