{"id":37,"date":"2013-11-25T22:59:46","date_gmt":"2013-11-25T22:59:46","guid":{"rendered":"http:\/\/etapien.com\/guides\/?p=37"},"modified":"2020-08-24T14:22:37","modified_gmt":"2020-08-24T19:22:37","slug":"how-to-install-pptpd-on-centos-vps","status":"publish","type":"post","link":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/","title":{"rendered":"How to install PPTPD on CentOS VPS"},"content":{"rendered":"<p>Here is a very straight forward script that will install PPTPD on CentOS in no time:<\/p>\n<blockquote><p>wget http:\/\/etapien.com\/scripts\/pptpd6.sh<\/p>\n<p>chmod +x pptpd6.sh<\/p>\n<p>.\/pptpd6.sh<\/p><\/blockquote>\n<p>This is basically it, the script should give you a username and password (randomly generated) at the end, and it only takes a few seconds to install.<\/p>\n<p>Here is the complete script if you&#8217;re curious to know how it does it:<\/p>\n<blockquote><p>yum remove -y pptpd ppp<br \/>\niptables &#8211;flush POSTROUTING &#8211;table nat<br \/>\niptables &#8211;flush FORWARD<br \/>\nrm -rf \/etc\/pptpd.conf<br \/>\nrm -rf \/etc\/ppp<\/p>\n<p>arch=`uname -m`<br \/>\nwget http:\/\/poptop.sourceforge.net\/yum\/stable\/packages\/pptpd-1.4.0-1.el6.$arch.rpm<\/p>\n<p>yum -y install make libpcap iptables gcc-c++ logrotate tar cpio perl pam tcp_wrappers dkms kernel_ppp_mppe ppp<br \/>\nrpm -Uvh pptpd-1.4.0-1.el6.$arch.rpm<br \/>\nmknod \/dev\/ppp c 108 0<br \/>\necho 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\necho &#8220;mknod \/dev\/ppp c 108 0&#8221; &gt;&gt; \/etc\/rc.local<br \/>\necho &#8220;echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward&#8221; &gt;&gt; \/etc\/rc.local<br \/>\necho &#8220;localip 172.16.36.1&#8221; &gt;&gt; \/etc\/pptpd.conf<br \/>\necho &#8220;remoteip 172.16.36.2-254&#8221; &gt;&gt; \/etc\/pptpd.conf<br \/>\necho &#8220;ms-dns 8.8.8.8&#8221; &gt;&gt; \/etc\/ppp\/options.pptpd<br \/>\necho &#8220;ms-dns 8.8.4.4&#8221; &gt;&gt; \/etc\/ppp\/options.pptpd<\/p>\n<p>pass=`openssl rand 6 -base64`<br \/>\nif [ &#8220;$1&#8221; != &#8220;&#8221; ]<br \/>\nthen pass=$1<br \/>\nfi<\/p>\n<p>echo &#8220;vpn pptpd ${pass} *&#8221; &gt;&gt; \/etc\/ppp\/chap-secrets<\/p>\n<p>iptables -t nat -A POSTROUTING -s 172.16.36.0\/24 -j SNAT &#8211;to-source `ifconfig | grep &#8216;inet addr:&#8217;| grep -v &#8216;127.0.0.1&#8217; | cut -d: -f2 | awk &#8216;NR==1 { print $1}&#8217;`<br \/>\niptables -A FORWARD -p tcp &#8211;syn -s 172.16.36.0\/24 -j TCPMSS &#8211;set-mss 1356<br \/>\nservice iptables save<\/p>\n<p>chkconfig iptables on<br \/>\nchkconfig pptpd on<\/p>\n<p>service iptables start<br \/>\nservice pptpd start<\/p>\n<p>echo &#8220;VPN service is installed, your VPN username is vpn, VPN password is ${pass}&#8221;<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p>A good place to get a VPS and use as a PPTPD would be <a href=\"http:\/\/www.owned-networks.net\" target=\"_blank\" rel=\"noopener noreferrer\">www.owned-networks.net<\/a><br \/>\ncheck them out!<\/p>\n<p>This has made my life easier and just to clarify; I didn&#8217;t come up with this idea, it was already out there but I found it broken, so I thought i&#8217;d fix it and make it available for everyone.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a very straight forward script that will install PPTPD on CentOS in no time.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[20,21,19,22],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install PPTPD on CentOS VPS - Tech Howtos<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install PPTPD on CentOS VPS - Tech Howtos\" \/>\n<meta property=\"og:description\" content=\"Here is a very straight forward script that will install PPTPD on CentOS in no time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Howtos\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-25T22:59:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-24T19:22:37+00:00\" \/>\n<meta name=\"author\" content=\"Etapien\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etapien\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/\",\"url\":\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/\",\"name\":\"How to install PPTPD on CentOS VPS - Tech Howtos\",\"isPartOf\":{\"@id\":\"https:\/\/etapien.com\/guides\/#website\"},\"datePublished\":\"2013-11-25T22:59:46+00:00\",\"dateModified\":\"2020-08-24T19:22:37+00:00\",\"author\":{\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\"},\"breadcrumb\":{\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/etapien.com\/guides\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install PPTPD on CentOS VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/etapien.com\/guides\/#website\",\"url\":\"https:\/\/etapien.com\/guides\/\",\"name\":\"Tech Howtos\",\"description\":\"Tech related useful howtos\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/etapien.com\/guides\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\",\"name\":\"Etapien\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"caption\":\"Etapien\"},\"url\":\"https:\/\/etapien.com\/guides\/author\/Etapien\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install PPTPD on CentOS VPS - Tech Howtos","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/","og_locale":"en_US","og_type":"article","og_title":"How to install PPTPD on CentOS VPS - Tech Howtos","og_description":"Here is a very straight forward script that will install PPTPD on CentOS in no time.","og_url":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/","og_site_name":"Tech Howtos","article_published_time":"2013-11-25T22:59:46+00:00","article_modified_time":"2020-08-24T19:22:37+00:00","author":"Etapien","twitter_misc":{"Written by":"Etapien","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/","url":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/","name":"How to install PPTPD on CentOS VPS - Tech Howtos","isPartOf":{"@id":"https:\/\/etapien.com\/guides\/#website"},"datePublished":"2013-11-25T22:59:46+00:00","dateModified":"2020-08-24T19:22:37+00:00","author":{"@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424"},"breadcrumb":{"@id":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/etapien.com\/guides\/how-to-install-pptpd-on-centos-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/etapien.com\/guides\/"},{"@type":"ListItem","position":2,"name":"How to install PPTPD on CentOS VPS"}]},{"@type":"WebSite","@id":"https:\/\/etapien.com\/guides\/#website","url":"https:\/\/etapien.com\/guides\/","name":"Tech Howtos","description":"Tech related useful howtos","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/etapien.com\/guides\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424","name":"Etapien","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","caption":"Etapien"},"url":"https:\/\/etapien.com\/guides\/author\/Etapien\/"}]}},"_links":{"self":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/37"}],"collection":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":8,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/37\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}