I recently installed CentOS 7 (GNOME), but I realized that there is no option for setting up a PPTP VPN client.

I tried to install networkmanager-pptp-gnome, but unfortunately it's not available in EPEL nor CentOS repository.

How can I add PPTP VPN to CentOS?


  • can you teach me to add IPsec based VPN. I am in trouble with this. Thanks. Commented Jan 17, 2015 at 2:50

3 Answers 3


What do you get from a: yum search pptp ppp is it anything like:

[root@localhost src]# yum search pptp ppp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.openitc.uk
 * extras: centos.hyve.com
 * updates: centos.openitc.uk
===================================================================== N/S matched: pptp ======================================================================
pptp.x86_64 : Point-to-Point Tunneling Protocol (PPTP) Client
pptp-setup.x86_64 : PPTP Tunnel Configuration Script
pptpd.x86_64 : PoPToP Point to Point Tunneling Server

====================================================================== N/S matched: ppp ======================================================================
ppp-devel.i686 : Headers for ppp plugin development
ppp-devel.x86_64 : Headers for ppp plugin development
rp-pppoe.x86_64 : A PPP over Ethernet client (for xDSL support).
ppp.x86_64 : The Point-to-Point Protocol daemon
wvdial.x86_64 : A heuristic autodialer for PPP connections

  Name and summary matches mostly, use "search all" for everything.
[root@localhost src]#

If it is, then simply type: yum install ppp pptp pptp-setup -y

If not simply manually pull the required packages (there are no specific rhel7 builds on poptop at present, so the fc20 will probably suffice) e.g.

cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/ppp-2.4.5-33.0.fc20.x86_64.rpm
wget http://poptop.sourceforge.net/yum/stable/packages/pptp-release-4-7.fc20.noarch.rpm
rpm -Uhv ppp-2.4.5-33.0.fc20.x86_64.rpm pptp-release-4-7.fc20.noarch.rpm

Then, fill in the blanks and paste the lot into a shell prompt:


modprobe ppp_mppe

mv /etc/ppp/peers/pptpserver /etc/ppp/peers/pptpserver.bak
cat > /etc/ppp/peers/pptpserver <<EOF
pty "pptp $vpnServer --nolaunchpppd"
name $yourUsername
password $yourPassword
remotename PPTP

chmod 600 /etc/ppp/peers/pptpserver
restorecon -Rv /etc/ppp/peers

Finally start a connection:

pppd call pptpserver

At the moment the NetworkManager-pptp EPEL packages are version 1.1.0 & do not work with the current version of NetworkManager in Centos7.

Rebuilding the Fedora package works without issue:

Download the current master & extract the archive

cd /path/to/NetworkManager-pptp-master
sudo yum install ppp-devel libnma-devel libsecret-devel
spectool -g -R *.spec
rpmbuild -ba *.spec

This creates:

Wrote: /home/stuart/rpmbuild/SRPMS/NetworkManager-pptp-1.2.6-2.el7.src.rpm
Wrote: /home/stuart/rpmbuild/RPMS/x86_64/NetworkManager-pptp-1.2.6-2.el7.x86_64.rpm
Wrote: /home/stuart/rpmbuild/RPMS/x86_64/NetworkManager-pptp-gnome-1.2.6-2.el7.x86_64.rpm
Wrote: /home/stuart/rpmbuild/RPMS/x86_64/NetworkManager-pptp-debuginfo-1.2.6-2.el7.x86_64.rpm
  • Install NetworkManager-pptp first then NetworkManager-pptp-gnome

Adding a pptp VPN

Kernel modules also need to be configured:

modprobe nf_nat_pptp            
modprobe nf_conntrack_pptp
echo nf_nat_pptp > /etc/modules-load.d/pptp.conf
echo nf_conntrack_pptp >> /etc/modules-load.d/pptp.conf

Here is how I set VPN up on my CentOS:

1- I've installed PPTPD as follows:

yum install ppp
cd /usr/local/src
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.x86_64.rpm
rpm -Uhv pptpd-1.3.4-2.rhel5.x86_64.rpm

2- I've edited IP setttings in /etc/pptpd.conf:

vi /etc/pptpd.conf



3- I've added user account in/etc/ppp/chap-secrets (assign username and password):

vi /etc/ppp/chap-secrets

usernameForuser1 * setpassword1here *

usernameForuser2 * setpassword2here *

4- I've enabled network forwarding in /etc/sysctl.conf:

vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

use the following command to apply the change:

sysctl -p

5- Configured firewall

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
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
service iptables save
service iptables restart

6- Started PPTP VPN server

service pptpd restart

To start PPTP Daemon automatically when rebooting next time, use command:

chkconfig pptpd on

The log of the VPN server, by default, is combined with system log located at /var/log/messages

  • Are you sure you did the above on a bare Centos 7 box, as Centos 7 uses Firewalld, rather than iptables, as it's default firewall, and I suspect your Redhat 5 package (pptpd-1.3.4-2.rhel5.x86_64.rpm) may have a few dependency issues, such as the lack of a libbsd build.
    – arober11
    Commented Aug 18, 2014 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .