Installation
You need to install the packagesudo apt-get install pptp-linux
Configuration
Create new VPN connection:sudo pptpsetup --create <tunnel> --server <my-vpn-server-ip> --username <vpn-user-name> --encryptCreate routing for the connection - you need to create a new file in the directory /etc/ppp/ip-up.d/ that contains the route. The content of the file should looks similar to:
#!/bin/bash # 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 ip route add 10.42.0.0/16 dev $1You can take a look of the parameters in /etc/ppp/ip-up script
Establishing connection
sudo pon <tunnel>
Disconnecting
sudo poff <tunnel>
Debugging issues
Start the connection in debug modesudo pon <tunnel> debug dump logfd 2 nodetachShow pon/poff log:
sudo plog
Manually adding route
sudo ip route add 10.42.0.0/16 dev ppp0