Q:

Traffic is not routed through VPN when PPPoE is Used

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? 

A:

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.

