CentOS provides an PPTP solutions in the repository,
STEP 1. Install PPTP
sudo yum update sudo yum -y install pptp sudo modprobe nf_conntrack_pptp sudo modprobe ppp_mppe
STEP 2. Run sudo vi /etc/ppp/chap-secrets to edit the chap-secret file as shown below:
# Secrets for authentication using CHAP # client server secret IP addresses vpnusername PPTP vpnpassword *
Note that you should put space or tab between elements listed above.
STEP 3. Run sudo vi /etc/ppp/peers/linuxconfig and enter the following information. You can create your own name whatever instead of linuxconfig.
pty "pptp us-ded-6.dns2use.com -nolaunchpppd" name yourVPNusername remotename PPTP require-mppe-128 file /etc/ppp/options.pptp ipparam linuxconfig
STEP 4. Run sudo vi /etc/ppp/options.pptp to be sure there is no # sign before these lines.
lock noauth refuse-pap refuse-eap refuse-chap nobsdcomp nodeflate require-mppe-128
STEP 5. Run sudo vi /etc/ppp/ip-up.local and add the following line. By doing so, it will set the default to ppp0.
/sbin/route add default ppp0
In order to execute the file, run
sudo chmod 755 /etc/ppp/ip-up.local
STEP 6. Connect to the VPN by running sudo pppd call linuxconfig
- Run curl ipinfo.io to check the accuracy of your VPN IP and location
- To disconnect the VPN, run sudo pkill pppd
- If you are unable to connect, please check your connection logs by running sudo cat /var/log/messages | grep pppd