Debian PPTP Client Configuration

Here is a simple tutorial how to setup Debian PPTP Client for remote management connecting them to my Client VPN segment.

I often use this for connecting servers that i need to manage where the host is dynamic so i don’t need to worry DnDNS or No-IP software and accounts.

This tutorial is based on Debian 7 so it can be a bit different for other Debian versions of Ubuntu installations.

Install Debian PPTP Client Software

Install pptp-linux from Debian repo

apt-get install pptp-linux

Configure VPN credentials and server settings

Open /etc/ppp/chap-secrets and add your VPN credentials

vi /etc/ppp/chap-secrets

Insert the following:

DOMAIN\\username      PPTP      vpnpassword     *

If your VPN network is not under a domain, replace DOMAIN with your VPNSERVER name.

Now create your VPN profile and add the server settings

vi /etc/ppp/peers/VPNprofile
pty "pptp vpn-server-hostname --nolaunchpppd"
name DOMAIN\\username
remotename PPTP
file /etc/ppp/options.pptp
maxfail 0
ipparam VPNprofile

HINT: maxfail 0 and persist is for the connection to reconnect and retry forever.

Debian PPTP Client Autoconnect

To have your PPTP connection connect on boot you need to add this lines in your /etc/network/interfaces

vi /etc/network/interfaces
auto tunnel
iface tunnel inet ppp
 provider VPNprofile

And if you want to route traffic trough this interface you need to add up-down script

vi /etc/ppp/ip-up.d/VPNprofile
# This script is called with the following arguments:
# Arg Name
# $1 Interface name
# $2 The tty
# $3 The link speed
# $4 Local IP number
# $5 Peer IP number
# $6 Optional ``ipparam'' value foo
route add -net netmask dev $1
chmod a+x /etc/ppp/ip-up.d/VPNprofile

After that reboot your server or restart netwoorking

/etc/init.d/networking restart

You should be all done. check the status with ifconfig

 PPTP Client:

Nikola Stojanoski

System Administrator and Developer. Giving back to the community by blogging about my problems, solutions and practical howto's.