(BuyVM/FranTech) VPS PPTP VPN Setup

Install pptp package

apt-get install pptpd

Edit pptp.conf

nano /etc/pptpd.conf

Add the ip address which the server should hand out to the dialing in client:

localip 192.168.10.1
remoteip 192.168.10.101-200

Enable ip forwarding

nano /etc/sysctl.conf

net.ipv4.ip_forward=1

Add credentials for dial-in:

nano /etc/ppp/chap-secrets

dialin_user pptpd dialin_password *

Add to firewall

iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -p 47 -j ACCEPT
iptables -A FORWARD -i ppp+ -o vent0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j SNAT --to-source <OUTBOUND_IP_ADDRESS>

Add this permanently as a bootup script and reboot the system.

No Comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>