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 have internet through PPPoE but the traffic is not routed through VPN. i use ubuntu 12.04.

Usually when i connect to a wireless internet adapter, there is no problem. But now I have to connect to through a PPPoE connection to connect to the internet and the problem rises. this is /etc/network/interfaces:

auto lo
iface lo inet loopback

iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth2 up # line maintained by pppoeconf
provider dsl-provider

auto eth2
iface eth2 inet manual

i have a strange feeling that pppoeconf made sth to the whole routing proccess. this is the ifconf

This is the /etc/resolvconf/interface-order

 # interface-order(5)
 lo.inet*
 lo.dnsmasq
 lo.pdnsd
 lo.!(pdns|pdns-recursor)
 lo
 tun*
 tap*
 hso*
 em+([0-9])?(_+([0-9]))*
 p+([0-9])p+([0-9])?(_+([0-9]))*
 eth*
 ath*
 wlan*
 ppp*
 *

vpn successfully makes the connection this is a part of ifconfig

 ppp0      Link encap:Point-to-Point Protocol  
           inet addr:172.19.11.36  P-t-P:192.168.4.19  Mask:255.255.255.255
           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
           RX packets:17307 errors:0 dropped:0 overruns:0 frame:0
           TX packets:15393 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:3 
           RX bytes:11982216 (11.9 MB)  TX bytes:2269457 (2.2 MB)

 tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
           inet addr:10.1.7.21  P-t-P:10.1.7.22  Mask:255.255.255.255
           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
           RX packets:544 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:100 
           RX bytes:169625 (169.6 KB)  TX bytes:0 (0.0 B)

This is the output of route -n

 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.1.6.242      0.0.0.0         255.255.255.255 UH    0      0        0 tun0
 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth2
 172.25.1.0      0.0.0.0         255.255.255.0   U     2      0        0 eth2
 192.168.4.19    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

How can i make the traffic go throught the tun0?

share|improve this question
    
Can you ping -c3 8.8.8.8? –  MariusMatutiae Feb 9 at 8:23
    
sorry i am late. i did --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 128.436/131.109/134.296/2.419 ms –  shampoo Feb 9 at 9:34

1 Answer 1

up vote 0 down vote accepted

Please add the routing table aswell (route -n). Most probably just the default route is missing. Something like "route add -default gw 10.1.7.22" may work but it depends also on the rest of the routing you have to do.

Most probably with wlan and so on the NetworkManager itself already sets up the default route on that interface.

share|improve this answer
    
tring the route add -default gw 10.1.7.22 causes this line to be added to route -n : (DST)0.0.0.0 (Gateway)10.1.7.22 (Genmask)0.0.0.0 (Flags)UG (Metric)0 (Ref)0 (Use)0 (Iface)ppp0 . and it doesn't lead traffic to VPN. –  shampoo Feb 9 at 9:46
    
it worked !! i added a tun0 at your command like: route add -default gw 10.1.7.22 tun0 –  shampoo Feb 9 at 9:51

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.