Setup PPTP Server on CentOS

Setup PPTP VPN Server on CentOS7 with Firewalld

Setup pptp, pptpd

rpm -i
yum -y install pptpd

VPN IP config
vi /etc/pptpd.conf


Add VPN User
vi /etc/ppp/chap-secrets

# client        server  secret                  IP addresses
userName       pptpd   userPassword       *

Add DNS Server and disable mppe-128
vi /etc/ppp/options.pptpd


Service pptpd restart

service pptpd restart

Setup forwarding

net.ipv4.ip_forward = 1

Firewalld configuration

firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -i eth0 -p tcp --dport 1723 -j ACCEPT 
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT 
firewall-cmd --permanent --direct --add-rule ipv4 filter POSTROUTING 0 -t nat -o eth0 -j MASQUERADE 
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i ppp+ -o eth0 -j ACCEPT 
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i eth0 -o ppp+ -j ACCEPT
firewall-cmd --reload

Add Service

systemctl start pptpd
systemctl enable pptpd.service

How To Setup Your Own VPN With PPTP
How To Install PPTP VPN On Centos 7
Centos 7 安装 pptp vpn
PPTP VPN in CentOS 7
Redhat / Centos 7 Firewalld best practice for pptp or L2TP/IPsec rules


Leave a Reply