Page 1 of 1


Posted: Sun Feb 01, 2009 5:12 pm
by mudasir
To setup a Linux based PPTP Server.

This setup is for RedHat Enterprise Linux 5. (this should also work on Fedora and CentOS).


Step 1. (Installation of PPP Package)

First we need to check whether we already have ppp package installed or not.

Code: Select all

[]# rpm -qa | grep ppp

The above command will show us all packages that contain ppp in their name. RHEL5 comes with a ppp package named "ppp-2.4.4-1.el5", which is already installed.

If the package in not installed you can download the package from ... 5.i386.rpm
and install it using any of the two methods described below

Online installation: (Method 1)

Code: Select all

[]# rpm -ivh


To download: (Method 2 - Part 1)

Code: Select all

[]# wget -ivh

To Install: (Method 2 - Part 2)

Code: Select all

[]# rpm -ivh ppp-2.4.4-1.el5.i386.rpm

You can also check for PPP latest packages at ... _id=118989

Step 2. (Installation of PPTP Package)

Again we will check if we the pptp package is already installed or not.

Code: Select all

[]# rpm -qa | grep -t pptp

If the package is not installed then install it. The package can be downloaded from ... 4.i386.rpm

and install the package using the command below

Code: Select all

[]# rpm -ivh pptpd-1.3.3-1.rhel4.i386.rpm

All pptp related RPM's and SOURCE are at ... e_id=51373

Step 3. (Check whether kernel supports MPPE-Microsoft Point-to-Point Encryption).

To check whether kernel supports MPPE simply issue the following.

Code: Select all

[]# modprobe ppp-compress-18 && echo "MPPE Support available"

The above command will check the kernel modules related to MPPE and if found will echo "MPPE Support available".
If the support for MPPE is not available then you will need to install DKMS and kernel_ppp_mppe RPM. You can check for latest DKMS and Kernel_ppp_mppe RPM at ... _id=120221

For convenience i have uploaded related RPM's to my web-site and can be easily downloaded and installed from there.

To install DKMS rpm

Code: Select all

[]# rpm -ivh

This will automatically download and install DKMS RPM

To install Kernel_ppp_mppe RPM

Code: Select all

[]# rpm -ivh

This will download and install kernel_ppp_mppe RPM.

Now you should reboot your computer, and then issue the modprobe command which was initially to check the MPPE Kernel Support.

Step 4. (Configure PPTP Related Files)

The files we need to configure are
1. /etc/pptpd.conf
2. /etc/ppp/options.pptpd
3. /etc/ppp/chap-secrets

I have uploaded all sample files at

You can download and take a look at it. Remember to copy these files at their respective locations.
I will not go in detailt o explain each and every option present in these files, it will take a very long time. I would prefer you to please download these files and read them as they are well commented.

Step 5 (Starting and testing PPTP Service)

Code: Select all

[]# service pptpd restart
The above command will restart PPTP Server and if any error occurs it will show.

Now we also need to add the service at startup

Code: Select all

[]# chkconfig pptpd on
This command will enable/start the PPTP Server at boot time.


Step 6 (Enable IP-Forwarding)

When the clients are connected, they will not be able to use internet as we have not enabled IP-Fowarding.

To enable IP-Forwarding issue the following.

Code: Select all

[]# echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local

You can setup a complete firewall to work with this PPTP Setup.

Our PPTP Setup is now complete. I will be waiting for your comments about it, and also if you find any problems in this setup feel free to post here.

Good work

Posted: Fri Aug 28, 2009 8:08 pm
by zaib
Great work, very simple step by step guide :)

It will be more helpful if you add some more steps on setting pptp for scenario , like howto bound users so that there net works only if they connect to pptp server. howto restrict.

Posted: Fri Aug 28, 2009 9:20 pm
by mudasir

Dear Zaib bhai,

Just by following this a Server is ready for Cable Net. And if you want to setup a firewall for security that is a different thing.