۵۰٪ تخفیف روی همه پلان‌ها، محدود. شروع از $2.48/mo
4 min left
Security & Networking

How to install PPTP VPN on CentOS 8 (Step by step guide)

Matt Schmitt By Matt Schmitt 4 min read Updated Apr 15, 2023
install PPTP VPN on CentOS 8

In this tutorial, we will tell you how to install PPTP VPN on CentOS 8. You know, PPTP stands for Point to Point Tunneling Protocol. This is a traditional protocol for implementing VPS networks. A Virtual Private Network (VPN) is a connection method used to add security and privacy to private and public networks, like WiFi Hotspots and the Internet.

Most of the time, corporations will utilize VPN to protect sensitive data. Or, ordinary web users will use them in parts of the world where there are government restrictions on internet content.

Privacy is increased with a Virtual Private Network because the user’s initial IP address is replaced with one from the Virtual Private Network provider.

In other words, when you use a VPN, your IP address is hidden to give you more security and protection. It also helps you to surf those blocked and banned websites you wish to visit.We review all server options in our detailed article about best VPS for VPN.

What does Point-to-point tunneling mean?

how to install PPTP VPN on centOS

PPTP (Point-to-Point Tunneling Protocol) is a VPN protocol used to ensure proper communications between a VPN client and a VPN server. It also is available for CentOS Linux. PPTP is a free and open-source (community-supported) enterprise operating system, compatible with its upstream source Red Hat Enterprise Linux, from the CentOS Project.

Administrators rarely use PPTP as a stable protocol. But, its implementation is easier and straightforward on CentOS Linux. IF you need this configuration and setup, this article is suitable to read. In this article, we will describe how to install PPTP VPN on CentOS 8

centos-vps The Ultimate Minimal Server

Get CentOS 7 or CentOS 8 on your Cloudzy CentOS VPS and run an efficient Linux-based server with minimal resource consumption.

Get a CentOS VPS

How to set up and install a PPTP VPN on CentOS 8

Step 1: Install PPP

Installing PPTP completely depends on PPP and PPTPD packages. To do so, first, install the related package and then configure it to initiate configuration. Use the following commands one by one:

yum install ppp iptables nano
cd /usr/local/src

For 64-bit OS:

wget    http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.x86_64.rpm
rmp -Uhv pptpd-1.4.0-1.el6.x86_64.rpm

For 32-bit OS:

wget    http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.i686.rpm
rmp -Uhv pptpd-1.4.0-1.el6.i686.rpm

Also Read: Listing and Deleting Linux Iptables Rules

Step 2: Configure and Setup your PPTPD

Edit IP settings in: /etc/pptpd.conf as shown in the following:

nano /etc/pptpd.conf

Edit the following settings to /etc/ppp/options.pptpd:

ms-dns 8.8.8.8
ms-dns 4.4.4.4

Step 3: Create a user to access the VPN server

Add user account in/etc/ppp/chap-secrets (assign username and password) like the following:

nano /etc/ppp/chap-secrets

Step 4: Enable IP/network forwarding

We need IP forwarding to help VPN route packets between the VPN clients and the outside world. Therefore, the VPN server will become a router:

sudo v1 /etc/sysctl.conf

Now, add the following line:

nano /etc/sysctl.conf
net.ipv4.ip_forward = 1

To make the changes to sysctl.conf take effect, use the following command:

sysctl -p

Step 5: Setup ”iptables”

Now, you need to add the following IP-tables rules in order to open the correct ports and properly forward the data packets:

iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i eth0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Step 6: Start VPN server

service pptpd restart
chkconfig pptpd restart

Congratulations. You have successfully installed a PPTP VPN on your CentOS! these steps will help you to configure the PPTP VPN in a non-GUI way. using these Linux commands, you can easily configure,  connect, or even disconnect the PPTP VPN. As you know, there are other self-hosted VPN options too. We have another detailed guide for installing OpenVPN Client on VPS. Among other protocols like IKEv2, L2TP and PPTP, OpenVPN may be the one that is tailored for VPN use case.

Conclusion

In this series of VPS technologies tutorials, we showed you how to install PPTP VPN on CentOS 8 Linux or CentOS VPS. PPTP protocol does not describe authentication or encryption. Therefore, most of the administrators avoid using that. But it is very straightforward in CentOS distribution.

The intended use of PPTP is to provide similar levels of protection, security, and remote access as typical VPN products. You can use the PPTP control channel over the TCP and a GRE  tunnel operating to encapsulate the PPP packets and give them more security and protection. 

Share

More from the blog

Keep reading.

A Cloudzy title image for a MikroTik L2TP VPN guide, showing a laptop connecting to a server rack via a glowing blue and gold digital tunnel with shield icons.
Security & Networking

MikroTik L2TP VPN Setup (with IPsec): RouterOS Guide (2026)

In this MikroTik L2TP VPN setup, L2TP handles the tunneling while IPsec handles encryption and integrity; pairing them gives you native client compatibility without third-party age

Rexa CyrusRexa Cyrus 9 min read
Terminal window displaying SSH warning message about remote host identification change, with Fix Guide title and Cloudzy branding on dark teal background.
Security & Networking

Warning: Remote Host Identification Has Changed & How to Fix It

SSH is a secure network protocol that creates an encrypted tunnel between systems. It remains popular with developers who need remote access to computers without requiring a graphi

Rexa CyrusRexa Cyrus 10 min read
DNS server troubleshooting guide illustration with warning symbols and blue server on dark background for Linux name resolution errors
Security & Networking

Temporary Failure in Name Resolution: What Does it Mean & How to Fix It?

While using Linux, you might encounter a temporary failure in name resolution error when trying to access websites, update packages, or execute tasks requiring an internet connecti

Rexa CyrusRexa Cyrus 12 min read

Ready to deploy? از ۲٫۴۸ دلار در ماه.

Independent cloud, since 2008. AMD EPYC, NVMe, 40 Gbps. 14-day money-back.