PPTP Server on Ubuntu Server

Easy way to configure PPTP server on Ubuntu Server 12.04.

First, install PPTP server:

sudo apt-get install pptpd

Configuring the PPTPD server

Now, edit /etc/pptpd.conf

You need to edit localip= and remoteip= lines to match your network.

Ideally, you want to specify the local and remote IP address on your network but off your DHCP range.

Example: I’m using 10.0.1.x addresses on my lan, with subnet mask I could easily use the following:


(Any IP ranges over MAX_CONNECTIONS (100) are ignored. )

Note that although 10.0.2.x is technically off my subnet mask, I can use it.

Next, edit /etc/ppp/chap-secrets

Specify username / password combinations in the form

username * password *

Edit /etc/ppp/pptpd-options and uncomment the ms-dns lines and add valid nameservers. Use your ISP’s nameservers, Google’s nameservers, OpenDNS nameservers, or whichever.

If you are running your pptpd server on a hosted VPS, also comment out the proxyarp directive.

Configuring the firewall:

Now, enter the following at the command line to set firewall rules to allow connections


If you are going to be routing all traffic through the VPN, also do the following few steps:


and edit the /etc/sysctl.conf file and uncomment (or add):


Refresh sysctl by doing:

sysctl -p

Finally, restart the pptpd server

service pptpd restart

, ,