List of content you will read in this article:
VPNs provide secure communications in public Wi-Fi and ensure the security of sensitive information, especially for remote workers and businesses. However, the effectiveness of a VPN varies based on the protocol and provider. It is very important to choose a VPN that balances speed, security, and reliability to meet your specific needs. We like to introduce the PPTP VPNs and show you how to install PPTP VPN on CentOS 8.
What is a PPTP VPN?
VPN stands for Virtual Private Network and it is a crucial tool to protect network connection when you are using public networks. By hiding your IP address, VPN adds security, disguises the users’ true identity, and helps them to be anonymous. Many users download a VPN app or add an extension to their browsers. These apps are run by other companies; however, what if you could create your own VPN and have full control over it? Well, in this case, PPTP VPN is here to help you.
PPTP is the short form of Point-to-Point Tunneling Protocol and is a method to implement virtual privacy on your network. It was initially developed by companies like Microsoft, but now anyone can easily create a PPTP VPN on their own.
By creating a tunnel through the internet, PPTP can promise a secure exchange of data which is encapsulated in a PPP (Point-to-Point Protocol) frame and is then transmitted over this tunnel. For Encryption, these VPNs use MPPE (Microsoft Point-to-Point Encryption) to encrypt the data and support various authentication methods including PAP, CHAP, MS-CHAPv1, and MS-CHAPv2.
What are the advantages of PPTP VPN?
PPTP VPNs offer several advantages, some of which are mentioned down below:
1. Easy to Setup
Setting up a PPTP VPN is relatively easier than other VPNs. Moreover, PPTPs operate on their own and do not need any additional software.
2. Cost-Effective
As it was mentioned before, implementing PPTP does not need any additional software or hardware. As a result, PPTP VPNs are one of the most cost-effective solutions for you to secure your data.
3. Fast speed
PPTP is known for its fast connection speeds. Compared to most protocols like OpenVPN, PPTP requires less encryption and it results in quicker data transmission.
4. Compatibility
It does not matter which platforms or devices you use, Windows, macOS, Linux, Android, or iOS, PPTP will work on all platforms.
5. Accessibility
Finding resources and troubleshooting information for PPTP is easy since it is used widely.
Despite these advantages, it is important to know that PPTP has low security, especially in situations when strong encryption and high security are important. Therefore, PPTP is often used in cases where ease of setup and compatibility are more important than the highest level of security. These VPNs are suggested for personal or small businesses where simple remote access is needed. Due to its limitations, many organizations do not use PPTP. However, it is still an option for situations where simplicity and compatibility are prioritized.
Why Install PPTP VPN on CentOS 8?
CentOS 8 is a free and open-source version of the CentOS Linux distribution, which is downstream from Red Hat Enterprise Linux (RHEL). This version of CentOS provides a free platform and its main aim is to be functionally compatible with its upstream source which is Red Hat Enterprise Linux (RHEL) 8.
CentOS 8 is widely used in server environments, web hosting, development, and other scenarios where a stable and reliable enterprise-grade Linux distribution is required without the cost associated with RHEL.
Prerequisites before creating your PPTP VPN
Besides having some simple and basic Linux knowledge like how to use the command line and some tools, there is one thing you need to take into consideration.
To set up your PPTP VPN server, you will need a Virtual Private Server (VPS).
Need Affordable VPS Hosting
Starting From $5.99/Monthly
🏅 Fast Delivery
🏅 25+ Data Centers
Your VPS also must have something called “root access” which is a crucial part of installing PPTP VPN. Root access basically enables you to make big changes to the server and helps you install packages and change settings; therefore, you need to make sure you have this kind of access.
How to install PPTP VPN on CentOS 8
Installing a PPTP VPN is relatively easy. By the following 6 steps, you can easily install your own PPTP VPN:
Step 1: Install PPP packages
The first step to set up PPTP VPN is to install PPP by running this command:
cd /usr/local/src
If you are a 64-bit OS user, then use the following command:
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
And for For 32-bit OS use this one:
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
Step 2: Configure and Setup your PPTPD
Now it is time to edit your IP address and set it in /etc/pptpd.conf like this:
nano /etc/pptpd.conf
Then go to the /etc/ppp/options.pptpd and edit the settings and add or modify the lines to include your preferred DNS servers:
ms-dns 8.8.8.8
ms-dns 4.4.4.4
The purpose of this move is to add a DNS server to your VPN server.
Step 3: Create a user to access the VPN server
In this step, you need to Open the PPP chap-secrets file and add a user account in /etc/ppp/chap-secrets. Then assign a username and password with your desired credentials like the following:
nano /etc/ppp/chap-secrets
Step 4: Enable IP/network forwarding
Now open the sysctl configuration file because IP forwarding must help VPN route packets between the VPN clients and the outside world:
sudo v1 /etc/sysctl.conf
And add or modify the line:
nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
To change the sysctl.conf, run this command:
sysctl -p
After running this code, save and close the file. Then apply the changes with the following command:
sudo sysctl -p
This command will reserve the setting between system reboots.
Step 5: Setup ”iptables”
Now, you need to add the following IP-tables rules 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
The sixth and the last step is to start the server with this command:
service pptpd restart
chkconfig pptpd restart
By following these steps, you should be able to install and configure a PPTP VPN.
Conclusion
While PPTP VPN has advantages regarding ease of setup, speed, compatibility, cost-effectiveness, and accessibility, it is important to confront these benefits with its security limitations. Despite PPTP's lower encryption standards, for users who seek a quick, easy, and fast VPN for general browsing, streaming, or gaming, PPTP can be the best option. In this tutorial, we showed you how to install PPTP VPN on CentOS 8 which is one of the best approaches to secure your data on the Linux operating system.
Hello, everyone, my name is Lisa. I'm a passionate electrical engineering student with a keen interest in technology. I'm fascinated by the intersection of engineering principles and technological advancements, and I'm eager to contribute to the field by applying my knowledge and skills to solve real-world problems.