Super User is a question and answer site for computer enthusiasts and power users. 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

Our server has LAN (DHCP) connection to Internal Network and 3G (via USB dongle) to the Internet. The Internet access should not be exposed to internal network and vice versa.

To be able use 3G modem i followed those two manuals:

Now when i do wvdial provider_name the connection is established. The interface is up and has IP, DNS etc setup according to ifconfig

However whenever i try to ping any public internet server it is still trying to use LAN network for it and not PPP interface.

How can i solve it?

PS: I've tried following - put auto ppp0 iface ppp0 inet wvdial into /etc/network/interfaces before auto eth0 and now on start it brings the ppp0 interface up, then i unplug cable from LAN and restart, after this it works fine, but if i restart server with LAN cable plugged in, it is still using eth0 gateway by default!

The output from ip route show:

default via dev p2p1 dev ppp0  proto kernel  scope link  src dev p2p1  proto kernel  scope link  src 

I know there is a way to use route2 to load balance between interfaces, but in all manuals i could find they use static IP and DNS, whereas in my case of 3G connection it is not possible to do...

share|improve this question
up vote 0 down vote accepted

Ok, found it. The command for setting default routing interface is:

$ route add default dev %interface_name%

The issue with setting PPP interface as default is that this should be done after the interface is up which can take some time. So as the solution i created an Upstart task which runs after everything else is done and sets the default interface

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .