Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 need some help in define a route I have two connections one from eth0 and other a ppp0 (a 3G card) Not having the ppp0 connection active my route table is:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         DD-WRT         UG    100    0        0 eth0     *        U     0      0        0 eth0

I can access my webserver from an outside network through ethernet interface Than I have also my ppp0 3G connection active havig the following route table:


estination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 ppp0     *      UH    0      0        0 ppp0     *        U     0      0        0 eth0

Now I only can access my webserver in outside networks through the IP of the 3G connection Note that my server is serving at IP (to all interfaces) But I need to get access to webserver to both interfaces ethernet and 3G connection I only can have access to both connection in local network

Any help to configure this network to have both interfaces with outside networks access is welcome

Can anyone give me an example to configure this network with 2 gateways to give outside networks access One for IP and other for the ppp0 IP


share|improve this question

You can only have 1 default route that in a routing table and and it be useful.

If you want to have multiple default routes in Linux, then you have to setup multiple route tables, and then setup rules that tell your system which table should be used.

Within a single route table you can still use both connections by creating routes for specific destination networks. You can say everything to crosses one interlace and everything else uses over the other.

See the Linux Advanced Routing HOWTO.

share|improve this answer
Hi tanks for answer, how can I do it in single table Can u explain me better or give some example for my situation Regards – Vitor Feb 2 '12 at 0:39

Your Answer


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.