Setup PPTP on Ubuntu 16.04 with WiFi router support

This guide has been tested with Ubuntu 16.04 Server.

This configuration is also supported by WiFi Routers

Setup PPTP Server
First we need to install pptp server using apt-get

Then we need to configure the pptpd.

Add server IP and client IP at the end of the file. You can add like below:

This sets up the PPTP server to use IP 192.168.67.1 while distributing the IP range 192.168.67.100 to 192.168.67.200 to PPTP clients. Change these as you wish as long as they are private IP addresses and do not conflict with IP addresses already used by your server.

Configure DNS servers to use when clients connect to this PPTP server

Uncomment the ms-dns and add google like below or OpenDNS

Now change the following

to

Now add a VPN user in /etc/ppp/chap-secrets file.

The column is username. Second column is server name, you can put “pptpd” in there. Third column is password. The last column is the IP addresses, you can put * to allow all IP.

Finally start your server

Setup IP Forwarding
To enable IPv4 forward. Change /etc/sysctl.conf file, add forward rule below.

Uncomment the line

Then reload the configuration

Add forward rule in iptables

adding to the bottom just before the exit 0

This example is using 192.168.0 for its PPTP subnet. The second rule adjusts the MTU size :

You are done. Just reboot your server and you should be able to connect to using PPTPD and send all your traffic through this server.