Welcome to VPNLIVE.NET


Setting up VPN (pptp) for Linux

Posted 08/17/2009 - 10:37 by VPNMaster

Setup PPTP VPN on linux instruction, which works in almost all kind of linux.
1. Installation

For the installation PPTP of client under Linux it is necessary to establish the program of pptpclient. The source code  can be downloaded from the  SourceForge (file pptp-linux-1.0.3-1.tar.gz).
You can search it in your distribution, or (for RPM-based systems) to rpmfind.net.
For the installation of binary packet be guided by documentation on your package manager.
For the installation from the source texts unpack archive by the following commands:

$ Tar-xzf pptp-linux-1.0.3-1.tar.gz
$ Cd pptp-linux-1.0.3-1
$ Tar-xzf pptp-linux-1.0.3.tar.gz
$ Patch-p0 <../pptp-linux-1.0.3.diff
$ Cd pptp-linux-1.0.3

To build the PPTP , you need the pptp program gcc and make. Now type
$ Make

You must create two files - pptp and pptp_callmgr.
Copy them to the directory / usr / local / sbin /.
Note:
Also, you should have installed pppd (8), it must be included with the
distribution. In the nucleus should also include support for PPP.

2. Setting

The file / etc / ppp / options should be along the following lines:

name
remotename vpn
defaultroute
noipdefault
noauth
asyncmap 0
crtscts
lock
hide-password
local
noproxyarp
lcp-echo-interval 30
lcp-echo-failure 4
noipx

where - the username for authentication on the VPN server.

The file / etc / ppp / chap-secrets should contain the line:

vpn

where - the username for authentication on the VPN server, and - password.
IMPORTANT: If you are not in the same segment with the IP VPN server, before setting
connections in the routing table must be prescribed route to the VPN server.
This can be done by running the command:

/ sbin / route add-host gw

where - IP address of VPN server as well - a gateway, available at
you to set the PPTP connection.

3. Starting and Stopping

Connecting to a VPN server with command line, start it  with administrator privileges:

# / Usr / local / sbin / pptp

where - IP address of VPN server.
If successful, connect to create an interface pppX, where X - number. Through this interface
and goes all the traffic.

Breaking the connection can send a signal TERM (15) command kill (1) process pppd.
# killall of pppd