Setup PPTP server
Install PPTP Service
# sudo apt-get install pptpdConfigure PPTPD
# sudo nano /etc/pptpd.confAdd server IP and client IP at the end of the file. You can add like below:
1
2localip 192.168.0.1
remoteip 192.168.0.100-200DNS configuration
# sudo nano /etc/ppp/pptpd-optionsUncomment the ms-dns and add google like below or OpenDNS:
1
2ms-dns 8.8.8.8
ms-dns 8.8.4.4User secret configuration
# sudo nano /etc/ppp/chap-secretsThe 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.
1
2# client server secret IP addresses
username * myPassword *
Setup IP Forwarding
To enable IPv4 forward. Change /etc/sysctl.conf file, add forward rule below.
# sudo nano /etc/sysctl.confUncomment the line
net.ipv4.ip_forward=1Then reload the configuration
sudo sysctl -pAdd forward rule in iptables
# sudo nano /etc/rc.localadding to the bottom just before the exit 0
1
2iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
iptables -A FORWARD -p tcp --syn -s 192.168.0.0/24 -j TCPMSS --set-mss 1356
Create NAT rules in firewall
To make PPTP clients talk to each other, we add the following rules to the firewall.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Your should replace “eth0” with your ethernet node name.
Restart server
sudo service pptpd restart