{"id":13,"date":"2017-09-05T14:54:00","date_gmt":"2017-09-05T14:54:00","guid":{"rendered":""},"modified":"2021-02-22T01:13:56","modified_gmt":"2021-02-22T01:13:56","slug":"installing-pptp-on-centos-7-openvz","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2017\/09\/installing-pptp-on-centos-7-openvz.html","title":{"rendered":"Installing PPTP on CentOS 7 OpenVZ"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<p>&nbsp;<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/09\/pptp.jpg\"><img decoding=\"async\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/09\/pptp.jpg\" border=\"0\" data-original-height=\"263\" data-original-width=\"295\" \/><\/a><\/div>\n<p>Although PPTP is not the most secure VPN, it&#8217;s easy to setup and use.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Make sure PPTP is enabled on the server<\/h2>\n<p>Run the below command<\/p>\n<pre>cat \/dev\/ppp<\/pre>\n<p>If you get the below, it means it&#8217;s enabled<\/p>\n<pre>cat: \/dev\/ppp: No such device or address<\/pre>\n<p><a name=\"more\"><\/a><br \/>\nIf you don&#8217;t see that message, you will have to enable it, usually from SolusVM from your host control panel. Or you can ask your host.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Login to your server as root<\/h2>\n<p>Install Latest EPEL Release<\/p>\n<pre>rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/pre>\n<p>Install PPTPD<\/p>\n<pre>yum -y install ppp pptpd<\/pre>\n<p>Configure IP Ranges<br \/>\nOpen\u00a0 \/etc\/pptpd.conf<\/p>\n<pre>vi \/etc\/pptpd.conf<\/pre>\n<p>And add at the end the 2 following lines:<\/p>\n<pre>localip 10.10.0.1 \r\nremoteip 10.10.0.100-199<\/pre>\n<p>Configure DNS<br \/>\nOpen \/etc\/ppp\/options.pptpd<\/p>\n<pre>vi etc\/ppp\/options.pptpd<\/pre>\n<p>And add at the end of the file<\/p>\n<pre>ms-dns 8.8.8.8 \r\nms-dns 8.8.4.4<\/pre>\n<p>Add Username &amp; Password<br \/>\nOpen \/etc\/ppp\/chap-secrets<\/p>\n<pre>vi \/etc\/ppp\/chap-secrets<\/pre>\n<p>Add the below<\/p>\n<pre>USERNAME pptpd PASSWORD *<\/pre>\n<p>Where USERNAME is a username of your choice and PASSWORD is a password of your choice<\/p>\n<p>Setup IPv4 Forward<br \/>\nOpen \/etc\/sysctl.conf<\/p>\n<pre>vi \/etc\/sysctl.conf<\/pre>\n<p>Add or change the below to 1<\/p>\n<pre>net.ipv4.ip_forward = 1<\/pre>\n<p>Save &amp; Exit and run the following command for the changes to take effect<\/p>\n<pre>sysctl -p<\/pre>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Configure Firewalld<\/h2>\n<p>Add the below to Firewalld<\/p>\n<pre>firewall-cmd --permanent --zone=public --add-service=pptp\r\nfirewall-cmd --permanent --zone=public --add-masquerade\r\nfirewall-cmd --reload<\/pre>\n<h2 style=\"text-align: left;\">Start &amp; Enable on Startup<\/h2>\n<p>Start PPTD<\/p>\n<pre>systemctl start pptpd<\/pre>\n<p>Enable at startup<\/p>\n<pre>systemctl enable pptpd.service<\/pre>\n<p><b>Questions or comments? Leave them below!<\/b><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Although PPTP is not the most secure VPN, it&#8217;s easy to setup and use. &nbsp; Make sure PPTP is enabled on the server Run the below command cat \/dev\/ppp If you get the below, it means it&#8217;s enabled cat: \/dev\/ppp: No such device or address If you don&#8217;t see that message, you will have [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17,16,18,15],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-centos","category-openvz","category-pptp","category-vpn"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":2,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/13\/revisions\/387"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}