Point-to-Point Tunneling Protocol (PPTP) is a VPN tunneling protocol based on a client and server model. Microsoft Windows comes with a built-in PPTP client software, and so PPTP VPN is popular among Windows-running computers. PPTP server and client software is also available on Linux platform.
Set Up a PPTP VPN Server on Linux
First, install a PPTP VPN daemon software called pptpd.
To install pptpd on Ubuntu or Debian:
To install pptpd on CentOS, RHEL or Fedora:
$ wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm (for 64-bit system)
$ sudo rpm -Uhv pptpd-1.3.4-2.el6.xxx.rpm
Next, go ahead and enable IP forwarding.
Now configure pptpd by adding "localip" (VPN server's IP address) and "remoteip" (VPN client's IP addresses) in /etc/pptpd.conf. In this example, the potential IP address of a VPN client is 10.0.0.2 or any IP address between 10.0.0.10 and 10.0.0.30.
localip 10.0.0.1 remoteip 10.0.0.2,10.0.0.10-30
Configure local DNS servers in /etc/ppp/pptpd-options. For example, you could add public DNS servers provided by Google.
ms-dns 22.214.171.124 ms-dns 126.96.36.199
Configure user authentication using CHAP in /etc/ppp/chap-secrets. In this example, "alice" is a client's user name, "pptpd" is server, "dfs" is secret, and "*" represents the allowed IP addresses of clients. In this case, any IP address is allowed.
alice pptpd dfs *
Restart pptpd daemon:
$ sudo service pptpd restart (CentOS, RHEL or Fedora)
Optionally, if the VPN server is behind a proxy, you need to set up port forwarding on tcp port 1723, which is used for VPN control channel.
Set Up a PPTP VPN Client on Windows XP
Create a virtual private network connection.
Go to "Properties", choose "Security" tab, and mark "Advanced (custom settings)". In the custom settings, choose "Maximum strength encryption (disconnect if server declines)". If you do not perform this last step, you may get the following error in PPTP VPN server side (in /var/log/syslog).
GRE: Bad checksum from pppd" error on the PPTP VPN server side
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.