How to setup PPTP VPN server on CentOS 7 הדפסה

  • 95

PPTP is a VPN (Virtual Private Network) internet protocol that is used to connect computers across different networks. It allows computers to see each others as if they were connected together within a local network. VPN servers are often used to access the Internet through a remote network such as a datacenter's network in order to unblock censored websites. Using VPN server while maintaining security and privacy on the Internet.

A VPN server can be configured on a Cloud VPS with minimum resources. Below instructions will guide you through installing and configuring PPTP VPN server.

1. Install EPEL Repository

yum -y install epel-release

2. Install Poptop and required packages

yum -y install ppp pptpd net-tools iptables-services

3. Edit /etc/ppp/options.pptpd to make it look like below:

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4′

4. Edit /etc/pptpd.conf to look like below:

option /etc/ppp/options.pptpd
logwtmp
localip 10.0.10.1
remoteip 10.0.10.2-254′

5. Enable IP Forwarding:
Run the following command to enable IP forwarding:

echo net.ipv4.ip_forward = 1 >> /etc/sysctl.conf

To verify run the following command.

sysctl -p
You will get output similar to:

net.ipv4.ip_forward = 1

net.ipv4.ip_forward should have the value 1.

6. Enable IP Masquerade

iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE
iptables-save

7. Add/Edit PPTP Users:
You can add or edit VPN users by editing /etc/ppp/chap-secrets. It contains user and password pairs in each line.

8. Start and enable Poptop

systemctl enable pptpd
systemctl start pptpd-


?האם התשובה שקיבלתם הייתה מועילה

« חזרה