sudo apt-get install pptpd
sudo nano /etc/pptpd.conf
3: Add server IP and client IP at the end of the file. You can add like below:
localip is the ip address of the server in the network and remoteip is the range you specify for vpn clients to join your network.
sudo nano /etc/ppp/pptpd-options
5: Uncomment the ms-dns and add google like below or OpenDNS
sudo nano /etc/ppp/chap-secrets
# client server secret IP addresses
username * myPassword *
sudo /etc/init.d/pptpd restart
If you are setting your iphone to use this server set the "Encryption Level" to "Auto".If your modem has DMZ setting you don't have to forward any port but in case you can forward 1723TCP and 47UDP to the server.