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.

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
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
10.200.5.51     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
138.40.178.1    192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
138.40.178.1    192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0

Thanks!

share|improve this question
    
Can you post your routing table? –  MariusMatutiae Feb 8 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 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 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 at 7:29

1 Answer 1

up vote 0 down vote accepted

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.

share|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 at 17:22

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.