Contents

Tutorial Video



Introduction

In this tutorial we will guide you to setup your own Poptop or PPTP VPN Server on CentOS 6. Please keep in mind that the PPTP MS-CHAP-v2 encryption is not considered very secure.

 

Prerequisites

You will need:

  1. A VPS Tiger server, order at Pricing
  2. Getting Started with VPS Tiger Tutorial
  3. SSH with root access.

 

Installing Wget

In minimal centos, you will need to install wget using yum.

yum -y install wget

You will get output similar to:

...
Installed:
  wget.x86_64 0:1.12-10.el6

Complete!

 

Installing Poptop

We have created script to make the process easy and fast, you just have to run the script.

wget https://www.vpstiger.com/files/poptop/centos6/pptpd.sh

You will get output similar to:

...
Saving to: “pptpd.sh”

100%[======================================>] 1,652       --.-K/s   in 0s

2018-03-19 00:10:58 (39.5 MB/s) - “pptpd.sh” saved [1652/1652]

Run the script.

sh pptpd.sh

You will get output similar to:

...
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Starting pptpd:                                            [  OK  ]
VPN service is installed, your VPN username is vpn, VPN password is IJYcY0gU

 

Enabling IP Forwarding

Enable IP forwarding.

sed -i 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/g' /etc/sysctl.conf

To verify run the following command.

sysctl -p

You will get output similar to:

net.ipv4.ip_forward = 1
...

net.ipv4.ip_forward should have the value 1.

Firewall Routing

Configure routing with iptables.

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

Then save the configuration:

sudo iptables-save

 

Installing Nano

In minimal centos, you will need to install nano using yum.

yum -y install nano

You will get output similar to:

...
Installed:
  nano-2.0.9-7.el6.x86_64

Complete!

 

PPTP Users

You can add, edit and remove users through chap-secrets file.

nano /etc/ppp/chap-secrets

You will get output similar to:

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
vpn pptpd IJYcY0gU *

vpn is username, while IJYcY0gU is password, you can edit it accordingly.
Once you completed the edit, save the file by pressing (CTRL + X) keyboard shortcut.
Restart the PPTP, so the new file is loaded.

/etc/init.d/pptpd restart

You will get output similar to:

Shutting down pptpd:                                       [  OK  ]
Starting pptpd:                                            [  OK  ]
Warning: a pptpd restart does not terminate existing
connections, so new connections may be assigned the same IP
address and cause unexpected results.  Use restart-kill to
destroy existing connections during a restart.

 

Conclusion

Your Poptop (PPTP) vpn server setup is complete. Now you can connect to your own Poptop (PPTP) VPN server from your PC or mobile device.