-
Install PPTP Client
sudo apt-get install pptp-linux
- RHEL/CentOS/Fedora
sudo yum install pptp
-
Modify chap-secrets
/etc/ppp/chap-secrets
and add the below line (replacing variables)
$USERNAME PPTP $PASSWORD *
-
Create a config file named
vpn.domain.com
in the directory /etc/ppp/peers
, and add (replacing variables)
pty "pptp $VPN_SERVER --nolaunchpppd"
name $USERNAME
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam vpn.domain.com
-
Register the
ppp_mppe
kernel module
sudo modprobe ppp_mppe
*Note that on a VPS, you will need to enable PPP through the VPS console.
-
Validate that the following options in
/etc/ppp/options.pptp
are not commented
lock
noauth
refuse-pap
refuse-eap
refuse-chap
nobsdcomp
nodeflate
require-mppe-128
-
Edit
/etc/pppp/ip-up.d/route-traffic
and add the following route
#!/bin/bash
NET="192.168.0.0/16" #< Modify according to your environment
IFACE="ppp0" #< Modify according to your environment
#IFACE=$1
route add -net ${NET} dev ${IFACE}
-
Connect to the VPN server
-
Verify that the interface is up
[root@localhost ppp]# ip a | grep ppp
19: ppp0: mtu 1488 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp
inet 198.23.230.10 peer 10.255.254.0/32 scope global ppp0
- If the server will not start, look in
/var/log/messages
for errors from pppd
No comments: