How to connect an Android device to PPTP VPN

I created a PPTP VPN server using the ubuntu guide .

Now I have:

enter image description here

My problem is that my Android phone was unable to connect to the pptp that I created. When I try to enter a username and password, then click connect, the only message I have is Connection ... but then Failed .

So, I searched and found this link for a general overview of how to connect to my PPTP VPN. I also came here , but I still can’t connect my phone to the VPN. I have been following exactly what the ubuntu leadership is saying, and now I don’t know what to do to achieve my goal. Please give the link or guide that I have to do so that my Android phone can connect to my PPTP VPN.

syslog server

Aug 26 14:44:50 jameshwart-System-Product-Name pptpd[31320]: CTRL: Client 192.168.1.27 control connection started Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Starting call (launching pppd, opening GRE) Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: pppd 2.4.5 started by root, uid 0 Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Using interface ppp0 Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Connect: ppp0 <--> /dev/pts/24 Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0) Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring... Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: peer from calling number 192.168.1.27 authorized Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: MPPE required, but MS-CHAP[v2] nor EAP-TLS auth are performed. Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Connection terminated. Aug 26 14:44:51 jameshwart-System-Product-Name NetworkManager[969]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0) Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: Exit. Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: GRE: read(fd=6,buffer=7f2daa2874a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7) Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Reaping child PPP[31321] Aug 26 14:44:51 jameshwart-System-Product-Name pptpd[31320]: CTRL: Client 192.168.1.27 control connection finished 

syslog client

 Sent control packet type is 1 'Start-Control-Connection-Request' Aug 26 14:45:17 felman-To-be-filled-by-OEM pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply Aug 26 14:45:17 felman-To-be-filled-by-OEM pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established. Aug 26 14:45:18 felman-To-be-filled-by-OEM pptp[10347]: nm-pptp-service-10324 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request' Aug 26 14:45:18 felman-To-be-filled-by-OEM pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply. Aug 26 14:45:18 felman-To-be-filled-by-OEM pptp[10347]: nm-pptp-service-10324 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer call ID 21504). Aug 26 14:45:18 felman-To-be-filled-by-OEM pppd[10328]: CHAP authentication succeeded Aug 26 14:45:19 felman-To-be-filled-by-OEM pppd[10328]: MPPE 128-bit stateless compression e 

options.pptp file

 ############################################################################### # $Id: options.pptp,v 1.3 2006/03/26 23:11:05 quozl Exp $ # # Sample PPTP PPP options file /etc/ppp/options.pptp # Options used by PPP when a connection is made by a PPTP client. # This file can be referred to by an /etc/ppp/peers file for the tunnel. # Changes are effective on the next connection. See "man pppd". # # You are expected to change this file to suit your system. As # packaged, it requires PPP 2.4.2 or later from http://ppp.samba.org/ # and the kernel MPPE module available from the CVS repository also on # http://ppp.samba.org/, which is packaged for DKMS as kernel_ppp_mppe. ############################################################################### # Lock the port lock # Authentication # We don't need the tunnel server to authenticate itself noauth # We won't do PAP, EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2 # (you may need to remove these refusals if the server is not using MPPE) refuse-pap refuse-eap refuse-chap refuse-mschap # Compression # Turn off compression protocols we know won't be used nobsdcomp nodeflate # Encryption # (There have been multiple versions of PPP with encryption support, # choose with of the following sections you will use. Note that MPPE # requires the use of MSCHAP-V2 during authentication) # http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras # ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o # {{{ # Require MPPE 128-bit encryption #require-mppe-128 # }}} # http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec # ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o # {{{ # Require MPPE 128-bit encryption mppe required,stateless # }}} 
+8
android vpn pptp
source share
4 answers

thanks to everyone, but I allow it by checking the pptpd-options file and changing

#require-mschap-v2 to require-mschap-v2
#require-mppe-128 to require-mppe-128

i also change, removing # like this

 refuse-pap refuse-chap refuse-mschap 

newpeople update:

And be sure to remove the noauth parameter. In his case, because it is before require-mppe-128 and require-mschap-v2 , this has no effect, but if you still cannot do this, check noauth and remove it.

+1
source share

With such little information, it's a little hard to guess. This is based on the assumption that your phone is connected, but you cannot say that this is due to the fact that it does not have access to the Internet or other network resource.

However, it seems likely that your phone may be connected to your pptp VPN network, but simply does not route through the Internet through it. You may need to set up a proxy server on your ubuntu server and direct your phone to use this to access the Internet.

To install a tiny proxy server:

sudo apt-get install tinyproxy

For a setup guide, see http://www.justinmccandless.com/blog/Set+Up+Tinyproxy+in+Ubuntu

Now there are a number of applications for the phone that can help you easily configure your phone to use the proxy server that you just installed inside your vpn. I am using ASProxy, which can be found on Google Play. https://play.google.com/store/apps/details?id=com.Alsu.ASProxy&hl=en

This decision is just an assumption. Without additional information about what you are trying to achieve and what you have done, I just guess and may be on the sidelines.

0
source share

Fisrt, do you need to check which side makes the connection fail, client or server? You can use another computer instead of a phone to connect the pptpd server. If this fails, the problem may be on the server side. Log information can be found in /var/log/syslog . Alternatively, you can restart the pptpd server with the debug option to enable verbose logging.

From your log, this is the reason:

 Aug 26 14:44:51 jameshwart-System-Product-Name pppd[31321]: MPPE required, but MS-CHAP[v2] nor EAP-TLS auth are performed. 

It says that your kernel does not support MPPE. Do you have ppp_mppe that is included as a module or compiled in your kernel? In your .config file for your kernel, you will see something like

 CONFIG_PPP_MPPE=m 

or

 CONFIG_PPP_MPPE=y 
0
source share

I know this is an old question, and this may not be applicable for this case, but the simple solution I found for problems with vpn connection on Android is to turn off the power saving mode. I looked all over the Internet to figure this out and accidentally discovered it. Hope this helps someone else. I used Betternet, which is a great VPN service, but it will not connect. I turned off the power saving mode and it instantly connected.

0
source share

All Articles