{"id":522,"date":"2019-06-01T11:24:54","date_gmt":"2019-06-01T11:24:54","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/24x7serversupport-blog\/?p=522"},"modified":"2019-06-01T11:24:54","modified_gmt":"2019-06-01T11:24:54","slug":"setup-pptp-on-centos-ubuntu-debian-and-fedora","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/","title":{"rendered":"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)?"},"content":{"rendered":"\n<p>This howto describes the steps in how to setup a PPTP VPN on Centos, Fedora, Debian, and Ubuntu with basic RSA authentication.&nbsp;<br \/><br \/><strong>Before the installation make sure to have your Yum repos updated with the Epel repos.<\/strong><br \/><br \/><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CentOS and Red Hat Enterprise Linux 5.x<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"> wget\u00a0<a href=\"http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/x86_64\/epel-release-5-4.noarch.rpm\">http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/x86_64\/epel-release-5-4.noarch.rpm<\/a>\u00a0&amp;&amp;\u00a0sudo rpm -Uvh epel-release-5*.rpm <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">CentOS and Red Hat Enterprise Linux 6.x<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"> wget <a href=\"http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\">http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/a> &amp;&amp; sudo rpm -Uvh epel-release-6*.rpm<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">CentOS and Red Hat Enterprise Linux 7.x<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"> wget\u00a0<a href=\"http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-7-5.noarch.rpm\">http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-7-5.noarch.rpm<\/a>\u00a0&amp;&amp; sudo rpm -Uvh epel-release-7*.rpm <\/pre>\n\n\n\n<p><strong>Step 1. Install PPTPD<\/strong><\/p>\n\n\n\n<p><strong>CentOS\/RedHat 6<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <code>yum install pptpd.x86_64 -y<\/code><\/pre>\n\n\n\n<p><strong>Ubuntu\/Debian<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <code>apt-get install pptpd<\/code><\/pre>\n\n\n\n<p><strong>Step 2. Edit IP setttings in \/etc\/pptpd.conf<\/strong><\/p>\n\n\n\n<p>\n\necho &gt; \/etc\/pptpd.conf<\/p>\n\n\n\n<p>paste the following content into the pptpd.conf file\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> #start of custom file #logwtmp option \/etc\/ppp\/options.pptpd localip 192.168.0.1   # local vpn IP  remoteip 192.168.0.100-200  # ip range for connections listen 23.216.x.x # eth0 my example public IP and network interface #end of custom file <\/pre>\n\n\n\n<p><strong>Step 3. Add user account in\/etc\/ppp\/chap-secrets\u00a0<\/strong>(assign username and password)<\/p>\n\n\n\n<p><code>vi \/etc\/ppp\/chap-secrets<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> usernameForuser1 * \u00a0setpassword1here \u00a0*\nusernameForuser2 * \u00a0setpassword2here \u00a0*<\/pre>\n\n\n\n<p><strong>Step 4. Optional settings in \/etc\/ppp\/options.pptpd<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> echo > \/etc\/ppp\/options.pptpd<\/pre>\n\n\n\n<p> Paste the following to your options.pptp<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> #custom settings for a simple fast pptp server ms-dns 8.8.8.8 ms-dns 4.2.2.2 lock name pptpd require-mschap-v2 # Require MPPE 128-bit encryption # (note that MPPE requires the use of MSCHAP-V2 during authentication)  require-mppe-128 <\/pre>\n\n\n\n<p><strong>Step 5. Enable network forwarding in\u00a0\/etc\/sysctl.conf<\/strong><\/p>\n\n\n\n<p><code>vi \/etc\/sysctl.conf<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> net.ipv4.ip_forward = 1<\/pre>\n\n\n\n<p>use the following command to apply the change:<\/p>\n\n\n\n<p><strong><code>sysctl -p<\/code><\/strong><\/p>\n\n\n\n<p><strong>Step 6. Configure firewall<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <code>iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT<\/code>\n<code>iptables -A INPUT -i eth0 -p gre -j ACCEPT<\/code>\n<code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<\/code>\n<code>iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT<\/code>\n<code>iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT<\/code>\n<code>service iptables save<\/code>\n<code>service iptables restart<\/code><\/pre>\n\n\n\n<p><strong>Step6-Ubuntu\/Debian<\/strong>: Firewall\u00a0<\/p>\n\n\n\n<p>apt-get install iptables-persistent<br \/>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &amp;&amp; \/etc\/init.d\/iptables-persistent save<br \/>iptables -A INPUT -i eth0 -p tcp &#8211;dport 1723 -j ACCEPT &amp;&amp; iptables -A INPUT -i eth0 -p gre -j ACCEPT &amp;&amp; iptables -A INPUT -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<\/p>\n\n\n\n<p><strong>Step 7. Start PPTP VPN server<\/strong><\/p>\n\n\n\n<p><strong>Centos\/Fedora:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <code>\/etc\/init.d\/pptpd restart-kill &amp;&amp;\u00a0\/etc\/init.d\/pptpd start<\/code>\n<\/pre>\n\n\n\n<p><strong>Fedora\/Debian<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> service pptpd restart\n<\/pre>\n\n\n\n<p> Note: To avoid starting pptp on every reboot you can automated by running\u00a0<strong>chkconfig pptp on<\/strong><\/p>\n\n\n\n<p>Now you can test the VPN server from any client: Windows PCs, Linux PCs, Android phones\/tablets, or&nbsp;iPhone&nbsp;and iPad.<\/p>\n\n\n\n<p>The log of the VPN server, by default, is combined with system log located at \/var\/log\/messages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This howto describes the steps in how to setup a PPTP VPN on Centos, Fedora, Debian, and Ubuntu with basic RSA authentication.&nbsp; Before the installation make sure to have your Yum repos updated with the Epel repos. CentOS and Red Hat Enterprise Linux 5.x wget\u00a0http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/x86_64\/epel-release-5-4.noarch.rpm\u00a0&amp;&amp;\u00a0sudo rpm -Uvh epel-release-5*.rpm CentOS and Red Hat Enterprise Linux 6.x [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[30],"tags":[31,136,137,83,138],"class_list":["post-522","post","type-post","status-publish","format-standard","hentry","category-centos","tag-centos","tag-debian","tag-pptp","tag-ubuntu","tag-vpn"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog<\/title>\n<meta name=\"description\" content=\"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-01T11:24:54+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\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:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/\",\"name\":\"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2019-06-01T11:24:54+00:00\",\"dateModified\":\"2019-06-01T11:24:54+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"description\":\"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog","description":"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.","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:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/","og_locale":"en_US","og_type":"article","og_title":"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog","og_description":"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.","og_url":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/","og_site_name":"24x7serversupport Blog","article_published_time":"2019-06-01T11:24:54+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/","url":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/","name":"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)? | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2019-06-01T11:24:54+00:00","dateModified":"2019-06-01T11:24:54+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"description":"How to setup VPN server, How to configure PPTP server on centos, RedHat, Ubuntu, Debian, Steps to install PPTP on linux machine.","breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/setup-pptp-on-centos-ubuntu-debian-and-fedora\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)?"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=522"}],"version-history":[{"count":0,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/522\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}