{
  "created": "2015-12-20T19:56:39Z",
  "hierarchy": [
    {
      "name": "ROOT",
      "type": "folder",
      "uri": "/ROOT"
    },
    {
      "name": "PPTPD Installation",
      "type": "article",
      "uri": "PPTPD_Installation"
    }
  ],
  "html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"/><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/><meta name=\"name\" content=\"Nikhil's Personal Wiki\"/><meta name=\"description\" content=\"PPTPD Installation – Nikhil's Personal Wiki\"/><meta name=\"author\" content=\"Nikhil Anand\"/><meta name=\"theme-color\" content=\"#ffe9a00\"/><meta property=\"og:title\" content=\"Nikhil's Personal Wiki\"/><meta property=\"og:description\" content=\"PPTPD Installation – Nikhil's Personal Wiki\"/><meta property=\"og:type\" content=\"website\"/><meta property=\"og:image\" content=\"/img/logo512.png\"/><meta property=\"og:site_name\" content=\"Nikhil's Personal Wiki\"/><link rel=\"og:image\" href=\"/img/logo512.png\"/><link rel=\"icon\" href=\"/img/favicon.png\"/><link rel=\"apple-touch-icon\" href=\"/img/logo192.png\"/><link rel=\"stylesheet\" href=\"/css/styles.css\"/><title>PPTPD Installation – Nikhil's Personal Wiki</title><script defer data-domain=\"wiki.nikhil.io\" src=\"https://plausible.io/js/plausible.js\"></script></head><body><noscript>👉 A few things won't work if you have JavaScript disabled.</noscript><div class=\"container article\"><header><nav><ul><li><a href=\"/archive\" class title=\"Archive\"><span>Archive</span></a></li><li><a href=\"/Home\" class title=\"Home\"><span>Home</span></a></li><li><a href=\"/random\" class title=\"See a random article\"><span>Random</span></a></li><li><a href=\"/PPTPD_Installation/raw.txt\" title=\"View Source\"><span>Raw</span></a></li><li><a href=\"/PPTPD_Installation/revisions\" class title=\"View revisions\"><span>Revisions</span></a></li><li><a href=\"/PPTPD_Installation/index.json\" title=\"View JSON Object\"><span>JSON</span></a></li></ul></nav></header><main><article><article-hierarchy><ul><li><a data-entity-type=\"folder\" href=\"/ROOT\" title=\"ROOT\">Root</a></li><li><a data-entity-type=\"article\" href=\"/PPTPD_Installation\" title=\"PPTPD Installation\">PPTPD Installation</a></li></ul></article-hierarchy><header><h1>PPTPD Installation</h1></header><article-content><p>The following are my notes of installing PoPToP on <strong>example.com</strong> (RHEL5, i386)</p>\n<h2 id=\"pre-flight-check\">Pre-Flight Check</h2>\n<p>Check if your kernel supports MPPE (Microsoft Point to Point Encryption).</p>\n<pre><code>[root@example ~]# modprobe ppp-compress-18 &amp;&amp; echo OK\nOK\n</code></pre>\n<p>Usually, kernels 2.6.15 and above support MPPE</p>\n<h2 id=\"install-the-necessary-packages\">Install the necessary packages</h2>\n<p>First install PPP:</p>\n<pre><code>yum install ppp\n</code></pre>\n<p>Next install PoPToP:</p>\n<pre><code>rpm -ivH http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm\n</code></pre>\n<p>Check if everything went well with</p>\n<pre><code>rpm -qa pptpd -d\n</code></pre>\n<h2 id=\"configure-pptpd\">Configure PPTPD</h2>\n<p>You&rsquo;ll configure the behaviour of your PPTP server in two locations:</p>\n<ul>\n<li>All passwords and connection params will be in <code>/etc/ppp</code>.</li>\n<li>The behaviour of the server itself will be controlled with<br />\n<code>/etc/pptpd.conf</code></li>\n</ul>\n<h3 id=\"edit-etcpppoptionspptpd-to-use-dns-and-require-encryption\">Edit /etc/ppp/options.pptpd to use DNS and require encryption</h3>\n<p>Configuring <code>/etc/ppp/options.pptpd</code> is rather easy. I only checked the file to make sure that MPPE was required for the connection, that the old-style (and insecure) PAP and CHAP was not enabled, and added the following lines:</p>\n<pre><code>ms-dns 19.27.17.20\nms-dns 19.27.12.21\n</code></pre>\n<h3 id=\"edit-etcpppchap-secrets-to-manage-users\">Edit /etc/ppp/chap-secrets to manage users</h3>\n<p>This is very simple too. To add a new user, add a line that looks like:</p>\n<pre><code># Secrets for authentication using CHAP\n# client  server  secret  IP addresses\ntomc * C@saVa\\t *\n</code></pre>\n<p>In this case, the user <code>tomc</code> would have the password <code>C@saVa\\t</code>.</p>\n<h3 id=\"edit-etcpptpdconf-to-disburse-ip-addresses\">Edit /etc/pptpd.conf to disburse IP addresses</h3>\n<p>I only edited/added the following lines. They tell the server to sustain a maximum of 30 connections and use the remote (client) IP range <code>10.9.0.2</code> to <code>10.9.0.31</code>.</p>\n<pre><code>connections 30\n\nlocalip 19.27.18.14\nremoteip 10.9.0.2-31\n</code></pre>\n<h2 id=\"configure-logging\">Configure logging</h2>\n<p>Before starting the PPTPD daemon (how&rsquo;s that for a tautology), it would be nice to log things to a file to keep track of users and diagnose connection problems. For this, we can use <code>syslogd</code>. Add this to <strong>daemon</strong> facility in <code>/etc/syslogd.conf</code>:</p>\n<pre><code>daemon.*  /var/log/pptpd.log\n</code></pre>\n<p>Then restart the syslog daemon:</p>\n<pre><code>killall syslogd\n/sbin/syslogd\n</code></pre>\n<h2 id=\"configure-the-local-system-to-allow-connectiong-and-ip-forwarding\">Configure the local system to allow connectiong and IP forwarding</h2>\n<h3 id=\"configure-iptables-rules\">Configure iptables rules</h3>\n<p>I have a very restrictive set of iptables rules and needed all of these. Your mileage may vary. PPTPD uses port 1723 and <em>protocol</em> 47. In this snippet, my <code>$EXTERNAL_INTERFACE</code> variable is set to <code>eth1</code>.</p>\n<pre><code># Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (&quot;GRE&quot;, by Cisco)\niptables -A INPUT -i ppp+ -j ACCEPT\niptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT\n\niptables -A INPUT  -p tcp --dport 1723 -j ACCEPT\niptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT\niptables -A INPUT  -p 47 -j ACCEPT\niptables -A OUTPUT -p 47 -j ACCEPT\n\niptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT\niptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT\niptables -A POSTROUTING -t nat -j MASQUERADE\n</code></pre>\n<h3 id=\"ip-forwarding\">IP forwarding</h3>\n<p>You might also have to enable IP forwarding. Check if this is already enabled by issuing:</p>\n<pre><code>[root@example ~]# sysctl net.ipv4.ip_forward\nnet.ipv4.ip_forward = 0\n\nor\n\n[root@example ~]# cat /proc/sys/net/ipv4/ip_forward\n0\n</code></pre>\n<p>If you see a <strong>1</strong>, you&rsquo;re good. If not, you can enable it on the fly like so:</p>\n<pre><code>[root@example ~]# sysctl -w net.ipv4.ip_forward=1\n\nor\n\n[root@example ~]# echo 1 &gt; /proc/sys/net/ipv4/ip_forward\n</code></pre>\n<p>If you do this, make sure that <code>/etc/sysctl.conf</code> has <code>net.ipv4.ip_forward</code> set to <strong>1</strong>. Then restart the network service:</p>\n<pre><code>[root@example ~]# sysctl -p /etc/sysctl.conf\n\nor\n\n[root@example ~]# service network restart\n</code></pre>\n<h2 id=\"start-the-pptpd-service-finally\">Start the PPTPD service (finally!)</h2>\n<pre><code>service pptpd start\n</code></pre>\n<p>And you should be good to go. Diagnose network problems with nmap, traceroute, etc. You may also want to start it at reboot</p>\n<pre><code>chkconfig --level 345 pptpd on\n</code></pre>\n<h2 id=\"resources\">Resources</h2>\n<p><a href=\"http://poptop.sourceforge.net/dox/howto1.html\">Poptop Installation guide</a></p>\n</article-content></article></main><footer><p></p><ul><li>4,121 bytes</li><li>Created on Sunday, 20 December 2015 at 19:56 UTC</li><li>Modified on Thursday, 28 May 2026 at 13:06 UTC</li><br/><li><a href=\"https://github.com/afreeorange/wiki.nikhil.io.articles/edit/master/PPTPD Installation.md\" title=\"Edit this article\">Edit this article</a></li><li><a href=\"https://github.com/afreeorange/bock\" title=\"View the project that generates this wiki on Github\">bock 6.2.0-alpha</a></li></ul></footer></div><script type=\"text/javascript\">\n        document.body.addEventListener(\n          \"keypress\", (e) => e.key === \"f\"\n          ? window.location.assign(\"/archive\")\n          : null);\n      </script></body></html>",
  "id": "fb09ca54-5d6b-5ada-b668-6bde5b9f5ec3",
  "modified": "2026-05-28T13:06:20Z",
  "revisions": [
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-05-28T13:06:20Z",
      "id": "ca705b010e954d709ed04fcd2dd63537f18b50ad",
      "shortId": "ca705b01",
      "subject": "Formatting fixes -- Claude\n",
      "content": "The following are my notes of installing PoPToP on **example.com** (RHEL5, i386)\n\n## Pre-Flight Check\n\nCheck if your kernel supports MPPE (Microsoft Point to Point Encryption).\n\n    [root@example ~]# modprobe ppp-compress-18 && echo OK\n    OK\n\nUsually, kernels 2.6.15 and above support MPPE\n\n## Install the necessary packages\n\nFirst install PPP:\n\n    yum install ppp\n\nNext install PoPToP:\n\n    rpm -ivH http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm\n\nCheck if everything went well with\n\n    rpm -qa pptpd -d\n\n## Configure PPTPD\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n*   All passwords and connection params will be in `/etc/ppp`.\n*   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the file to make sure that MPPE was required for the connection, that the old-style (and insecure) PAP and CHAP was not enabled, and added the following lines:\n\n    ms-dns 19.27.17.20\n    ms-dns 19.27.12.21\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n    # Secrets for authentication using CHAP\n    # client  server  secret  IP addresses\n    tomc * C@saVa\\t *\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain a maximum of 30 connections and use the remote (client) IP range `10.9.0.2` to `10.9.0.31`.\n\n    connections 30\n\n    localip 19.27.18.14\n    remoteip 10.9.0.2-31\n\n## Configure logging\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would be nice to log things to a file to keep track of users and diagnose connection problems. For this, we can use `syslogd`. Add this to **daemon** facility in `/etc/syslogd.conf`:\n\n    daemon.*  /var/log/pptpd.log\n\nThen restart the syslog daemon:\n\n    killall syslogd\n    /sbin/syslogd\n\n## Configure the local system to allow connectiong and IP forwarding\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these. Your mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this snippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n    # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)\n    iptables -A INPUT -i ppp+ -j ACCEPT\n    iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT\n\n    iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT\n    iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT\n    iptables -A INPUT  -p 47 -j ACCEPT\n    iptables -A OUTPUT -p 47 -j ACCEPT\n\n    iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT\n    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT\n    iptables -A POSTROUTING -t nat -j MASQUERADE\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already enabled by issuing:\n\n    [root@example ~]# sysctl net.ipv4.ip_forward\n    net.ipv4.ip_forward = 0\n\n    or\n\n    [root@example ~]# cat /proc/sys/net/ipv4/ip_forward\n    0\n\nIf you see a **1**, you're good. If not, you can enable it on the fly like so:\n\n    [root@example ~]# sysctl -w net.ipv4.ip_forward=1\n\n    or\n\n    [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward\n\nIf you do this, make sure that `/etc/sysctl.conf` has `net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n    [root@example ~]# sysctl -p /etc/sysctl.conf\n\n    or\n\n    [root@example ~]# service network restart\n\n## Start the PPTPD service (finally!)\n\n    service pptpd start\n\nAnd you should be good to go. Diagnose network problems with nmap, traceroute, etc. You may also want to start it at reboot\n\n    chkconfig --level 345 pptpd on\n\n## Resources\n\n[Poptop Installation guide](http://poptop.sourceforge.net/dox/howto1.html)\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-01-13T18:47:28Z",
      "id": "2436477560f26e23d00a24add1cbfeafdca4af78",
      "shortId": "24364775",
      "subject": "No compression\n",
      "content": "The following are my notes of installing PoPToP on **example.com** (RHEL5, i386)\n\nPre-Flight Check\n----------------\n\nCheck if your kernel supports MPPE (Microsoft Point to Point\nEncryption).\n\n    [root@example ~]# modprobe ppp-compress-18 && echo OK  \n    OK\n\nUsually, kernels 2.6.15 and above support MPPE\n\nInstall the necessary packages\n------------------------------\n\nFirst install PPP:\n\n    yum install ppp\n\nNext install PoPToP:\n\n    rpm -ivH http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm\n\nCheck if everything went well with\n\n    rpm -qa pptpd -d\n\nConfigure PPTPD\n---------------\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n*   All passwords and connection params will be in `/etc/ppp`.\n*   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the\nfile to make sure that MPPE was required for the connection, that the\nold-style (and insecure) PAP and CHAP was not enabled, and added the\nfollowing lines:\n\n    ms-dns 19.27.17.20  \n    ms-dns 19.27.12.21\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n    # Secrets for authentication using CHAP  \n    # client  server  secret  IP addresses  \n    tomc * C@saVa\\t *\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain\na maximum of 30 connections and use the remote (client) IP range\n`10.9.0.2` to `10.9.0.31`.\n\n    connections 30  \n      \n    localip 19.27.18.14  \n    remoteip 10.9.0.2-31\n\nConfigure logging\n-----------------\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would\nbe nice to log things to a file to keep track of users and diagnose\nconnection problems. For this, we can use `syslogd`. Add this to\n**daemon** facility in `/etc/syslogd.conf`:\n\n    daemon.*  /var/log/pptpd.log  \n\nThen restart the syslog daemon:\n\n    killall syslogd  \n    /sbin/syslogd\n\nConfigure the local system to allow connectiong and IP forwarding\n-----------------------------------------------------------------\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these.\nYour mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this\nsnippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n    # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)  \n    iptables -A INPUT -i ppp+ -j ACCEPT  \n    iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT  \n      \n    iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT  \n    iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT  \n    iptables -A INPUT  -p 47 -j ACCEPT  \n    iptables -A OUTPUT -p 47 -j ACCEPT  \n      \n    iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT  \n    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT  \n    iptables -A POSTROUTING -t nat -j MASQUERADE\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already\nenabled by issuing:\n\n    [root@example ~]# sysctl net.ipv4.ip_forward  \n    net.ipv4.ip_forward = 0  \n      \n    or  \n      \n    [root@example ~]# cat /proc/sys/net/ipv4/ip_forward  \n    0  \n\nIf you see a **1**, you're good. If not, you can enable it on the fly\nlike so:\n\n    [root@example ~]# sysctl -w net.ipv4.ip_forward=1  \n      \n    or  \n      \n    [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward  \n    \n\nIf you do this, make sure that `/etc/sysctl.conf` has\n`net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n    [root@example ~]# sysctl -p /etc/sysctl.conf  \n      \n    or  \n      \n    [root@example ~]# service network restart\n\nStart the PPTPD service (finally!)\n----------------------------------\n\n    service pptpd start\n\nAnd you should be good to go. Diagnose network problems with nmap,\ntraceroute, etc. You may also want to start it at reboot\n\n    chkconfig --level 345 pptpd on\n\nResources\n---------\n\n[Poptop Installation guide](http://poptop.sourceforge.net/dox/howto1.html)\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-27T07:27:56Z",
      "id": "1aa29105a45aa67523ffb61e73bcc415f935a47e",
      "shortId": "1aa29105",
      "subject": "Fix Markdown conversion\n\nSaw half a season of The Office\n",
      "content": "The following are my notes of installing PoPToP on **example.com** (RHEL5, i386)\n\nPre-Flight Check\n----------------\n\nCheck if your kernel supports MPPE (Microsoft Point to Point\nEncryption).\n\n    [root@example ~]# modprobe ppp-compress-18 && echo OK  \n    OK\n\nUsually, kernels 2.6.15 and above support MPPE\n\nInstall the necessary packages\n------------------------------\n\nFirst install PPP:\n\n    yum install ppp\n\nNext install PoPToP:\n\n    rpm -ivH http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm\n\nCheck if everything went well with\n\n    rpm -qa pptpd -d\n\nConfigure PPTPD\n---------------\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n*   All passwords and connection params will be in `/etc/ppp`.\n*   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the\nfile to make sure that MPPE was required for the connection, that the\nold-style (and insecure) PAP and CHAP was not enabled, and added the\nfollowing lines:\n\n    ms-dns 19.27.17.20  \n    ms-dns 19.27.12.21\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n    # Secrets for authentication using CHAP  \n    # client  server  secret  IP addresses  \n    tomc * C@saVa\\t *\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain\na maximum of 30 connections and use the remote (client) IP range\n`10.9.0.2` to `10.9.0.31`.\n\n    connections 30  \n      \n    localip 19.27.18.14  \n    remoteip 10.9.0.2-31\n\nConfigure logging\n-----------------\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would\nbe nice to log things to a file to keep track of users and diagnose\nconnection problems. For this, we can use `syslogd`. Add this to\n**daemon** facility in `/etc/syslogd.conf`:\n\n    daemon.*  /var/log/pptpd.log  \n\nThen restart the syslog daemon:\n\n    killall syslogd  \n    /sbin/syslogd\n\nConfigure the local system to allow connectiong and IP forwarding\n-----------------------------------------------------------------\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these.\nYour mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this\nsnippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n    # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)  \n    iptables -A INPUT -i ppp+ -j ACCEPT  \n    iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT  \n      \n    iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT  \n    iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT  \n    iptables -A INPUT  -p 47 -j ACCEPT  \n    iptables -A OUTPUT -p 47 -j ACCEPT  \n      \n    iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT  \n    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT  \n    iptables -A POSTROUTING -t nat -j MASQUERADE\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already\nenabled by issuing:\n\n    [root@example ~]# sysctl net.ipv4.ip_forward  \n    net.ipv4.ip_forward = 0  \n      \n    or  \n      \n    [root@example ~]# cat /proc/sys/net/ipv4/ip_forward  \n    0  \n\nIf you see a **1**, you're good. If not, you can enable it on the fly\nlike so:\n\n    [root@example ~]# sysctl -w net.ipv4.ip_forward=1  \n      \n    or  \n      \n    [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward  \n    \n\nIf you do this, make sure that `/etc/sysctl.conf` has\n`net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n    [root@example ~]# sysctl -p /etc/sysctl.conf  \n      \n    or  \n      \n    [root@example ~]# service network restart\n\nStart the PPTPD service (finally!)\n----------------------------------\n\n    service pptpd start\n\nAnd you should be good to go. Diagnose network problems with nmap,\ntraceroute, etc. You may also want to start it at reboot\n\n    chkconfig --level 345 pptpd on\n\nResources\n---------\n\n[Poptop Installation guide](http://poptop.sourceforge.net/dox/howto1.html)\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-21T02:30:47Z",
      "id": "d658e80d1ecb97b196531c7b15a0f9af709c05de",
      "shortId": "d658e80d",
      "subject": "Incremental\n",
      "content": "The following are my notes of installing PoPToP on **example.com**\n(RHEL5, i386)\n\nPre-Flight Check\n----------------\n\nCheck if your kernel supports MPPE (Microsoft Point to Point\nEncryption).\n\n` [root@example ~]# modprobe ppp-compress-18 && echo OK`  \n` OK`\n\nUsually, kernels 2.6.15 and above support MPPE\n\nInstall the necessary packages\n------------------------------\n\nFirst install PPP:\n\n` yum install ppp`\n\nNext install PoPToP:\n\n`  rpm -ivH `[`http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm`](http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm)\n\nCheck if everything went well with\n\n` rpm -qa pptpd -d`\n\nConfigure PPTPD\n---------------\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n-   All passwords and connection params will be in `/etc/ppp`.\n-   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the\nfile to make sure that MPPE was required for the connection, that the\nold-style (and insecure) PAP and CHAP was not enabled, and added the\nfollowing lines:\n\n` ms-dns 19.27.17.20`  \n` ms-dns 19.27.12.21`\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n` # Secrets for authentication using CHAP`  \n` # client  server  secret  IP addresses`  \n` tomc * C@saVa\\t *`\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain\na maximum of 30 connections and use the remote (client) IP range\n`10.9.0.2` to `10.9.0.31`.\n\n` connections 30`  \n` `  \n` localip 19.27.18.14`  \n` remoteip 10.9.0.2-31`\n\nConfigure logging\n-----------------\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would\nbe nice to log things to a file to keep track of users and diagnose\nconnection problems. For this, we can use `syslogd`. Add this to\n**daemon** facility in `/etc/syslogd.conf`:\n\n` daemon.*  /var/log/pptpd.log`  \n` `\n\nThen restart the syslog daemon:\n\n` killall syslogd`  \n` /sbin/syslogd`\n\nConfigure the local system to allow connectiong and IP forwarding\n-----------------------------------------------------------------\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these.\nYour mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this\nsnippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n` # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)`  \n` iptables -A INPUT -i ppp+ -j ACCEPT`  \n` iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT`  \n` `  \n` iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT`  \n` iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT`  \n` iptables -A INPUT  -p 47 -j ACCEPT`  \n` iptables -A OUTPUT -p 47 -j ACCEPT`  \n` `  \n` iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT`  \n` iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT`  \n` iptables -A POSTROUTING -t nat -j MASQUERADE`\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already\nenabled by issuing:\n\n` [root@example ~]# sysctl net.ipv4.ip_forward`  \n` net.ipv4.ip_forward = 0`  \n` `  \n` or`  \n` `  \n` [root@example ~]# cat /proc/sys/net/ipv4/ip_forward`  \n` 0`  \n\nIf you see a **1**, you're good. If not, you can enable it on the fly\nlike so:\n\n` [root@example ~]# sysctl -w net.ipv4.ip_forward=1`  \n` `  \n` or`  \n` `  \n` [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward`  \n` `\n\nIf you do this, make sure that `/etc/sysctl.conf` has\n`net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n` [root@example ~]# sysctl -p /etc/sysctl.conf`  \n` `  \n` or`  \n` `  \n` [root@example ~]# service network restart`\n\nStart the PPTPD service (finally!)\n----------------------------------\n\n` service pptpd start`\n\nAnd you should be good to go. Diagnose network problems with nmap,\ntraceroute, etc. You may also want to start it at reboot\n\n` chkconfig --level 345 pptpd on`\n\nResources\n---------\n\n[Poptop Installation\nguide](http://poptop.sourceforge.net/dox/howto1.html)\n\n\n\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-20T19:56:39Z",
      "id": "b822c3281d3c847a0468884f94b0163719c1932b",
      "shortId": "b822c328",
      "subject": "PPTPD Installation : First Draft\n",
      "content": "The following are my notes of installing PoPToP on **example.com**\n(RHEL5, i386)\n\nPre-Flight Check\n----------------\n\nCheck if your kernel supports MPPE (Microsoft Point to Point\nEncryption).\n\n` [root@example ~]# modprobe ppp-compress-18 && echo OK`  \n` OK`\n\nUsually, kernels 2.6.15 and above support MPPE\n\nInstall the necessary packages\n------------------------------\n\nFirst install PPP:\n\n` yum install ppp`\n\nNext install PoPToP:\n\n`  rpm -ivH `[`http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm`](http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm)\n\nCheck if everything went well with\n\n` rpm -qa pptpd -d`\n\nConfigure PPTPD\n---------------\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n-   All passwords and connection params will be in `/etc/ppp`.\n-   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the\nfile to make sure that MPPE was required for the connection, that the\nold-style (and insecure) PAP and CHAP was not enabled, and added the\nfollowing lines:\n\n` ms-dns 19.27.17.20`  \n` ms-dns 19.27.12.21`\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n` # Secrets for authentication using CHAP`  \n` # client  server  secret  IP addresses`  \n` tomc * C@saVa\\t *`\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain\na maximum of 30 connections and use the remote (client) IP range\n`10.9.0.2` to `10.9.0.31`.\n\n` connections 30`  \n` `  \n` localip 19.27.18.14`  \n` remoteip 10.9.0.2-31`\n\nConfigure logging\n-----------------\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would\nbe nice to log things to a file to keep track of users and diagnose\nconnection problems. For this, we can use `syslogd`. Add this to\n**daemon** facility in `/etc/syslogd.conf`:\n\n` daemon.*  /var/log/pptpd.log`  \n` `\n\nThen restart the syslog daemon:\n\n` killall syslogd`  \n` /sbin/syslogd`\n\nConfigure the local system to allow connectiong and IP forwarding\n-----------------------------------------------------------------\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these.\nYour mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this\nsnippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n` # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)`  \n` iptables -A INPUT -i ppp+ -j ACCEPT`  \n` iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT`  \n` `  \n` iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT`  \n` iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT`  \n` iptables -A INPUT  -p 47 -j ACCEPT`  \n` iptables -A OUTPUT -p 47 -j ACCEPT`  \n` `  \n` iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT`  \n` iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT`  \n` iptables -A POSTROUTING -t nat -j MASQUERADE`\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already\nenabled by issuing:\n\n` [root@example ~]# sysctl net.ipv4.ip_forward`  \n` net.ipv4.ip_forward = 0`  \n` `  \n` or`  \n` `  \n` [root@example ~]# cat /proc/sys/net/ipv4/ip_forward`  \n` 0`  \n\nIf you see a **1**, you're good. If not, you can enable it on the fly\nlike so:\n\n` [root@example ~]# sysctl -w net.ipv4.ip_forward=1`  \n` `  \n` or`  \n` `  \n` [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward`  \n` `\n\nIf you do this, make sure that `/etc/sysctl.conf` has\n`net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n` [root@example ~]# sysctl -p /etc/sysctl.conf`  \n` `  \n` or`  \n` `  \n` [root@example ~]# service network restart`\n\nStart the PPTPD service (finally!)\n----------------------------------\n\n` service pptpd start`\n\nAnd you should be good to go. Diagnose network problems with nmap,\ntraceroute, etc. You may also want to start it at reboot\n\n` chkconfig --level 345 pptpd on`\n\nResources\n---------\n\n[Poptop Installation\nguide](http://poptop.sourceforge.net/dox/howto1.html)\n\n[Category:Nikhil's Notes](Category:Nikhil's_Notes \"wikilink\")\n[Category:Installation Logs](Category:Installation_Logs \"wikilink\")\n[Category:From a past sysadmin\nlife](Category:From_a_past_sysadmin_life \"wikilink\")\n"
    }
  ],
  "sizeInBytes": 4121,
  "source": "The following are my notes of installing PoPToP on **example.com** (RHEL5, i386)\n\n## Pre-Flight Check\n\nCheck if your kernel supports MPPE (Microsoft Point to Point Encryption).\n\n    [root@example ~]# modprobe ppp-compress-18 && echo OK\n    OK\n\nUsually, kernels 2.6.15 and above support MPPE\n\n## Install the necessary packages\n\nFirst install PPP:\n\n    yum install ppp\n\nNext install PoPToP:\n\n    rpm -ivH http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-1.rhel5.1.i386.rpm\n\nCheck if everything went well with\n\n    rpm -qa pptpd -d\n\n## Configure PPTPD\n\nYou'll configure the behaviour of your PPTP server in two locations:\n\n*   All passwords and connection params will be in `/etc/ppp`.\n*   The behaviour of the server itself will be controlled with\n    `/etc/pptpd.conf`\n\n### Edit /etc/ppp/options.pptpd to use DNS and require encryption\n\nConfiguring `/etc/ppp/options.pptpd` is rather easy. I only checked the file to make sure that MPPE was required for the connection, that the old-style (and insecure) PAP and CHAP was not enabled, and added the following lines:\n\n    ms-dns 19.27.17.20\n    ms-dns 19.27.12.21\n\n### Edit /etc/ppp/chap-secrets to manage users\n\nThis is very simple too. To add a new user, add a line that looks like:\n\n    # Secrets for authentication using CHAP\n    # client  server  secret  IP addresses\n    tomc * C@saVa\\t *\n\nIn this case, the user `tomc` would have the password `C@saVa\\t`.\n\n### Edit /etc/pptpd.conf to disburse IP addresses\n\nI only edited/added the following lines. They tell the server to sustain a maximum of 30 connections and use the remote (client) IP range `10.9.0.2` to `10.9.0.31`.\n\n    connections 30\n\n    localip 19.27.18.14\n    remoteip 10.9.0.2-31\n\n## Configure logging\n\nBefore starting the PPTPD daemon (how's that for a tautology), it would be nice to log things to a file to keep track of users and diagnose connection problems. For this, we can use `syslogd`. Add this to **daemon** facility in `/etc/syslogd.conf`:\n\n    daemon.*  /var/log/pptpd.log\n\nThen restart the syslog daemon:\n\n    killall syslogd\n    /sbin/syslogd\n\n## Configure the local system to allow connectiong and IP forwarding\n\n### Configure iptables rules\n\nI have a very restrictive set of iptables rules and needed all of these. Your mileage may vary. PPTPD uses port 1723 and *protocol* 47. In this snippet, my `$EXTERNAL_INTERFACE` variable is set to `eth1`.\n\n    # Allow PPTP. Note: it's not _port_ 47 but _protocol_ 47 (\"GRE\", by Cisco)\n    iptables -A INPUT -i ppp+ -j ACCEPT\n    iptables -A OUTPUT -o $EXTERNAL_INTERFACE -j ACCEPT\n\n    iptables -A INPUT  -p tcp --dport 1723 -j ACCEPT\n    iptables -A OUTPUT -p tcp --sport 1723 -j ACCEPT\n    iptables -A INPUT  -p 47 -j ACCEPT\n    iptables -A OUTPUT -p 47 -j ACCEPT\n\n    iptables -A FORWARD -i ppp+ -o $EXTERNAL_INTERFACE -m state --state NEW -j ACCEPT\n    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT\n    iptables -A POSTROUTING -t nat -j MASQUERADE\n\n### IP forwarding\n\nYou might also have to enable IP forwarding. Check if this is already enabled by issuing:\n\n    [root@example ~]# sysctl net.ipv4.ip_forward\n    net.ipv4.ip_forward = 0\n\n    or\n\n    [root@example ~]# cat /proc/sys/net/ipv4/ip_forward\n    0\n\nIf you see a **1**, you're good. If not, you can enable it on the fly like so:\n\n    [root@example ~]# sysctl -w net.ipv4.ip_forward=1\n\n    or\n\n    [root@example ~]# echo 1 > /proc/sys/net/ipv4/ip_forward\n\nIf you do this, make sure that `/etc/sysctl.conf` has `net.ipv4.ip_forward` set to **1**. Then restart the network service:\n\n    [root@example ~]# sysctl -p /etc/sysctl.conf\n\n    or\n\n    [root@example ~]# service network restart\n\n## Start the PPTPD service (finally!)\n\n    service pptpd start\n\nAnd you should be good to go. Diagnose network problems with nmap, traceroute, etc. You may also want to start it at reboot\n\n    chkconfig --level 345 pptpd on\n\n## Resources\n\n[Poptop Installation guide](http://poptop.sourceforge.net/dox/howto1.html)\n",
  "title": "PPTPD Installation",
  "untracked": false,
  "uri": "/PPTPD_Installation",
  "relativePath": "PPTPD Installation.md"
}
