Install PPP PPTPD VPN Server on RHEL CentOS

PPTPD/Poptop/PPP (Point-to-Point Tunneling Protocol) is one of the quickest way to get VPN connections to tunnel traffic over 128 bit encryption secure link connection. This tutorial is all about setup a Server/VPS to use PPTP because it is supported natively on almost all devices, Windows, Linux, Android, IOS and Mac OS. This Tutorial is only for RHEL or CentOS related systems/VPS.

linux-server

We always prefer Linux media installation via yum repository server as this will ensure patches are applied during regular system update. If you already have webmin installed then you can easily maintain pptpd server using webmin web based control panel.

Setup PPP/PPTPD/Poptop VPN server on Centos/RedHat 6.4 x64 / x86

  • Copy the code from Below.
  • Login As Root to your System/Server/VPS where you want to install the VPN server.
  • Paste the code on your VPS CUI terminal.

cd /
yum remove -y pptpd ppp
iptables –flush POSTROUTING –table nat
iptables –flush FORWARD
rm -rf /etc/pptpd.conf
rm -rf /etc/ppp

rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm
yum -y install policycoreutils make libpcap iptables gcc-c++ logrotate tar cpio perl pam tcp_wrappers kernel_ppp_mppe

yum -y install ppp pptpd

rm -rf /dev/ppp
mknod /dev/ppp c 108 0
echo 1 > /proc/sys/net/ipv4/ip_forward
echo “mknod /dev/ppp c 108 0″ >> /etc/rc.local
echo “echo 1 > /proc/sys/net/ipv4/ip_forward” >> /etc/rc.local
echo “localip 10.0.0.1″ >> /etc/pptpd.conf
echo “remoteip 10.0.0.2-254″ >> /etc/pptpd.conf
echo “ms-dns 8.8.8.8″ >> /etc/ppp/options.pptpd
echo “ms-dns 8.8.4.4″ >> /etc/ppp/options.pptpd

pass=`openssl rand 6 -base64`
if [ “$1″ != “” ]
then pass=$1
fi

echo “user1 pptpd 123456789z *” >> /etc/ppp/chap-secrets

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j SNAT –to-source `ifconfig  | grep ‘inet addr:’| grep -v ‘127.0.0.1’ | cut -d: -f2 | awk ‘NR==1 { print $1}’`
iptables -A FORWARD -p tcp –syn -s 10.0.0.0/24 -j TCPMSS –set-mss 1356
service iptables save

chkconfig iptables on
chkconfig pptpd on
service iptables start
service pptpd start
cat /etc/ppp/chap-secrets

Note: Setup will finished within a minute but Its may takes more then 5 minutes in slow network System.

How to Add/Change the username/Password for VPN clients:

The Default Username is user1 and Password is 123456789z. So you must change/remove your VPN server default Username/password for security reason.

vim /etc/ppp/chap-secrets

How to restart PPP/pptpd server

Sometimes we need to restart pptpd server due to disconnect all active connection to ppp/pptpd vpn server.

service pptpd restart

If your client getting any Error code during connection to server or you need to hire us for free VPS Setup then you can contact us.

Install PPP PPTPD VPN Server on RHEL CentOS
Written by: AFRIDA YANTI
Reting: 4.9


Cheap Best Hosting is a leading provider of web hosting, shared hosting, resellers hosting, virtual private servers, vps hosting, dedicated servers and domain name registration.


Follow me on Google+ | Twitter | Facebook | Linkedin | YouTube

Share This Post

Related Articles

Leave a Reply

© 2014 Cheap Best Hosting Blog. All rights reserved. · Entries RSS · Comments RSS
Hosting By Cheap Best Hosting