Install PPTP VPN Centos at 6. 7


Point-to-Point Tunneling Protocol VPN (PPTP VPN) is a method of using vpn implementation that is used to access the local area network that is outside the range of securely. This method can actually say it’s been all but its use is quite useful and certainly this kind of vpn is still widely used. In this article I will explain how how to install PPTP on a Centos VPS 6.6. If  you who previously never make pptp vpn in Arabian Ranches may be easier to understand this article because the trick quite similar only it’s the linux version.

Install pptp

Okay, just on our discussion this time. The first step that is make sure the ppp device ready for install.

[root@ns1 ~]# cat /dev/ppp
cat: /dev/ppp: No such device or address
[root@ns1 ~]#

If the results are as above then pptp ready for install. Next updates its repository and install the pptpd.

[root@ns1 ~]# rpm -i

[root@ns1 ~]# yum -y install pptpd

When you’re done, edit the config file pptp: nano/etc/pptpd.conf. Search and change the private ip address which we will use.


In the example above I use the prefix with the ip address that you can wear namely s/d

Information om, now create their user. To make it we will have to add it in file chap-secrets: nano/etc/ppp/chap-secrets.

# Secrets for authentication using CHAP
# client server secret IP addresses
dimzrio pptpd 012345 *

the example above we create a user with the password dimzrio 012345. * Marked fields are used so that the user can access from any ip. In addition if you want to make the user more than one you could add their user in the next line with the same format.

Search and Set the default ms-dns to Google DNS: nano/etc/ppp/options.pptpd


[root@ns1 ~]# /etc/init.d/pptpd restart

[root@ns1 ~]# netstat -anop | grep pptp
tcp 0 0* LISTEN 1987/pptpd off (0.00/0/0) unix 2 [ ] DGRAM 33519 1987/pptpd
[root@ns1 ~]# netstat -anop | grep pptp

Service pptp vpn is already running, next we enable ip forwardingnya.

Edit the file/etc/sysctl.conf: nano ip forwarding and change the variable below.

net.ipv4.ip_forward = 0


net.ipv4.ip_forward = 1

Configurasi load file.

[root@ns1 ~]# sysctl -p

Add also to accept connections iptables rule leading to port 1723 and forward it.

[root@ns1 ~]# iptables -A INPUT -i eth0 -p tcp –dport 1723 -j ACCEPT
[root@ns1 ~]# iptables -A INPUT -i eth0 -p gre -j ACCEPT
[root@ns1 ~]# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

[root@ns1 ~]# /etc/init.d/iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@ns1 ~]#

The entire configuration is finished, the next set of enabling service pptpd as startup.

[root@ns1 ~]# chkconfig pptpd on

Next you can try dail vpn from another computer. Input the user and password have been set previously. The following is an example of interface when 2 users (windows and android) dail pptp vpn simultaneously.