:: Setup PPTPd VPN on Linux
:: What is PPTP
The Point-to-Point Tunneling Protocol (PPTP) is a method for implementing virtual private networks. PPTP uses a control channel over TCP and a GRE tunnel operating to encapsulate PPP packets. – WikiPedia
:: Verifying PPTPd is working
cat /dev/ppp cat: /dev/ppp: No such device or address
:: How to setup pptpd vpn in Debian Linux
+ Installing pptpd
aptitude install pptpd
+ Configure pptpd
vi /etc/pptpd.conf
setup or change on these line:
localip 1.2.3.4 remoteip 10.0.0.1-200
* 1.2.3.4 = your server ip
** 10.0.0.1-200 = ip address for clients
+ Setup DNS Server for clients (Google public DNS)
vi /etc/ppp/pptpd-options
uncomment or setup in these line, like:
ms-dns 8.8.8.8 ms-dns 8.8.4.4
+ Create user login info for PPTP VPN
vi /etc/ppp/chap-secrets
add username anda password for the clients, example:
userjono * passwd123 *
+ Setup MTU
vi /etc/ppp/ip-up
add this line :
ifconfig $1 mtu 1400
+ Restarting pptpd
/etc/init.d/pptpd restart
:: Setup Firewall
+ Enable NAT connection
iptables -t nat -A POSTROUTING -j SNAT --to-source 1.2.3.4
* 1.2.3.4 = your server ip
+ Save configuration
iptables-save iptables-save > /etc/iptables.conf cat > /etc/network/if-pre-up.d/iptables <
:: Enable ip forwardingvi /etc/sysctl.confadd this line:
net.ipv4.ip_forward = 1then apply the configuration
sysctl -p
:: Links
+ PutDispenserHere