How To Install PPTP VPN on CentOS 7

September 24, 2016

How To Install PPTP VPN on CentOS 7

A virtual private network (VPN) is network that extends a private network (i.e. LAN) across a public network, such as the Internet. It enables a communications between computers and devices across shared or public networks as if it were directly connected to the private network, while benefiting from the functionality, security and management policies of the private network.

This is done by establishing a virtual point-to-point connection through the use of dedicated connections, encryption, or a combination of the two. Basically, if two computers are connected through a VPN, they can communicate directly the same way as if they were in local network. Although the two computers could be physically very distant, the other computers on the internet are not able to intercept their communication.

First install pptpd

Setup pptpd

Edit IP setttings in /etc/pptpd.conf:

And the following settings to /etc/ppp/options.pptpd:

Create user to access the VPN server

Add user account in/etc/ppp/chap-secrets (assign username and password):

Enable network forwarding in /etc/sysctl.conf

Setup iptables

You need to add the following iptables rules in order to open the correct ports and properly forward the data packets:

Start PPTP VPN server

Congratulation’s! You have successfully installed PPTP VPN