A VPN, or a Virtual Private Network, is a special connection kind. It is used to make connections to public and private networks safe. VPNs are also used by companies to send sensitive data. VPNs are also applied widely by individual users in the location where some internet content is restricted.
When you use a VPN, your IP address is hidden. Instead, on the web, the IP address that your VPN provider gives. Thus, it is impossible to identify from where you are connecting to the service.
PPTP (Point-to-Point Tunneling Protocol) is a special protocol used for VPN. It ensures communication between the VPN server and the VPN client.
You can use it for CentOS Linux, too. Thus, we will check how to install PPTP VPN on CentOS 8.
It all starts with the PPTP installation. For that, execute the following command:
Now, set it up:
Move to /etc/pptpd.conf and edit your IP:
Now, move to /etc/ppp/options.pptpd and edit the settings:
Set up the user. With it, you will access your VPN.
For that, move to /etc/ppp/chap-secrets, add there your user, and assign a password to it:
Move to /etc/sysctl.conf. Enable network forwarding.
Now, it is time to move to the iptables installation.
Open the correct ports and forwarding of data packets by adding the following iptables rules:
Start the VPN server.
Now, your VPN is installed on CentOS.