Tag Archives: VPN

How to PPTPD (PopTop)

Below is a way to connect your clients like smartphone, laptop, etc to the Internets while you are out and about connecting to random WiFi networks etc like Mac Donalds, and to help protect yourself while on them unknown networks with unknown users

Install mppe kernel support

# modprobe ppp-compress-18

Install PPTPD

# apt-get install pptpd

Configure IP Address Range
Edit the file /etc/pptpd.conf for the IP address range


restart pptpd to activate changes

# invoke-rc.d pptpd restart

Adding users accounts
Edit the file /etc/ppp/chap-secrets

test_user * lamepassword *

The above will give you a working PPTPD where your able to connect to securely but you’ll most probably can’t connect to the outside network.

To allow you PPTP clients access to the big bad internet

Enable IPv4 forwarding

echo 1 > /proc/sys/net/ipv4/ip_forward

Finally configure your iptables

iptables -A INPUT -i ppp+ -j ACCEPT
iptables -A OUTPUT -o ppp+ -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
iptables -A POSTROUTING -t nat -o ppp+ -j MASQUERADE

If you want all traffic to go through the PPTP connection
Edit the file /etc/ppp/pptpd-options and change

# Debian: do not replace the default route


# Debian: do not replace the default route

and don’t forget to restart pptpd ;-)

Debian pptpd HOWTO
IP Chicken