Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a computer with two network interfaces (eth0 and usb0) and all traffic goes through eth0 but I want to use the other interface for certain requests (e.g. Is this possible?

Im guessing if at all possible it will have something to do with /etc/network/interfaces but haven't been able to figure it out

share|improve this question

migrated from Jan 6 '11 at 17:15

This question came from our site for professional and enthusiast programmers.

Are you talking about outgoing requests or incoming requests. In other words, are you running a webserver? – Martijn Heemels Jan 6 '11 at 17:25

You have to add a routing rule for each webserver you want to access with usb0. Find out the IP addresses of the webservers and add

ip route add <webserver ip> dev usb0

To make these routes permanent, you have to add them to the file


But there is one problem left, what about changing IP addresses or webservers with multiple IPs?

share|improve this answer

I assume you are asking about outgoing requests. You can split requests with iptables, etc on Linux but it is going to take some learning. An easier way is to use something like Shorewall to do it. Take a look at their MultiISP document and in particular you are going to want to look at the "Routing Rules" section. You will need to set up rules for each interface.

share|improve this answer

Your Answer


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