sudo apt-get install pptpd telnet iptables
ipconfig
sudo vi /etc/pptpd.conf
Uncomment and change the localip line to your server public IP address
localip 70.164.204.106
sudo vi /etc/ppp/pptpd-options
Uncomment and change ms-dns lines to
ms-dns 8.8.8.8
ms-dns 8.8.4.4
Edit /etc/ppp/chap-secrets as sudo and add your PPTP username and password (plaintext) sudo vi /etc/ppp/chap-secrets
opensource pptpd hacker *
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo sysctl net.ipv4.ip_forward=1
These settings above are effective only until the server restart. Put them into /etc/rc.local start-up script file to make sure Linux runs them on the start-up
sudo /etc/init.d/pptpd restart
sudo tail -f /var/log/syslog
Setting VPN PPTP client
For the VPN client (iPad, Windows, OSX, Ubuntu Network Manager) the settings would be for the example above:
Protocol: PPTP
Server: your server public IP or DNS name
Login: opensource
Password: hacker
Encryption level: auto (or it should pick secure MPPE 128 by default)
Send all traffic: Yes (will forward all traffic through VPN, not just one inside your VPN devices)
BY: Farid Ahmadian
TAG: vpn, pptp
DATE: 2016-09-16 07:21:03
With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)