Installing and configuring PPTP VPN on Centos 7
Add EPEL repository
[[email protected]]# yum install epel-release
Updating
[[email protected]]# yum update && yum upgrade
We put the software
[[email protected]]# yum install ppp pptpd nano
We edit the configuration file by adding at the very bottom
[[email protected]]# nano /etc/pptpd.conf
localip 10.10.0.1
remoteip 10.10.0.100-199
Editing the settings file by adding at the very bottom
[[email protected]]# nano /etc/ppp/options.pptpd
ms-dns 8.8.8.8
ms-dns 8.8.4.4
Add users
[[email protected]]# nano /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
username pptpd password *
Turn on forward
[[email protected]]# nano /etc/sysctl.conf:
net.ipv4.ip_forward = 1
Apply the change
[[email protected]]# sysctl -p
Editing the file, without this some sites will not load
[[email protected]]# nano /etc/ppp/ip-up
/sbin/ifconfig $1 mtu 1400
Adding firewall rules
[[email protected]]# nano /etc/firewalld/services/pptp.xml
[email protected]]# firewall-cmd --permanent --new-service=pptp
[[email protected]]# firewall-cmd --permanent --zone=public --add-service=pptp
[[email protected]]# firewall-cmd --permanent --zone=public --add-masquerade
[[email protected]]# firewall-cmd --reload
We start the service and add it to startup
[[email protected]]# systemctl start pptpd
[[email protected]]# systemctl enable pptpd.service