- Advertisement -

There are mainly 3 types of VPN servers: Point-to-Point Tunneling Protocol (PPTP), Layer 2 Tunneling Protocol (L2TP) and OpenVPN.

In this tutorial I use PPTP as its supported by almost all devices natively: Windows, Linux, Android, iOS and Mac OS.

OS: CentOS/RedHat 6

1. Install ppp via yum:

2. Download and install pptpd (the daemon for point-to-point tunneling).

- Advertisement -

3. Once installed, open /etc/pptpd.conf using text editor and add following line:

4. Open /etc/ppp/options.pptpd and add authenticate method, encryption and DNS resolver value:

5. Lets create user to access the VPN server. Open /etc/ppp/chap-secrets and add the user as below:

6. We need to allow IP packet forwarding for this server. Open /etc/sysctl.conf via text editor and change line below:

7. Run following command to take effect on the changes:

8. Allow IP masquerading in IPtables by executing following line:


If Server:

Update: Once you have done with step 8, check the rules at /etc/sysconfig/iptables. Make sure that the POSTROUTING rules is above any REJECT rules.

9. Turn on the pptpd service at startup and reboot the server:

Once the server is online after reboot, you should now able to access the PPTP server from the VPN client. You can monitor /var/log/messages for ppp and pptpd related log. Cheers!


- Advertisement -

There are no comments yet

  • Hello, guest