Why still Intrepid (Ubuntu 8.10) server? I just don’t have time to upgrade it. For a server, as long as it is secure and stable, no need for the cutting edge.
Why VPN? Check wiki. For me, I want to access some location sensitive files while I am on the iPhone via 3G network.
How? There is an excellent How-To in Chinese. I followed it and it works! This post is a summary of what I did.
For iPhone, three VPN protocols are supported: L2TP, PPTP and Cisco IPSec. I am going to install a pptpd on my Ubuntu server.
- Get the server installed.
sudo apt-get install pptpd - Edit /etc/pptpd.conf file to setup the IP address for connected clients. Enable localip and remoteip to something like
localip 10.100.113.1 remoteip 10.100.113.2-4 - Use /etc/resolv.conf to find the DNS of the system, and edit /etc/ppp/pptpd-options to enable ms-dns – something like
ms-dns 128.218.254.10 ms-dns 128.218.254.40 - Set the VPN account by editing /etc/ppp/chap-secrets. For an account test with password TSET that can connect from any where
test pptpd TSET * - Restart the server by executing
sudo /etc/init.d/pptpd restart - Enable forward for Internet connection. First, edit /etc/sysctl.conf file to enable
net.ipv4.ip_forward=1and
sudo sysctl -pSecond, use iptables (install by apt-get) to setup a route
sudo iptables -t nat -A POSTROUTING -s 10.100.113.0/24 -o eth0 -j MASQUERADE - Setup VPN in the iPhone by General > Network > VPN > PPTP. Enable Auto encryption level. Keep RSA SecurID off.

It should work now. - Automatically enable iptables after rebooting. First, save the working iptables by
# iptables-save > /etc/iptables-rulesSecond, edit /etc/network/interfaces to something like
# The primary network interface auto eth0 iface eth0 inet dhcp pre-up iptables-restore < /etc/iptables-rules
That is all I did and I don’t need to tweak other things as listed in the original post. I also tested on a windows xp machine, which works like a charm. Enjoy Ubuntu!
3 Responses to “Setup a VPN server in Ubuntu 8.10 for iPhone”
Leave a Reply
blog by cail
- » Buy Chinese Painting
- » a page for 99life, fdu
- » 2shRNA - design oligos for RNAi
- » Feed collection of leading biology journals
- » How to use ImageJ to analyze images?
- » Play background music
- » About CaiLog
New in 'How-To'
- http://pubmeder.appspot.com/ open to public
- PubMed-er : ease your paper reading in browser
- Use vUSBbus to backup and emulate Sentinel and HASP dongles (HASP3/HASP4/Hasp HL USB keys) #getkey
- Install Snow Leopard on EeePC 1000HA (for Google Contact Sync with photo)
- How to setup Exchange ActiveSync account on #htc #evo 4G (should work for other #android phone with HTC Sense)
- Sprint HTC #evo running on Verizon network … and speed comparison
- HTC #evo: #root from @toastcfh, RUU stocks, OTA update and @unrevoked
Hot in 'How-To'
- analog – analog/digital – digital, VGA – DVI – HDMI - 26,386 views
- Ez-12 windsurfer antenna - 14,546 views
- How to add new ringtones to iPhone - 12,323 views
- Air Video, video stream and live convert your favorites to iPod Touch, iPhone and iPad (How to setup the server for Ubuntu and OpenSolaris) - 9,504 views
- mac osx 10.5.1 kalway on Lenovo Thinkpad T43 2668AJU - 8,399 views


[...] few searches on the internet brought up this page – very useful advice, but I didn’t follow it completely. All I did (initially) was [...]
With the coming of 10.4, upgraded version about installing pptp can be found here (http://eubolist.wordpress.com/2010/01/28/howto-pptp-vpn-server-with-ubuntu-10-04-lucid-lynx/)
[...] Shared How-To » Setup a VPN server in Ubuntu 8.10 for iPhone. [...]