Wednesday, 12 October 2011

PPTP server fix for iOS problems (pptpd/PopTop)

Ever since I was offered an iPod touch 4th gen I have been unsuccessful in my attempts to connect to PPTP based VPN servers from iOS. Apparently this is a well known issue since iOS 4.3.3 or earlier, that did not get fixed in the iOS 5 update.

Having set up my own PPTP-based VPN servers using Poptop (also known as pptpd) under CentOS, I always found it strange that my servers would function perfectly fine under all versions of Windows, but completely refuse to work under iOS and reportedly MacOS X as well.

Symptoms were the following:
  • Initially, the connection to the server starts ("Connecting... Starting... Authenticating... ") and appears successful for a second but then immediately drops, with a vague error message.
  • After a few tweaks that I read on DD-WRT's PPTP server configuration page (pertinent given that DD-WRT uses poptop as well) the situation changed but still failed to solve all of my problems: I was able to connect normally, without any error message, however any network communication failed and timed out. Whenever I tried loading a page it would just keep loading forever. Any app that connects to the Internet did the same- loading forever.
 Finally after a combination of multiple tweaks I finally got it to work! The solution is given below but I'd like to credit people first. First I used the DD-WRT tweaks as I previously said, then I followed the tips of two users who posted on this page, sid2 and jeremy207. Massive thanks to both of them!

Here's what got it to work for me. You need to open up the options file for pptpd usually located here: /etc/ppp/options.pptpd
At the very bottom of the file, insert the following lines:
nopcomp
noaccomp
mtu 1400
mru 1400
default-asyncmap
After saving the file, make sure to restart pptpd properly (I stopped it and started it again completely) and try connecting from iOS again. Worked for me! Hope it will for you as well.

No comments:

Post a Comment