I'm connecting to my university intranet through their VPN service. So whenever I activate VPN, I get an extra "ppp0" interface in addition to the already existing eth0 (wired), wlan0 (wireless) and lo (localhost) interfaces. It seems that, like all the other applications, Firefox connects to the internet through ppp0 when I activate VPN. I want it to connect through any interface except ppp0. How and where can I indicate this?

I'm running Ubuntu 12.04 on my laptop so I'm looking for a Linux solution to this.

Edit: Here's the output of the command "route -n" as requested by MariusMatutiae

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         U     0      0        0 ppp0 UH    0      0        0 ppp0 UGH   0      0        0 wlan0 UGH   0      0        0 wlan0     U     1000   0        0 wlan0   U     2      0        0 wlan0


  • Can you post your routing table? – MariusMatutiae Feb 8 '14 at 6:01
  • You may very well prevent firefox from connecting thru the the ppp0 interface (there is a way to do this), but what good is it to you? You have no other interface configured, so you will always get stuck. – MariusMatutiae Feb 8 '14 at 10:09
  • How do I do that (i.e. prevent only firefox from connecting through ppp0)? Everything else should connect through ppp0. – user1953384 Feb 9 '14 at 1:59
  • If you would like to have just one single application going through ppp0 you can use Linux Network Namespaces: see the link in the answer given under. – fede.evol Feb 9 '14 at 7:29

What you should do is not put the default route to VPN/ppp0 which is most likely what you are doing but put to the VPN/ppp0 route just the host/network you really need to route over that link (ie. just the addresses/networks that are in the university intranet).

How to do this depends a bit on the VPN you are using. For example if the vpnc software you should check the "Target networks" directive that tells what networks to forward on it (and probably also set "DNSUpdate no" so you don't change your DNS servers) instead of putting the default gateway (that is forward all the traffic)

Otherwise you could give a look to Linux Network Namespaces which may be even more advanced for you case, but check this article out: http://www.evolware.org/?p=293.

| improve this answer | |
  • 1
    Seeing your routing table it's obvious that the default gateway is set to ppp0 so everything goes on the Intranet. As said in the answer: you must not set the default route to the VPN. If what you call VPN is simply a normal pppd session then you have to remove the "defaultroute" or "replacedefaultroute" command from the PPP configuration so your default route will not get deleted. – fede.evol Feb 8 '14 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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