Configuring PPTP VPN on Debian

This guide focuses on Debian 5.0 Lenny. PPTP VPN works on port 1723 and it also needs GRE protocol to work (port 47). Before you start configuring make sure your Router/Firewall had enabled these ports to this server. Configuration steps are as follows,

1. Install pptpd

apt-get  install  pptpd

2. Enable IP Forwarding by uncommenting following line from /etc/sysctl.conf

#net.ipv4.ip_forward=1

3. Configure pptpd by editing /etc/pptpd.conf and add local ip (server’s ip) and remote ips (range of ips which can be offered to clients)

e.g.

localip 10.0.0.1
remoteip 10.0.0.21-40,10.0.0.51

4. Configure DNS Servers by editing /etc/ppp/pptpd-options and add dns servers to ms-dns.  You could add 8.8.8.8 and 8.8.4.4 as shown below which arepublic dns provided by google.

e.g.
ms-dns  8.8.8.8
ms-dns  8.8.4.4

5. Add Users Authentication to /etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client    server    secret            IP addresses
test        pptpd    test            *

6. Restart pptp daemon

/etc/init.d/pptpd restart

One thought on “Configuring PPTP VPN on Debian

Leave a Reply

Your email address will not be published. Required fields are marked *