1. Install pptpd.
sudo apt-get install pptpd
2. the contents of my pptpd.conf:
option /etc/ppp/pptpd-options debug dump logwtmp localip 192.168.2.6 remoteip 192.168.2.230-239
The local IP address is the IP address of your server, the one in ifconfig. The remote IPs are a range you would like the remote user to use on your LAN.
3. My /etc/ppp/pptpd-options:
name pptpd refuse-pap refuse-chap refuse-mschap require-mschap-v2 require-mppe-128 proxyarp nodefaultroute lock nobsdcomp
4. Add user names and passwords for the users you want to give access to your vpn.
rdpm pptpd mypassword *
5. Enable ipv4 forwarding in /etc/sysctl.conf:
net.ipv4.ip_forward=1
6. enable the ipv4 forwarding setting
sysctl -p
7. restart pptpd
/etc/init.d/pptpd restart