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
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
pty "pptp vpn-server-hostname --nolaunchpppd" name DOMAIN\\username remotename PPTP require-mppe-128 file /etc/ppp/options.pptp maxfail 0 persist 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
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
#!/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 route add -net 192.168.1.0 netmask 255.255.255.0 dev $1
chmod a+x /etc/ppp/ip-up.d/VPNprofile
After that reboot your server or restart netwoorking
You should be all done. check the status with ifconfig
PPTP Client: http://pptpclient.sourceforge.net/