Point-to-Point Tunneling Protocol (PPTP) is a PPP-over-IP encapsulation protocol developed by Microsoft that enables virtual private networks (VPNs) to be established over a public network.
This protocol is supported by almost all platforms including, Windows since the era of 95 to R2 edition, Mac OS X, GNU / Linux, BSD, Cisco IOS, Android, Palm and is extremely simple to set up. However PPTP is far from secure, indeed many security flaws have been found in the implementation of MPPE, the PPP authentication protocol. For this reason, it is strongly discouraged to use PPTP with IPv6 or where confidentiality and data integrity are considered essential.
So here, we’ll see how to connect to a PPTP server under GNU / Linux.
apt-get install pptp-linux
· address (IP or DNS) of the PPTP server ($ SERVER)
· the name you want to give to the tunnel ($ TUNNEL),
· login ($ USERNAME) (can be in the form DOMAIN \ USERNAME)
· password ($ PASSWORD)
Check for the following options in the /etc/ppp/options.pptp file
lock noauth nobsdcomp nodeflate
Add a line to the / etc / ppp / chap-secrets file that handles authentication (be careful the password is stored in clear)
$ USERNAME PPTP $ PASSWORD *
Remember to escape the special characters in the case DOMAIN \\ USERNAME
Create the file / etc / ppp / peers / $ TUNNEL:
pty "pptp $ SERVER -nolaunchpppd"
name $ DOMAIN \\ $ USERNAME
ipparam $ TUNNEL
The option "persist" enables auto reconnection in case of connection loss.
Test the tunnel:
pon $ TUNNEL debug dump logfd 2 nodetach
Start the tunnel:
pon $ TUNNEL
Stop the tunnel:
poff $ TUNNEL
To start the tunnel automatically you can add this to the / etc / network / interfaces file:
iface tunnel inet ppp
provider $ TUNNEL
Test the auto start:
That's it, the PPTP VPN connection is now established! You can see it appear in the result of the ipconfig command under the name pppX.
This blog is listed under Networks & IT Infrastructure Community