How to Install PPTP Client on Linux


Hi again

when you use the debian server probably you need to connect a vpn server and somehow route your packets through them. therefore i decided to let you know how you can connect to a vpn server in command line interface.

first you should install the pptp-linux package in your Debian.

aptitude install pptp-linux

then you can add your user account in the file /etc/ppp/chap-secret in the following style.

$Domain\\$yourusername PPTP $Yourpassword

(if you havent any domain. dont worry just write your username.)

now you configured you username nad password for your connection. but which connection ?!  you should now add or create a new vpn client connection for your server.

Therefore go to the /etc/ppp/peers/ and create a new file with name of your connection. for instance :

vim /etc/ppp/peers/myfirstvpnconnection

ok now in the editor environment try to add the following parameters which i will tell you why we use each one.

pty “pptp $YouIPAddressOfServer –nolaunchpppd”
name $YourUSername
remotename PPTP
file /etc/ppp/options.pptp
ipparam vpn

now you should go to the /etc/ppp/options.pptp and then comment and uncomment some parameters

the following parameters should be comment are :


then you should add the following parameter in the file.


thats  it. simply you create new vpn connection in your debian. but the main thing is about  starting  the connection.

First check you connection by the following command which enables you to see what exactly happen and ensure you the connection will be established or not.

pon $connectionname debug dump logfd 2 nodetach

ok if the connection is done and you give the IP from the server,just press ctrl+c to disconnecting the connection (poff $ConnectionName is also used) and add it this connection into you interface file in order to make it available whenever the Debian boot.

go into the /etc/network/interfaces and then add these following commands.

auto tunnel

iface tunnel inet ppp

provider $YouVPNCOnnectionNAme (Which your created in /etc/ppp/peers)

thats it. your connection will be start whenever your debian starts :)

Note: if you decided to ensure whenever your connection disconnected, your connection try to reconnect just you should add the persist in your connection file.

so just type

echo “persist” >> /etc/ppp/peers/$YourVPNfile

if you have any further question dont hesitate to contact me:)


2 Responses to “How to Install PPTP Client on Linux”

  • I don’t usually reply to posts but I will in this case, great info…I will add a backlink and bookmark your site. Keep up the good work!

  • Peter van der Leek:

    Brilliant, after searching google and hitting my head against the wall for hours, I finally found a good HowTo. Thanks very much!

Leave a Reply


     Copyrighted Mehdi Behamin , All Rights Reserved
Blog has been visited 204247 times