Difference between revisions of "Install VPN PPTPD on RHEL 7"
From Hawk Wiki
(→Build and Install) |
(→Install From Repo) |
||
Line 24: | Line 24: | ||
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm | rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm | ||
yum install pptpd | yum install pptpd | ||
+ | </pre> | ||
+ | ===Setup pptpd=== | ||
+ | See https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp | ||
+ | <pre> | ||
+ | vim /etc/pptpd.conf | ||
+ | # Add | ||
+ | localip 10.0.0.1 | ||
+ | remoteip 10.0.0.100-200 | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | vim /etc/ppp/pptpd-options | ||
+ | # Add | ||
+ | ms-dns 8.8.8.8 | ||
+ | ms-dns 8.8.4.4 | ||
+ | service pptpd restart | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | vim /etc/sysctl.conf | ||
+ | # Add | ||
+ | net.ipv4.ip_forward = 1 | ||
+ | |||
+ | #verify it's listening the port | ||
+ | netstat -alpn | grep 1723 | ||
+ | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save | ||
+ | iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT | ||
+ | iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT | ||
</pre> | </pre> |
Revision as of 05:10, 4 April 2015
Contents
Verify your RHEL version
# cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core)
Build and Install (Not working)
You can grab the latest release from http://sourceforge.net/projects/poptop/files/pptpd/
#Before doing this, make sure you installed Development Tools yum group install "Development Tools" yum install ppp ppp-devel wget http://downloads.sourceforge.net/project/poptop/pptpd/pptpd-1.4.0/pptpd-1.4.0.tar.gz tar -xvzf pptpd-1.4.0.tar.gz cd pptpd-1.4.0 ./configure make && make install
For some reason, this doesn't install pptpd.conf. I need to find alternatives.
Install From Repo
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm yum install pptpd
Setup pptpd
See https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp
vim /etc/pptpd.conf # Add localip 10.0.0.1 remoteip 10.0.0.100-200
vim /etc/ppp/pptpd-options # Add ms-dns 8.8.8.8 ms-dns 8.8.4.4 service pptpd restart
vim /etc/sysctl.conf # Add net.ipv4.ip_forward = 1 #verify it's listening the port netstat -alpn | grep 1723 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i ppp0 -o eth0 -j ACCEPT