1

My main question is:

How to bind my ppp0 interface connection (from Mobile Broadband ZTE AC782) into my OpenVPN connection (from vpngate.net config file)?

In short words:

I want to hide my IP on all applications by VPN but I only can not do it if I connected via ppp0.

My case is:

  • My IP address is still detected by http://whatismyip.com as my ISP's IP (Indonesia) not another country specified in config file after I start sudo openvpn --config the_config_file.ovpn.
  • As a comparison, when I connect to the internet via wlan0 (any wifi hotspot), my command sudo openvpn --config the_config_file.ovpn always bind wlan0 interface and my IP address detected as another country according to the OpenVPN config file.
  • In short, my OpenVPN can not "wrap" ppp0 interface.

My workaround:

  • I read and tried what this tutorial explained. But my IP is still detected as my ISP's IP.
  • I read and tried binding address by parameter -local from this tutorial, but it is same.
  • I read and tried this tutorial to force any connection to whatismyip.com to pass through tun0, but bash says "tun0: Unknown host".

My networking conditions:

I connected into the internet via wvdial.

ifconfig

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:414 errors:0 dropped:0 overruns:0 frame:0
          TX packets:414 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30204 (30.2 KB)  TX bytes:30204 (30.2 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:10.253.192.118  P-t-P:10.20.31.22  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:17543 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18431 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:11671986 (11.6 MB)  TX bytes:2174511 (2.1 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.211.1.13  P-t-P:10.211.1.14  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:23 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:7270 (7.2 KB)  TX bytes:0 (0.0 B)

ip rule show

0:      from all lookup local 
32764:  from all to 10.253.192.118 lookup admin 
32765:  from 10.253.192.118 lookup admin 
32766:  from all lookup main 
32767:  from all lookup default 

ip route list

default dev ppp0  scope link 
10.20.31.22 dev ppp0  proto kernel  scope link  src 10.253.192.118 
10.211.1.14 dev tun0  proto kernel  scope link  src 10.211.1.13

wvdial:

--> WvDial: Internet dialer version 1.61
--> Cannot set information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT 3100000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sat Jan 31 13:23:59 2015
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 4591
--> Using interface ppp0
--> pppd: p8�[08]8@�[08]
--> pppd: p8�[08]8@�[08]
--> pppd: p8�[08]8@�[08]
--> pppd: p8�[08]8@�[08]
--> local  IP address 10.253.192.118
--> pppd: p8�[08]8@�[08]
--> remote IP address 10.20.31.22
--> pppd: p8�[08]8@�[08]
--> primary   DNS address 10.17.118.187
--> pppd: p8�[08]8@�[08]
--> secondary DNS address 10.17.118.251
--> pppd: p8�[08]8@�[08]

Is there any workaround for to so my ppp0 connection can go trough VPN? What is the technique name of this problem? Routing? I am sorry I know nothing about networking. Thank you very much.

1

Yes, here is how it worked on Kali linux guess it should work for you too:

CONNECT Your modem to the Internet first but don't connect Openvpn yet,

/sbin/ip addr show ppp0 | grep peer | awk ' { print $4 } ' | sed 's/\/32//'

ip route replace default via xx:xx:xx:xx dev ppp0

Replace xxxxx with your gateway displayed by the first code.

Solved here

|improve this answer|||||
  • It works perfectly. Yes I should connect my modem first. – Ade Malsasa Akbar Sep 8 '15 at 7:45

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.