31
loading...
This website collects cookies to deliver better user experience
# Installation of PPTP client
apt-get update
apt-get upgrade
apt-get autoclean
apt-get install pptp-linux
# options set-up
cd /etc/ppp/
vim options
# --------- options ---------
# Lock the port
lock
# We don't need the tunnel server to authenticate itself
noauth
# Turn off compression protocols we know won't be used
nobsdcomp
nodeflate
# We won't do PAP, EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2
# (you may need to remove these refusals if the server is not using MPPE)
refuse-pap
refuse-eap
refuse-chap
refuse-mschap
# --------- options ---------
# chap-secrets set-up
chmod 0600 /etc/ppp/chap-secrets
vim /etc/ppp/chap-secrets
# --------- chap-secrets ---------
# Secrets for authentication using CHAP
# client server secret IP addresses
<username> PPTP <password> *
# --------- chap-secrets ---------
# username and password are your VPN login name and password set in the PPTP server via your router
# remember to use double quote for both of your username and password
# giving name for your vpn connection
touch /etc/ppp/peers/vpn # I want my vpn connection called "vpn"
vim /etc/ppp/peers/vpn
# --------- tunnel ---------
pty "pptp <server> --nolaunchpppd"
name <username>
remotename PPTP
require-mppe-128
file /etc/ppp/options
ipparam <tunnel>
# --------- tunnel ---------
# server means the remote address of the VPN server (I used my own public IP)
# tunnel means the name of the connection, which is "vpn" in this example
# remember to use double quote for both of your username
# Connect
sudo pon vpn # start PPTP VPN connection4
# Check
ip addr
# you should see a ppp0 interface with a subnet address
# ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1446 qdisc fq_codel state UNKNOWN group default qlen 3
# link/ppp
# inet 192.168.10.9 peer 192.168.1.1/32 scope global ppp0
# valid_lft forever preferred_lft forever
# Disconnect
sudo poff vpn # turn off the PPTP VPN connection
# Route all the traffic with a destination of 192.168.10. through ppp0 interface
ip route add 192.168.10.0/24 dev ppp0
31