- Published on
Setup a PPTP VPN on Ubuntu
- Authors
- Name
- Ruan Bekker
- @ruanbekker
In this post we will setup a PPTP VPN on Ubuntu 16.04
Disable IPv6 Networking:
Edit the grub config:
$ vi /etc/default/grub
Make the following changes:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"
Update Grub and Reboot:
update-grub
reboot
Updates and Install PPTP:
Update Repositories and install PPTPD:
apt update && apt upgrade -y
apt install pptpd -y
Configure your Authentication
vi /etc/ppp/chap-secrets
# client server secret IP addresses
youruser pptpd yourpass *
Configure Local and Remote IP, in this case I want 10.1.1.2 to 10.1.5.1-254
/etc/pptpd.conf
option /etc/ppp/pptpd-options
logwtmp
connections 10000
localip 10.1.1.1
remoteip 10.1.1.2-254,10.1.2.1-254,10.1.3.2-254,10.1.4.1-254,10.1.5.1-254
# for a /24 you can set
# remoteip 10.1.1.2-254
Enable IP Forwarding:
Edit the sysctl.conf and enable IP Forwarding:
vim /etc/sysctl.conf
Populate the following value:
/etc/sysctl.conf
net.ipv4.ip_forward=1
Update the Changes:
sysctl -p
Enable and Start PPTPD:
Enable the service on boot and start the service:
systemctl enable pptpd
systemctl start pptpd
systemctl status pptpd
Connect to your VPN.