{
  "created": "2024-01-23T02:27:10Z",
  "hierarchy": [
    {
      "name": "ROOT",
      "type": "folder",
      "uri": "/ROOT"
    },
    {
      "name": "PiVPN Notes",
      "type": "article",
      "uri": "PiVPN_Notes"
    }
  ],
  "html": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\"/>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n    <meta property=\"og:image\" content=\"/img/logo512.png\"/>\n    <meta property=\"og:site_name\" content=\"Nikhil's Personal Wiki\"/>\n    <link rel=\"og:image\" href=\"/img/logo512.png\"/>\n    <link rel=\"icon\" href=\"/img/favicon.png\"/>\n    <link rel=\"apple-touch-icon\" href=\"/img/logo192.png\"/>\n    <link rel=\"stylesheet\" href=\"/css/styles.css\"/>\n    <link rel=\"stylesheet\" href=\"/css/highlight.css\"/>\n    <title>PiVPN Notes &ndash; Nikhil's Personal Wiki</title>\n    <script type=\"text/javascript\" id=\"MathJax-script\" defer src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js\"></script>\n    <script defer data-domain=\"wiki.nikhil.io\" src=\"https://plausible.io/js/plausible.js\"></script>\n  </head>\n  <body>\n    <noscript>\n      👉 A few things won&#8217;t work if you have JavaScript disabled.\n    </noscript>\n    <div class=\"container article\">\n      <header>\n        <nav>\n          <ul>\n            <li>\n              <a href=\"/archive\"  title=\"Archive\">\n                <span>Archive</span>\n              </a>\n            </li>\n            <li>\n              <a href=\"/Home\"  title=\"Home\">\n                <span>Home</span>\n              </a>\n            </li>\n            <li>\n              <a href=\"/random\"  title=\"See a random article\">\n                <span>Random</span>\n              </a>\n            </li>\n            \n            \n              \n                <li>\n                  <a href=\"/PiVPN_Notes/raw.txt\"  title=\"View Source\">\n                    <span>Raw</span>\n                  </a>\n                </li>\n              \n              \n            \n            \n            \n            \n              \n                <li>\n                  <a href=\"/PiVPN_Notes/revisions\" >\n                    <span>Revisions</span>\n                  </a>\n                </li>\n              \n            \n            \n              \n                \n                  <li>\n                    <a href=\"/PiVPN_Notes/index.json\" title=\"View JSON Object\">\n                      <span>JSON</span>\n                    </a>\n                  </li>\n                \n              \n            \n          </ul>\n        </nav>\n      </header>\n      <main>\n        \n  <nav>\n  <ul>\n    \n      <li>\n        <a data-entity-type=\"folder\" href=\"/ROOT\" title=\"ROOT\">Root</a>\n      </li>\n    \n      <li>\n        <a data-entity-type=\"article\" href=\"/PiVPN_Notes\" title=\"PiVPN Notes\">PiVPN Notes</a>\n      </li>\n    \n    \n    \n    \n    \n  </ul>\n</nav>\n\n  <h1>PiVPN Notes\n    \n  </h1>\n  <p>Install via the highly-regarded <code>curl</code> and <code>bash</code> combo.</p>\n<pre tabindex=\"0\" class=\"chroma\"><code><span class=\"line\"><span class=\"cl\">curl -L https://install.pivpn.io <span class=\"p\">|</span> bash\n</span></span></code></pre><p>You <em>must</em> run <code>pivpn debug</code> after this! This will add <code>MASQUERADE</code> rules to <code>iptables</code>. Else you won&rsquo;t be able to access devices on the local network. Here&rsquo;s some sample output from <code>iptables-save</code>:</p>\n<pre><code># Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n</code></pre>\n<p>and an accompanying client configuration:</p>\n<pre><code>[Interface]\nPrivateKey = &lt;Whatever_This_is&gt;\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = &lt;Whatever_This_is&gt;\nPresharedKey = &lt;Whatever_This_is&gt;\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n</code></pre>\n\n\n      </main>\n      <footer>\n        <p>\n          \n        </p>\n        <ul>\n          \n  <li>1,930 bytes</li>\n  \n    <li>Created on Tuesday, 23 January 2024 at 02:27 UTC</li>\n    <li>Modified on Thursday, 28 May 2026 at 13:06 UTC</li>\n    <br/>\n    <li>\n      <a\n        href=\"https://github.com/afreeorange/wiki.nikhil.io.articles/edit/master/PiVPN Notes.md\"\n        title=\"Edit this article\">Edit this article</a>\n    </li>\n  \n\n          <li>\n            <a href=\"https://github.com/afreeorange/bock\" title=\"View the project that generates this wiki on Github\">bock\n            5.3.0-beta</a>\n          </li>\n        </ul>\n      </footer>\n    </div>\n    \n    \n      <script type=\"text/javascript\">\n        /**\n         * Quick shortcut to take me to the search box which is 90% of how I navigate\n         * this wiki anyway.\n         */\n        document.body.addEventListener(\n          \"keypress\", (e) => e.key === \"f\"\n          ? window.location.assign(\"/archive\")\n          : null);\n        window.MathJax = {\n          tex: {\n            inlineMath: [\n              [\n                '$', '$'\n              ],\n              [\n                '\\\\(', '\\\\)'\n              ]\n            ]\n          },\n          svg: {\n            fontCache: 'global'\n          }\n        };\n      </script>\n    \n  </body>\n</html></head></html>\n",
  "id": "80dcafc8-c16a-56c8-b497-11c5ede727d4",
  "modified": "2026-05-28T13:06:21Z",
  "revisions": [
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-05-28T13:06:21Z",
      "id": "d9514e1821d59f4d0368b0e1b755d198a4947741",
      "shortId": "d9514e18",
      "subject": "Formatting fixes -- Claude\n",
      "content": "Install via the highly-regarded `curl` and `bash` combo.\n\n```bash\ncurl -L https://install.pivpn.io | bash\n```\n\nYou _must_ run `pivpn debug` after this! This will add `MASQUERADE` rules to `iptables`. Else you won't be able to access devices on the local network. Here's some sample output from `iptables-save`:\n\n```\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n```\n\nand an accompanying client configuration:\n\n```\n[Interface]\nPrivateKey = <Whatever_This_is>\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = <Whatever_This_is>\nPresharedKey = <Whatever_This_is>\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n```\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-01-13T18:47:28Z",
      "id": "2436477560f26e23d00a24add1cbfeafdca4af78",
      "shortId": "24364775",
      "subject": "No compression\n",
      "content": "Install via the highly-regarded `curl` and `bash` combo. \n\n```bash\ncurl -L https://install.pivpn.io | bash\n```\n\nYou _must_ run `pivpn debug` after this! This will add `MASQUERADE` rules to `iptables`. Else you won't be able to access devices on the local network. Here's some sample output from `iptables-save`:\n\n```\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n```\n\nand an accompanying client configuration:\n\n```\n[Interface]\nPrivateKey = <Whatever_This_is>\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = <Whatever_This_is>\nPresharedKey = <Whatever_This_is>\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n```\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2024-04-15T23:21:58Z",
      "id": "4b2d73989d92e9602a635c4b492f41d43673e735",
      "shortId": "4b2d7398",
      "subject": "Merge branch 'master' of github.com:afreeorange/wiki.nikhil.io.articles\n",
      "content": "Install via the highly-regarded `curl` and `bash` combo. \n\n```bash\ncurl -L https://install.pivpn.io | bash\n```\n\nYou _must_ run `pivpn debug` after this! This will add `MASQUERADE` rules to `iptables`. Else you won't be able to access devices on the local network. Here's some sample output from `iptables-save`:\n\n```\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n```\n\nand an accompanying client configuration:\n\n```\n[Interface]\nPrivateKey = <Whatever_This_is>\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = <Whatever_This_is>\nPresharedKey = <Whatever_This_is>\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n```\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2024-01-23T02:27:10Z",
      "id": "0524544730b4e28479fe5df8b6df8b09b74c81ea",
      "shortId": "05245447",
      "subject": "Initial commit\n",
      "content": "Install via the highly-regarded `curl` and `bash` combo. \n\n```bash\ncurl -L https://install.pivpn.io | bash\n```\n\nYou _must_ run `pivpn debug` after this! This will add `MASQUERADE` rules to `iptables`. Else you won't be able to access devices on the local network. Here's some sample output from `iptables-save`:\n\n```\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n```\n\nand an accompanying client configuration:\n\n```\n[Interface]\nPrivateKey = <Whatever_This_is>\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = <Whatever_This_is>\nPresharedKey = <Whatever_This_is>\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n```\n\n"
    }
  ],
  "sizeInBytes": 1930,
  "source": "Install via the highly-regarded `curl` and `bash` combo.\n\n```bash\ncurl -L https://install.pivpn.io | bash\n```\n\nYou _must_ run `pivpn debug` after this! This will add `MASQUERADE` rules to `iptables`. Else you won't be able to access devices on the local network. Here's some sample output from `iptables-save`:\n\n```\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*filter\n:INPUT ACCEPT [539667:80844193]\n:FORWARD ACCEPT [9052:4464611]\n:OUTPUT ACCEPT [329479:41880851]\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i eth0 -p udp -m udp --dport 58120 -m comment --comment wireguard-input-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\n-A INPUT -i wg0 -p udp -m udp --dport 53 -m comment --comment pihole-DNS-rule -j ACCEPT\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n# Generated by iptables-save v1.8.9 (nf_tables) on Mon Jan 22 20:23:02 2024\n*nat\n:PREROUTING ACCEPT [66794:5901902]\n:INPUT ACCEPT [66250:5815572]\n:OUTPUT ACCEPT [49939:3627320]\n:POSTROUTING ACCEPT [50130:3649317]\n-A POSTROUTING -s 192.116.240.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.236.34.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.134.161.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\n-A POSTROUTING -s 192.165.64.0/24 -o eth0 -m comment --comment wireguard-nat-rule -j MASQUERADE\nCOMMIT\n# Completed on Mon Jan 22 20:23:02 2024\n```\n\nand an accompanying client configuration:\n\n```\n[Interface]\nPrivateKey = <Whatever_This_is>\nAddress = 192.116.240.2/24\nDNS = 192.168.1.7, 1.1.1.1, 1.0.0.1\n\n[Peer]\nPublicKey = <Whatever_This_is>\nPresharedKey = <Whatever_This_is>\nAllowedIPs = 0.0.0.0/0\nEndpoint = 171.172.173.174:58120\n```\n",
  "title": "PiVPN Notes",
  "untracked": false,
  "uri": "/PiVPN_Notes",
  "relativePath": "PiVPN Notes.md"
}
