Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
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:

...

Note that you should put space or tab between elements listed above.


STEP 3. Run sudo vi /etc/ppp/peers/myvpnlinuxconfig and enter the following information. You can create your own name whatever instead of myvpnlinuxconfig.

Code Block
pty "pptp usca.pointtoserverus-ded-6.dns2use.com -nolaunchpppd"
name yourVPNusername
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam yourVPNNamelinuxconfig


STEP 4. Run sudo vi /etc/ppp/options.pptp to be sure there is no # sign before these lines.

Code Block
lock
noauth
refuse-pap
refuse-eap
refuse-chap
nobsdcomp
nodeflate
require-mppe-128


STEP 5. Run vi sudo vi /etc/ppp/ip-up.local and add the following line. By doing so, it will set the default to ppp0.

Code Block
/sbin/route add default ppp0

In order to execute the file, run

Code Block
sudo chmod 755 /etc/ppp/ip-up.local


STEP 6. Allow pptp to your firewall policy


Code Block
firewall-cmd --permanent --zone=public --add-port=1723/tcp
firewall-cmd --permanent --zone=public --add-port=1723/udp
firewall-cmd --reload



STEP 6. Connect to the VPN by running


Code Block
sudo pppd call linuxconfig


STEP 7. How do I check the accuracy of your VPN IP and location?

Code Block
curl ipinfo.io


If there is no change, please check your network interface by ifconfig - for example) ppp0 with the assigned IP address


STEP 8. How to disconnect the VPN

Code Block
sudo pkill pppd


STEP 9. Trouble shooting

If you are unable to connect, please check your connection logs by running

Code Block
sudo cat /var/log/messages | grep pppd


If you use firewalld with pptp, you will need to call following commands to add rules to firewalld

Code Block
sudo firewall-cmd --permanent --zone=public --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT
sudo firewall-cmd --permanent --zone=public --direct --add-rule ipv6 filter INPUT 0 -p gre -j ACCEPT
sudo firewall-cmd --permanent --zone=public --add-masquerade
sudo firewall-cmd --reload


https://supportwww.purevpnlightning-ashe.com/command-line-setup-in-linux-centosdevelop/setup-pptp-server-on-centos/

https://linuxconfig.org/how-to-establish-pptp-vpn-client-connection-on-centos-rhel-7-linux