Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

http://askubuntu.com/questions/143989/3g-usb-modem-not-working-in-12-04

http://forums.gentoo.org/viewtopic-t-766982.html

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 192.168.1.1 dev p2p1 
10.64.64.64 dev ppp0  proto kernel  scope link  src 172.30.50.98 
192.168.1.0/24 dev p2p1  proto kernel  scope link  src 192.168.1.109 

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
add comment

1 Answer

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
add comment

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.