<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Networking | AkitaOnRails.com</title><link>https://akitaonrails.github.io/en/tags/networking/</link><description>Fabio Akita's blog — tech, career, and assorted geek topics. English edition.</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 19 Oct 2026 23:20:51 +0000</lastBuildDate><atom:link href="https://akitaonrails.github.io/en/tags/networking/index.xml" rel="self" type="application/rss+xml"/><item><title>Survival Guide for a Censored Internet</title><link>https://akitaonrails.github.io/en/2026/08/19/survival-guide-for-a-censored-internet/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2026/08/19/survival-guide-for-a-censored-internet/</guid><pubDate>Wed, 19 Aug 2026 12:00:00 -0300</pubDate><description>&lt;p&gt;Last week I wrote about &lt;a href="https://akitaonrails.github.io/en/2026/08/13/understanding-the-discord-censorship-and-brazils-digital-eca/"&gt;the Discord censorship and Brazil&amp;rsquo;s Digital ECA law&lt;/a&gt;, the Digital ECA (&amp;ldquo;Estatuto Digital da Criança e do Adolescente&amp;rdquo;, the digital version of Brazil&amp;rsquo;s Child and Adolescent Statute): the ANPD (Brazil&amp;rsquo;s data protection authority, now also the country&amp;rsquo;s de facto internet regulator) ordered the Go Live feature shut down nationwide because end-to-end encryption prevents content surveillance, and in the same package came the first sentence enhancement in Brazilian history for committing a crime &amp;ldquo;using a VPN&amp;rdquo;. After that article, the question I got the most was the obvious one: &lt;em&gt;&amp;ldquo;OK, so what do I do?&amp;rdquo;&lt;/em&gt;&lt;/p&gt;</description><content:encoded><![CDATA[<p>Last week I wrote about <a href="/en/2026/08/13/understanding-the-discord-censorship-and-brazils-digital-eca/">the Discord censorship and Brazil&rsquo;s Digital ECA law</a>, the Digital ECA (&ldquo;Estatuto Digital da Criança e do Adolescente&rdquo;, the digital version of Brazil&rsquo;s Child and Adolescent Statute): the ANPD (Brazil&rsquo;s data protection authority, now also the country&rsquo;s de facto internet regulator) ordered the Go Live feature shut down nationwide because end-to-end encryption prevents content surveillance, and in the same package came the first sentence enhancement in Brazilian history for committing a crime &ldquo;using a VPN&rdquo;. After that article, the question I got the most was the obvious one: <em>&ldquo;OK, so what do I do?&rdquo;</em></p>
<p>This article is the answer: a practical guide, from easiest to hardest, to keep your communication channels standing as the siege tightens. Because the siege <strong>is</strong> tightening, and you should understand its pace before picking your tools.</p>
<h2>The track record: none of this is new<span class="hx:absolute hx:-mt-20" id="the-track-record-none-of-this-is-new"></span>
    <a href="#the-track-record-none-of-this-is-new" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Anyone surprised by the Discord case was not paying attention. The Brazilian judiciary has been blocking communication services for over a decade, always steamrolling millions of innocent users to reach half a dozen suspects:</p>
<ul>
<li><strong>WhatsApp, 2015 and 2016</strong>: blocked <a href="https://g1.globo.com/tecnologia/noticia/2022/03/18/whatsapp-ja-foi-bloqueado-por-decisao-judicial-em-2015-e-2016-no-brasil.ghtml"target="_blank" rel="noopener">three times by lower-court judges</a>, always because the company would not hand over conversations that, by design, it cannot read.</li>
<li><strong>Telegram, 2022 and 2023</strong>: suspended <a href="https://www.gazetadopovo.com.br/republica/stf-voltara-a-julgar-bloqueio-do-whatsapp-moraes-ja-suspendeu-telegram/"target="_blank" rel="noopener">for two days by order of Justice Alexandre de Moraes in March 2022</a>, and again by a federal judge in 2023. <a href="https://www.migalhas.com.br/depeso/414499/stf-alem-do-x-relembre-os-bloqueios-do-whatsapp-e-telegram-no-brasil"target="_blank" rel="noopener">Migalhas has the full timeline</a>.</li>
<li><strong>X/Twitter, 2024</strong>: the landmark. <a href="https://itforum.com.br/noticias/de-outubro-a-outubro-confronto-x-e-stf/"target="_blank" rel="noopener">Nationwide suspension from August 30 to October 8</a>, <strong>40 days</strong>, by a single justice&rsquo;s order. And here is the detail that matters for this guide: the decision included <a href="https://www.gazetadopovo.com.br/mundo/crise-eua-moraes-twitter-files-lei-magnitsky/"target="_blank" rel="noopener">a fine of R$ 50,000 (~US$ 10,000) per day for any individual who accessed X through a VPN</a>, an order for app stores to remove VPN apps (walked back hours later), and <a href="https://istoedinheiro.com.br/pf-e-anatel-enviam-ao-stf-relatorios-sobre-acessos-ao-x-mesmo-com-bloqueio"target="_blank" rel="noopener">the Federal Police and Anatel (the telecom regulator) producing reports on who bypassed the block</a> to support the fines.</li>
</ul>
<p>Notice what happened there: for the first time, using a neutral privacy tool became, by itself, punishable conduct in Brazil. Nobody was fined in the end, but the infrastructure to fine people was built, tested and documented. And in 2026 Congress voted and the president signed a sentence enhancement for crimes committed with a VPN. The X precedent stopped being an exception and became repertoire.</p>
<blockquote>
  <p><strong>Keep this:</strong> in the X case, the Brazilian state already treated VPN users as offenders, already tried to pull VPNs from app stores, and already requested reports on who bypassed the block. All of it documented, in court orders and public reports.</p>

</blockquote>
<h2>The endgame: the Chinese model<span class="hx:absolute hx:-mt-20" id="the-endgame-the-chinese-model"></span>
    <a href="#the-endgame-the-chinese-model" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I have little doubt that very well-positioned people in government look at <a href="https://freedomhouse.org/country/china/freedom-net/2024"target="_blank" rel="noopener">China&rsquo;s Great Firewall</a> with envy, not horror. And it is worth understanding what it is, because it defines the limit of the game.</p>
<p>The Firewall goes far beyond blocking websites. It is deep packet inspection (DPI) at national scale, running on the country&rsquo;s internet backbone: all traffic is classified in real time, known VPN protocols are identified by their handshake shape and dropped, Tor is blocked by default, and only <strong>state-approved VPNs</strong> (meaning, with a backdoor) operate legally. Ordinary citizens caught using unauthorized VPNs get fined. And even when the traffic cannot be read, the metadata gives the game away: who talks to whom, when, for how long.</p>
<p>That is why the honest answer to &ldquo;can you bypass a Firewall like that without being noticed?&rdquo; is: <strong>no, not for an ordinary citizen</strong>. Against a state-level firewall of that caliber, no consumer tool makes you invisible. At best it makes you too expensive to be worth persecuting at scale. Anyone selling you total invisibility is lying.</p>
<p>The good news is that Brazil is nowhere near that point. Censorship rarely arrives all at once: it comes in steps, and each step has a matching defense. The rest of this guide is that staircase, step by step. The logic behind everything that follows is a single one: <strong>censorship is a matter of cost</strong>. Our job is to make blocking expensive, technically and politically, until mass deployment becomes impractical.</p>
<blockquote>
  <p><strong>Keep this:</strong> against a complete state firewall, no tool makes you invisible, only too expensive to persecute at scale. The game is climbing your staircase before the censor climbs his.</p>

</blockquote>
<h2>Phase 1: Commercial VPN, the minimum everyone should have<span class="hx:absolute hx:-mt-20" id="phase-1-commercial-vpn-the-minimum-everyone-should-have"></span>
    <a href="#phase-1-commercial-vpn-the-minimum-everyone-should-have" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Start with the obvious. A VPN (virtual private network) creates an encrypted tunnel between your device and a provider&rsquo;s server. Your ISP (internet service provider) now sees only a scrambled flow going to a single address; the sites you visit see the VPN&rsquo;s IP, not yours. I explain it in depth, with the networking theory underneath, in <a href="https://akitaonrails.com/2022/08/29/akitando-126-criando-uma-rede-segura-introducao-a-redes-parte-6-vpn-e-nas/"target="_blank" rel="noopener">Akitando 126</a> (in Portuguese).</p>
<p>What a VPN <strong>does</strong>: hides your traffic from your ISP, swaps your exit IP, gets you out of geo-blocks and of court-ordered DNS/IP blocks. What it <strong>does not do</strong>:</p>
<ul>
<li><strong>It does not make you anonymous.</strong> The VPN provider sees all your traffic in place of your ISP. You did not eliminate the watcher, you just picked a different watcher.</li>
<li><strong>It does not hide your identity if you paid by credit card.</strong> A credit card subscription ties the VPN account to your tax ID. If authorities show up at the provider with a court order, your name is there.</li>
<li><strong>It does not protect content past the tunnel.</strong> From the VPN exit to the final website, the web&rsquo;s normal encryption (HTTPS) applies. The VPN is one leg of the path, not the whole path.</li>
</ul>
<p>That said, for the early phases of the siege it does the job. My recommendations, in order:</p>
<ul>
<li><strong><a href="https://protonvpn.com/"target="_blank" rel="noopener">ProtonVPN</a></strong>: Switzerland, outside easy jurisdiction, open source and audited, a no-logs policy tested in court, a decent free tier, and it accepts payment even in cash by mail.</li>
<li><strong><a href="https://mullvad.net/"target="_blank" rel="noopener">Mullvad</a></strong>: Sweden, the most paranoid on the market: it does not even ask for an email, your account is a random number. Flat €5/month, accepts cash in an envelope and cryptocurrency. It is the closest thing to an &ldquo;identity-less VPN&rdquo; that exists as a commercial product.</li>
<li>NordVPN and the like work technically, but their money goes more to marketing than to privacy posture. Among the big ones, I stick with the two above.</li>
</ul>
<p><strong>The limit of this phase</strong> is well known: the exit IPs of famous VPNs are public and catalogued. An order from ANPD or Anatel to national ISPs to block those ranges is technically trivial, and the X case showed that pulling the app from the store is also on the menu. When (not if) that happens, the commercial VPN dies in a day. That is why Phase 2 exists.</p>
<blockquote>
  <p><strong>Keep this:</strong> a commercial VPN is a seatbelt: use it always, but know it depends on three things outside your control. The app staying in the store, the IPs staying unblocked, and the provider staying honest.</p>

</blockquote>
<h2>Phase 2: Self-hosted VPN, your own tunnel<span class="hx:absolute hx:-mt-20" id="phase-2-self-hosted-vpn-your-own-tunnel"></span>
    <a href="#phase-2-self-hosted-vpn-your-own-tunnel" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The move here changes shape: instead of subscribing to a service with millions of users and catalogued IPs, you rent a cheap little server outside Brazil and build your personal VPN. There is no public list with your IP for the censors to download. You are one user on an unknown IP, indistinguishable from any other traffic until someone looks closely.</p>
<p><strong>Picking the provider (and why not AWS, Azure or Google Cloud).</strong> The big clouds have huge, public, well-mapped IP ranges (ASNs). Blocking them wholesale is one line in a routing table; the only brake is collateral damage (plenty of legitimate Brazilian businesses live there), and other countries have paid that price in crises. Smaller providers dilute that target. Options I would consider, from mid-sized to small:</p>
<table>
  <thead>
      <tr>
          <th>Provider</th>
          <th>Based in</th>
          <th>Why</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="https://www.hetzner.com/cloud"target="_blank" rel="noopener">Hetzner</a></td>
          <td>Germany/Finland</td>
          <td>Cheap, reliable, out of easy reach</td>
      </tr>
      <tr>
          <td><a href="https://www.ovhcloud.com/"target="_blank" rel="noopener">OVH</a> / <a href="https://www.scaleway.com/"target="_blank" rel="noopener">Scaleway</a></td>
          <td>France</td>
          <td>Same, European jurisdiction</td>
      </tr>
      <tr>
          <td><a href="https://contabo.com/"target="_blank" rel="noopener">Contabo</a></td>
          <td>Germany</td>
          <td>Very cheap, low profile</td>
      </tr>
      <tr>
          <td><a href="https://www.vultr.com/"target="_blank" rel="noopener">Vultr</a> / <a href="https://www.digitalocean.com/"target="_blank" rel="noopener">DigitalOcean</a></td>
          <td>US/global</td>
          <td>Mid-sized, known but not giant</td>
      </tr>
      <tr>
          <td><a href="https://my.frantech.ca/"target="_blank" rel="noopener">BuyVM</a>, <a href="https://hosthatch.com/"target="_blank" rel="noopener">HostHatch</a>, <a href="https://liteserver.nl/"target="_blank" rel="noopener">LiteServer</a></td>
          <td>US/Europe</td>
          <td>Small, off every obvious list</td>
      </tr>
  </tbody>
</table>
<p>A US$ 3 to 5 machine with 1 GB of RAM is plenty for a personal VPN. <strong>Important caveat:</strong> paying for a VPS (virtual private server) with a credit card leaves a trail just like the commercial VPN: your name is in the provider&rsquo;s records, and the provider can be legally compelled. Some accept cryptocurrency, which reduces (does not eliminate) the trail. For most people, at this phase, the signup risk is acceptable: you are not hiding from a named investigation, you are getting out of the aim of a mass block.</p>
<h3>Step by step: WireGuard with wg-easy<span class="hx:absolute hx:-mt-20" id="step-by-step-wireguard-with-wg-easy"></span>
    <a href="#step-by-step-wireguard-with-wg-easy" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I will use <a href="https://github.com/wg-easy/wg-easy"target="_blank" rel="noopener">wg-easy</a>, which packages WireGuard (the modern, fast, auditable VPN protocol) into a Docker container with a web panel and QR codes to set up your phone in seconds.</p>
<p><strong>1. Rent the VPS.</strong> Ubuntu 24.04, the smallest machine available, in a region outside Brazil (Amsterdam, Frankfurt and Helsinki are classic choices for jurisdiction and acceptable latency).</p>
<p><strong>2. Log in and update:</strong></p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ssh root@YOUR_IP
</span></span><span class="line"><span class="cl">apt update <span class="o">&amp;&amp;</span> apt upgrade -y</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><strong>3. Install Docker:</strong></p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -fsSL https://get.docker.com <span class="p">|</span> sh</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><strong>4. Generate the panel password hash</strong> (wg-easy does not accept a plaintext password; write down the password you choose):</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker run --rm -it ghcr.io/wg-easy/wg-easy wgpw <span class="s1">&#39;YourStrongPasswordHere&#39;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># the output looks like: PASSWORD_HASH=$2b$12$abc...</span>
</span></span><span class="line"><span class="cl"><span class="c1"># in the command below, double every dollar sign: $ becomes $$</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><strong>5. Start the container:</strong></p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker run -d <span class="se">\
</span></span></span><span class="line"><span class="cl">  --name<span class="o">=</span>wg-easy <span class="se">\
</span></span></span><span class="line"><span class="cl">  -e <span class="nv">WG_HOST</span><span class="o">=</span>YOUR_IP <span class="se">\
</span></span></span><span class="line"><span class="cl">  -e <span class="nv">PASSWORD_HASH</span><span class="o">=</span><span class="s1">&#39;$$2b$$12$$abc...&#39;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  -v ~/.wg-easy:/etc/wireguard <span class="se">\
</span></span></span><span class="line"><span class="cl">  -p 51820:51820/udp <span class="se">\
</span></span></span><span class="line"><span class="cl">  -p 51821:51821/tcp <span class="se">\
</span></span></span><span class="line"><span class="cl">  --cap-add<span class="o">=</span>NET_ADMIN <span class="se">\
</span></span></span><span class="line"><span class="cl">  --sysctl<span class="o">=</span><span class="s2">&#34;net.ipv4.conf.all.src_valid_mark=1&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --sysctl<span class="o">=</span><span class="s2">&#34;net.ipv4.ip_forward=1&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --restart unless-stopped <span class="se">\
</span></span></span><span class="line"><span class="cl">  ghcr.io/wg-easy/wg-easy</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><strong>6. Open the firewall.</strong> Port 51820/UDP is the tunnel itself. Port 51821/TCP is the panel: <strong>do not leave the panel exposed to the internet</strong>. The right way is to open it only through an SSH tunnel (<code>ssh -L 51821:localhost:51821 root@YOUR_IP</code> and browse to <code>localhost:51821</code>), or to open 51821 just long enough to create your clients and close it right after.</p>
<p><strong>7. Create the clients.</strong> In the panel, one click generates a client with a QR code. Point the official WireGuard app (Android/iOS) camera at it and you are done. On a laptop, download the config file and import it into the WireGuard client.</p>
<p>Done: all of your device&rsquo;s traffic exits through your European server. Your Brazilian ISP sees only a scrambled flow to some random IP in Germany.</p>
<h3>And on your machine, how do you use it?<span class="hx:absolute hx:-mt-20" id="and-on-your-machine-how-do-you-use-it"></span>
    <a href="#and-on-your-machine-how-do-you-use-it" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The server is half the story. On your device, the ritual goes like this:</p>
<p><strong>On your phone (Android/iOS):</strong> install the official <a href="https://www.wireguard.com/install/"target="_blank" rel="noopener">WireGuard</a> app from the store (or from F-Droid on Android). Tap the <strong>&quot;+&quot;</strong>, choose &ldquo;Scan from QR code&rdquo; and point it at the code the wg-easy panel showed. A new &ldquo;tunnel&rdquo; appears in the list: one tap on the switch and you are in. On iOS, enable &ldquo;On-Demand&rdquo; in the tunnel settings so it reconnects by itself when you switch networks (Wi-Fi to 4G, for instance).</p>
<p><strong>On your laptop (Windows/macOS):</strong> download the official WireGuard client for your system, click &ldquo;Import tunnel(s) from file&rdquo; and select the <code>.conf</code> you downloaded from the panel. One click on &ldquo;Activate&rdquo; and done. Important detail: the official client has a <strong>&ldquo;Block untunneled traffic&rdquo;</strong> option (the kill switch): turn it on. If the tunnel drops, your internet stops instead of leaking through your real IP.</p>
<p><strong>On Linux:</strong> copy the <code>.conf</code> to <code>/etc/wireguard/wg0.conf</code> and bring it up with <code>sudo wg-quick up wg0</code> (plus <code>sudo systemctl enable wg-quick@wg0</code> to start it at boot). Or import the file straight into NetworkManager through the graphical interface, if you prefer clicking to typing.</p>
<p>A complete client <code>.conf</code>, for reference, looks like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="k">[Interface]</span>
</span></span><span class="line"><span class="cl"><span class="na">PrivateKey</span> <span class="o">=</span> <span class="s">&lt;THIS device&#39;s private key&gt;</span>
</span></span><span class="line"><span class="cl"><span class="na">Address</span> <span class="o">=</span> <span class="s">10.10.0.2/32</span>
</span></span><span class="line"><span class="cl"><span class="na">DNS</span> <span class="o">=</span> <span class="s">1.1.1.1</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">[Peer]</span>
</span></span><span class="line"><span class="cl"><span class="na">PublicKey</span> <span class="o">=</span> <span class="s">&lt;server public key&gt;</span>
</span></span><span class="line"><span class="cl"><span class="na">Endpoint</span> <span class="o">=</span> <span class="s">SERVER_IP:51820</span>
</span></span><span class="line"><span class="cl"><span class="na">AllowedIPs</span> <span class="o">=</span> <span class="s">0.0.0.0/0</span>
</span></span><span class="line"><span class="cl"><span class="na">PersistentKeepalive</span> <span class="o">=</span> <span class="s">25</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Two details worth their weight in gold here. <code>PersistentKeepalive = 25</code> keeps the tunnel alive when you are behind NAT (home network, 4G), preventing the connection from silently dying. And <code>AllowedIPs = 0.0.0.0/0</code> is what pushes <strong>all</strong> traffic into the tunnel; without it, only traffic to the VPN&rsquo;s own IPs goes out encrypted. (The <code>DNS =</code> line works fine on Windows, macOS and phones; on Linux with systemd-resolved it can get in the way, as I explain in the common mistakes below.)</p>
<p><strong>Checking that it worked:</strong> with the tunnel active, run <code>curl ifconfig.me</code> in a terminal (or open <code>ipleak.net</code> in the browser). It must show your VPS IP, not your home one. If your network has IPv6, check separately with <code>curl -4 ifconfig.me</code> and <code>curl -6 ifconfig.me</code>: <strong>both</strong> must show the server. And visit <code>dnsleaktest.com</code>: DNS must exit through the tunnel too. If your ISP&rsquo;s DNS server shows up, there is a leak to fix.</p>
<p><strong>Minimum maintenance:</strong> enable <code>unattended-upgrades</code> so the system patches itself, use SSH keys instead of passwords, and install nothing else on that machine. Small surface, small risk.</p>
<h3>The 2026 way to do this: let the AI configure it<span class="hx:absolute hx:-mt-20" id="the-2026-way-to-do-this-let-the-ai-configure-it"></span>
    <a href="#the-2026-way-to-do-this-let-the-ai-configure-it" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>If you got stuck on some step, remember it is 2026: you no longer need to master every command in this guide. I went down that path myself. I rented the VPS, handed the SSH access to the AI agent and asked for the full setup; on the other side, on my own machine, it imported the <code>.conf</code>, brought up <code>wg-quick</code>, enabled it at boot and checked for leaks at the end. Today my server is a reproducible Ansible playbook (kill the VPS, spin up another, run one command) and my laptop&rsquo;s config follows the same pattern. All in <strong>private</strong> repositories, private on purpose: VPN configuration is not the sort of thing I want strangers peeking at.</p>
<p><img src="gitea-my-vpnserver.png" alt="My private Gitea repository with the server’s Ansible playbook: “Private” badge, roles, group_vars and an operations README"  loading="lazy" /></p>
<p><em>Mine, running on my own Gitea: private, versioned, and the whole server comes back up with one command.</em></p>
<p>And if you are going to ask an AI to configure it, skip the generic &ldquo;install me a VPN&rdquo; and hand over the real requirements. Something like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Turn this fresh Ubuntu 24.04 VPS into a robust WireGuard server,
</span></span><span class="line"><span class="cl">preferably through an idempotent Ansible playbook (I want to be able to
</span></span><span class="line"><span class="cl">destroy the VPS and recreate everything by running one command).
</span></span><span class="line"><span class="cl">Requirements:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">- WireGuard managed by wg-quick@wg0, server key generated on the server
</span></span><span class="line"><span class="cl">  itself (mode 0600), no exposed web panel
</span></span><span class="line"><span class="cl">- Dual-stack tunnel: IPv4 and IPv6 (fd00::/64 ULA subnet with NAT66), so
</span></span><span class="line"><span class="cl">  no traffic leaks outside on networks with native IPv6
</span></span><span class="line"><span class="cl">- ufw denying everything except SSH and the WireGuard UDP port
</span></span><span class="line"><span class="cl">- key-only sshd (no passwords), fail2ban on sshd, unattended-upgrades
</span></span><span class="line"><span class="cl">  with no automatic reboot
</span></span><span class="line"><span class="cl">- Peers declared as data in a config file: adding a client = adding one
</span></span><span class="line"><span class="cl">  entry and running the playbook again
</span></span><span class="line"><span class="cl">- Generate client .conf files with PersistentKeepalive=25, full-tunnel
</span></span><span class="line"><span class="cl">  AllowedIPs and QR codes via qrencode
</span></span><span class="line"><span class="cl">- At the end, print the verification commands (curl -4/-6 ifconfig.me,
</span></span><span class="line"><span class="cl">  wg show)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Finally, hand me a short operations README: how to add a client, how to
</span></span><span class="line"><span class="cl">update, when to reboot.</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>The difference between a &ldquo;working&rdquo; server and a solid one lives entirely in those requirements: dual-stack, closed firewall, passwordless sshd, peers as data, reproducibility. The technical barrier of this entire article has, in practice, become a conversation.</p>
<h3>Common mistakes (and how to avoid them)<span class="hx:absolute hx:-mt-20" id="common-mistakes-and-how-to-avoid-them"></span>
    <a href="#common-mistakes-and-how-to-avoid-them" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I keep seeing the same stumbles whenever someone sets up their first self-hosted VPN. All avoidable:</p>
<ul>
<li><strong>Exposing the wg-easy panel to the internet.</strong> The number one classic mistake. The panel is the key to the vault: open on port 51821, any botnet scan finds it within hours. SSH tunnel always, open port never.</li>
<li><strong>Weak or recycled passwords on the panel and SSH.</strong> An entire VPN protected by <code>changeme123</code> is worse than no VPN. And disable SSH password login for good (<code>PasswordAuthentication no</code> in <code>sshd_config</code>) once your key is set up.</li>
<li><strong>Thinking you are anonymous because the IP is &ldquo;yours&rdquo;.</strong> The VPS is in your name, paid with your card. It protects you from mass blocking, not from an investigation with your name on it. The wrong level of paranoia creates a false sense of security, which is worse than none.</li>
<li><strong>A VPS in Brazil or from a Brazilian company.</strong> I have seen people build a &ldquo;privacy VPN&rdquo; on a national provider. If the court order arrives in the same country, you did not leave the reach, you just changed shelves. Server abroad, jurisdiction abroad.</li>
<li><strong>Handing out access to half the world.</strong> Each extra person is one more device, one more usage pattern, one more mouth. Close family, fine; a 40-contact group, no. The more people on the same IP, the faster it lands on some list.</li>
<li><strong>Using the same machine for other things.</strong> Personal blog, Telegram bot, seedbox: all of that grows the attack surface and ties together identities you wanted separate. The VPN VPS is for the VPN only.</li>
<li><strong>Trusting without testing for leaks.</strong> After setting up, test: <code>ipleak.net</code> or <code>dnsleaktest.com</code> with the VPN on. If your real IP or your ISP&rsquo;s DNS shows up, something is wrong, and this is the only way you find out.</li>
<li><strong>Forgetting IPv6.</strong> This one got even me: an IPv4-only tunnel on a network with native IPv6, and all the v6 traffic goes around the VPN, in the clear, without you noticing. Either the tunnel is dual-stack, or half of your traffic leaks. Test with <code>curl -6 ifconfig.me</code>.</li>
<li><strong>The <code>DNS =</code> line breaking the Linux client.</strong> On systemd-resolved systems (Ubuntu, Fedora and the like), <code>wg-quick</code> calls openresolv to write the DNS, openresolv refuses to touch the <code>/etc/resolv.conf</code> owned by systemd-resolved (&ldquo;signature mismatch&rdquo; error) and the whole interface fails to come up. If your system DNS already works fine, just remove the line: queries ride the tunnel anyway.</li>
<li><strong>Losing the printer, the NAS and the local network.</strong> With <code>AllowedIPs = 0.0.0.0/0</code>, even traffic inside your own home tries to go through the tunnel. The fix is a policy routing rule evaluated before WireGuard&rsquo;s own rules: <code>PostUp = ip rule add to 192.168.0.0/16 lookup main priority 1000</code> (plus the matching <code>PostDown</code> to undo it on shutdown).</li>
<li><strong>Chaining <code>wg-quick down &amp;&amp; up</code>.</strong> <code>down</code> returns an error when the interface is already down, and with <code>&amp;&amp;</code> the <code>up</code> never runs. Run <code>up</code> on its own.</li>
<li><strong>Installing and abandoning.</strong> A server without updates for a year is a server with known vulnerabilities. And test the connection from time to time: what works today can be fingerprinted tomorrow.</li>
<li><strong>No backup of the configuration.</strong> The <code>~/.wg-easy</code> directory holds everything (keys, clients). Keep an encrypted local copy. If the VPS dies or gets shut down by the provider, you bring another one up in ten minutes instead of starting from zero.</li>
</ul>
<blockquote>
  <p><strong>Keep this:</strong> a US$ 5 VPS outside Brazil running WireGuard gets you out of any mass block based on catalogued IPs. The price is your signup record at the provider: acceptable against blocking, insufficient against a named investigation.</p>

</blockquote>
<h2>The invisible enemy: DPI<span class="hx:absolute hx:-mt-20" id="the-invisible-enemy-dpi"></span>
    <a href="#the-invisible-enemy-dpi" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>So far I have assumed the censor blocks <strong>addresses</strong>. Their next level is blocking <strong>formats</strong>, and that is where deep packet inspection (DPI) lives.</p>
<p>Even encrypted, a VPN tunnel has a signature. The initial handshake of WireGuard and OpenVPN has characteristic packet sizes, sequences and timings. The content is unreadable, but the shape screams &ldquo;I am a VPN&rdquo;. China does exactly this at national scale: it does not need to read your traffic, it only needs to recognize the protocol and drop the connection.</p>
<blockquote>
  <p><strong>Keep this:</strong> the censor does not need to read your traffic to block you. Recognizing the tunnel&rsquo;s shape is enough. That is why obfuscation exists.</p>

</blockquote>
<p>The technical answer is <strong>obfuscation</strong>: making the tunnel look like something else.</p>
<ul>
<li><strong><a href="https://amnezia.org/"target="_blank" rel="noopener">AmneziaWG</a></strong>: a WireGuard fork that injects junk packets and scrambles headers until the signature vanishes. Same audited WireGuard base, free apps for every platform, and it points at the same kind of VPS from Phase 2. If you set up wg-easy, migrating to Amnezia is the natural step when DPI arrives.</li>
<li><strong>udp2raw</strong>: wraps WireGuard&rsquo;s UDP traffic inside fake TCP packets that look like an ordinary connection.</li>
<li><strong>Shadowsocks</strong>: born in China precisely for this, an encrypted proxy designed to have no recognizable signature.</li>
</ul>
<p>Notice we are still talking about free tools and a US$ 5 VPS. The cost rises for the censor much faster than for you.</p>
<h2>Phase 3: when even your VPS is not enough<span class="hx:absolute hx:-mt-20" id="phase-3-when-even-your-vps-is-not-enough"></span>
    <a href="#phase-3-when-even-your-vps-is-not-enough" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>If the scenario degrades to national DPI with protocol blocking, the game becomes heavy camouflage and redundancy. The real options, in order of effort:</p>
<p><strong>Protocols that disguise themselves as ordinary HTTPS.</strong> The current state of the art is <strong>VLESS with Reality</strong> (from the Xray-core project): your traffic presents itself as a legitimate TLS 1.3 connection to a real, innocent website, with certificate, handshake and packet pattern indistinguishable from a normal visit. To block you, the censor would have to block the innocent site too, and the collateral damage is the defense. <strong>Trojan-Go</strong> follows a similar philosophy. <strong>Outline</strong>, from Jigsaw (Google), packages Shadowsocks with a friendly manager if you want to hand out access to family and friends.</p>
<p><strong>Tor with bridges.</strong> Plain Tor is blocked by default in censoring countries, but obfs4 bridges and Snowflake were tailor-made for that scenario: Snowflake disguises your entry into the Tor network as an ordinary WebRTC video call. It is slow, forget streaming, but it is the hardest network to extinguish in existence, maintained precisely for journalists and activists in hostile countries.</p>
<p><strong>Redundancy and rotation.</strong> Two or three cheap VPSs at different providers, with automatic failover. If one lands on a blacklist, you switch in minutes: new instance, new IP. Your cost: another US$ 5. The censor&rsquo;s cost: find and block it again, every time.</p>
<p><strong>Alternative access.</strong> Starlink and other satellite links leave the national ground infrastructure entirely. As long as they are not regulated as well, they are the physical last resort. And for extreme cases, the usual sneakernet: thumb drive, external disk, physical copies.</p>
<p><strong>Client-side hygiene</strong>, valid in every phase:</p>
<ul>
<li><strong>Kill switch on</strong>: if the tunnel drops, the device cuts the internet instead of leaking through your real IP.</li>
<li><strong>DNS leak protection</strong>: your DNS queries must go through the tunnel, otherwise your ISP keeps seeing every site you visit.</li>
<li><strong>WebRTC disabled in the browser</strong> (or use an extension): it leaks your real IP even with the VPN on.</li>
<li><strong>VPN on when needed, not always</strong>: a 24/7 usage pattern becomes a behavioral signature of its own.</li>
</ul>
<p>And the usual honest notes: running your own server for personal use is legal; using it to commit crimes is not. And since 2026, with the new sentence enhancement, &ldquo;using a VPN&rdquo; weighs on the sentence of any crime you would commit anyway. Keep the surface small, test your connectivity from inside Brazil regularly (what works today can be fingerprinted tomorrow), have a plan B (a second VPS, a Tor profile with bridges) and keep offline copies of everything critical.</p>
<p><strong>Realistic assessment:</strong> no solution is permanent against a determined, well-funded censor. The goal here is different: make mass blocking expensive until it becomes a bad deal, technically and politically. A country that needs to take down half of the legitimate internet to silence half a dozen voices has a public relations problem, not a technology one. That cost is where we place our bet.</p>
<blockquote>
  <p><strong>Keep this:</strong> the staircase is commercial VPN, then your own VPN, then obfuscated protocol, then Tor with bridges, then satellite. Each step raises your cost a little and the censor&rsquo;s a lot. Start climbing before you need to.</p>

</blockquote>
<h2>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The Brazilian pattern is what I called censorship by accumulation: no single step looks like the end of the world, and each comes with its little plaque of good intentions. But blocking infrastructure, once built, has no moral owner: it serves today&rsquo;s government and tomorrow&rsquo;s, against today&rsquo;s target and against you.</p>
<p>Free communication infrastructure works exactly the same: also built by accumulation, also brick by brick. A commercial VPN configured today. Your own VPS tomorrow. An obfuscated protocol in the drawer for when it is needed. None of this is paranoia. It works like backups: you do not wait for the disk to fail before starting.</p>
<p>And if you want to follow this frontier closely, a personal recommendation: follow <a href="https://x.com/ayubio"target="_blank" rel="noopener">Ayub</a>. He is the best source on internet infrastructure and state censorship in Brazil today. He was the one who <a href="https://x.com/ayubio/status/2058990595503509513"target="_blank" rel="noopener">sounded the alarm about the VPN criminalization in bill PL 3066/2025</a> months before it became law. And in recent days he has been covering two things the mainstream press barely touched: the handover of over R$ 100 billion in public networks, ducts and federal properties to the carriers and BTG Pactual, and the technical apparatus of the new Marco Civil regulation, which according to him gave Anatel <a href="https://rendageek.com.br/noticias/marco-civil-da-internet-novas-regras/"target="_blank" rel="noopener">remote access to ISPs&rsquo; edge routers</a>. He posts in Portuguese, but your browser&rsquo;s translator handles it. Required reading to understand where the next step of the staircase comes from.</p>
<p>The best time to build your tunnel was before you needed it. The second best time is now.</p>
]]></content:encoded><category>networking</category><category>security</category><category>law-and-regulation</category></item><item><title>Bypassing the GitHub API Block in Brazil</title><link>https://akitaonrails.github.io/en/2026/06/11/bypassing-github-api-block-brazil/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2026/06/11/bypassing-github-api-block-brazil/</guid><pubDate>Thu, 11 Jun 2026 20:00:00 -0300</pubDate><description>&lt;p&gt;This is a Brazil problem today. It may be your problem tomorrow if you live under a government that likes silent network blocks, copyright panic, opaque court orders, or any other flavor of &amp;ldquo;trust us, we know what we are doing.&amp;rdquo; The concrete symptom here is simple: &lt;code&gt;api.github.com&lt;/code&gt; started timing out in Brazil. The main &lt;code&gt;github.com&lt;/code&gt; site opens. SSH clones may keep working. But tools that depend on the GitHub API, like &lt;code&gt;gh&lt;/code&gt;, CI automations, personal scripts, bots, CLIs, dashboards, and anything that queries issues and pull requests, start hanging.&lt;/p&gt;</description><content:encoded><![CDATA[<p>This is a Brazil problem today. It may be your problem tomorrow if you live under a government that likes silent network blocks, copyright panic, opaque court orders, or any other flavor of &ldquo;trust us, we know what we are doing.&rdquo; The concrete symptom here is simple: <code>api.github.com</code> started timing out in Brazil. The main <code>github.com</code> site opens. SSH clones may keep working. But tools that depend on the GitHub API, like <code>gh</code>, CI automations, personal scripts, bots, CLIs, dashboards, and anything that queries issues and pull requests, start hanging.</p>
<p><a href="https://x.com/ayubio/status/2064878070394183955"target="_blank" rel="noopener">Ayub posted on X</a> that this has all the usual signs of a national block ordered by Anatel against <code>api.github.com</code>. In that same context, the tweet he quoted showed <code>api.github.com</code> resolving to <code>4.228.31.149</code>, but with no working route. The author said he tested through VIVO, Claro, and Oracle, and that it only worked through a Miami VPN. In other words: this does not look like &ldquo;my Wi-Fi is down.&rdquo; It looks like a block somewhere in the path.</p>
<p>According to Ayub, this kind of thing often happens in blocking waves, many times after Wednesday meetings with large carriers, inside the Brazilian mechanism for blocking addresses under the excuse of fighting piracy. The problem is the blast radius: instead of taking down only the target, it breaks legitimate infrastructure. Today it was the GitHub API. Tomorrow it can be anything your work depends on.</p>
<p>And yes, I confirmed it from here.</p>
<h2>How to know if you were affected<span class="hx:absolute hx:-mt-20" id="how-to-know-if-you-were-affected"></span>
    <a href="#how-to-know-if-you-were-affected" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>First, test whether the main site opens:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -4 -I --connect-timeout <span class="m">8</span> --max-time <span class="m">12</span> https://github.com/</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Here it worked. Then test the API:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -4 -I --connect-timeout <span class="m">8</span> --max-time <span class="m">12</span> https://api.github.com/</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Here I got:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">curl: (28) Connection timed out after 8002 milliseconds</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now check which IP your system resolves:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">getent ahostsv4 api.github.com</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>In my case:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">4.228.31.149    STREAM api.github.com
</span></span><span class="line"><span class="cl">4.228.31.149    DGRAM
</span></span><span class="line"><span class="cl">4.228.31.149    RAW</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And <code>gh</code> depends on this API too. So commands like these may hang:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">gh api rate_limit
</span></span><span class="line"><span class="cl">gh pr list
</span></span><span class="line"><span class="cl">gh issue list</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If you are a developer and suddenly <code>gh</code> stopped, your release scripts stopped, your PR-listing bot stopped, or some CLI that queries issues started hanging, this may be it. It is not your bug. Your route to <code>api.github.com</code> is being thrown into a hole.</p>
<h2>First try DNS 9.9.9.9<span class="hx:absolute hx:-mt-20" id="first-try-dns-9999"></span>
    <a href="#first-try-dns-9999" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Some people mentioned that changing DNS to <a href="https://www.quad9.net/"target="_blank" rel="noopener">Quad9</a>, <code>9.9.9.9</code>, could work around it. It makes sense to test, because some blocks are done through DNS: the provider returns the wrong IP, NXDOMAIN, or sends you into a sinkhole. If the problem is only your provider&rsquo;s DNS, changing DNS fixes it.</p>
<p>Test without changing anything in the system:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig @9.9.9.9 +short api.github.com A</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>In my case, it did not help. Quad9 also returned:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">4.228.31.149</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And forcing that IP in <code>curl</code> still timed out:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -4 -I --connect-timeout <span class="m">8</span> --max-time <span class="m">12</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --resolve api.github.com:443:4.228.31.149 <span class="se">\
</span></span></span><span class="line"><span class="cl">  https://api.github.com/</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Result:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">curl: (28) Connection timed out after 8002 milliseconds</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>So, on my link, 9.9.9.9 did not fix it. But test yours. If your provider is only poisoning DNS, it may work.</p>
<p>On Arch with NetworkManager, it would be something like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo pacman -S bind-tools curl
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">nmcli con show --active
</span></span><span class="line"><span class="cl">sudo nmcli con mod <span class="s2">&#34;YOUR CONNECTION NAME&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  ipv4.ignore-auto-dns yes <span class="se">\
</span></span></span><span class="line"><span class="cl">  ipv4.dns <span class="s2">&#34;9.9.9.9 149.112.112.112&#34;</span>
</span></span><span class="line"><span class="cl">sudo nmcli con down <span class="s2">&#34;YOUR CONNECTION NAME&#34;</span>
</span></span><span class="line"><span class="cl">sudo nmcli con up <span class="s2">&#34;YOUR CONNECTION NAME&#34;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>On Ubuntu, same idea. Install the tools and adjust through NetworkManager:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install dnsutils curl
</span></span><span class="line"><span class="cl">nmcli con show --active</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Or use the GNOME/KDE network settings screen and set manual DNS to <code>9.9.9.9</code> and <code>149.112.112.112</code> for the connection. Then disconnect and reconnect.</p>
<p>Test again:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short api.github.com A
</span></span><span class="line"><span class="cl">curl -4 -I --connect-timeout <span class="m">8</span> --max-time <span class="m">12</span> https://api.github.com/</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If it works, good. You are done here.</p>
<p>If it keeps timing out, DNS was only the first layer. Then you need to route the connection through another path.</p>
<h2>Why I do not like the fixed-IP hack<span class="hx:absolute hx:-mt-20" id="why-i-do-not-like-the-fixed-ip-hack"></span>
    <a href="#why-i-do-not-like-the-fixed-ip-hack" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Another suggestion I saw was manually adding IPs to local DNS, like Pi-hole, Unbound, <code>/etc/hosts</code>, dnsmasq, that sort of thing. Example: &ldquo;resolve <code>api.github.com</code> to this other IP that works.&rdquo;</p>
<p>That can work for a few hours. I don&rsquo;t like it.</p>
<p>GitHub is large infrastructure. IPs change. Routes change. Load balancing changes. Regions change. The IP that works for somebody in Miami may be bad for you in São Paulo. The IP that works today may fail tomorrow. And if the block is a blackhole route at the provider, changing DNS to another IP may only trade one hole for another.</p>
<p>Pi-hole is great for a home network. Unbound is great. <code>/etc/hosts</code> saves you in an emergency. But pinning the IP of a large service like GitHub is how you forget an invisible hack and lose two hours next month trying to understand why only your machine is broken.</p>
<p>Use alternate DNS as a test. Use fixed IP only as a temporary bandage and document where you changed it.</p>
<h2>Fallback: SOCKS proxy only for GitHub tools<span class="hx:absolute hx:-mt-20" id="fallback-socks-proxy-only-for-github-tools"></span>
    <a href="#fallback-socks-proxy-only-for-github-tools" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>My solution was the least invasive thing I could make: a wrapper that starts a local SOCKS proxy through Tor and runs only the command I choose through it. It does not route the whole system. It does not touch the browser. It does not affect package managers, Steam, banking, nothing. Just <code>gh</code>, or whatever tool I explicitly call.</p>
<p>In my case, the wrapper lives at <code>~/.config/zsh/bin/github-proxy</code>, and the alias in <code>~/.config/zsh/aliases</code> does this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">alias</span> <span class="nv">gh</span><span class="o">=</span><span class="s1">&#39;$HOME/.config/zsh/bin/github-proxy gh&#39;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>The wrapper is this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash
</span></span></span><span class="line"><span class="cl"><span class="nb">set</span> -euo pipefail
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">proxy_host</span><span class="o">=</span><span class="s2">&#34;127.0.0.1&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">proxy_port</span><span class="o">=</span><span class="s2">&#34;9050&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">tor_dir</span><span class="o">=</span><span class="s2">&#34;</span><span class="si">${</span><span class="nv">XDG_RUNTIME_DIR</span><span class="k">:-</span><span class="p">/tmp</span><span class="si">}</span><span class="s2">/github-proxy-tor&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">tor_rc</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$tor_dir</span><span class="s2">/torrc&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">tor_log</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$tor_dir</span><span class="s2">/tor.log&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="o">[[</span> <span class="nv">$#</span> -eq <span class="m">0</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">  <span class="nb">echo</span> <span class="s2">&#34;usage: github-proxy &lt;command&gt; [args...]&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span>
</span></span><span class="line"><span class="cl">  <span class="nb">exit</span> <span class="m">2</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">if</span> ! ss -ltn <span class="s2">&#34;sport = :</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span> <span class="p">|</span> grep -q <span class="s2">&#34;</span><span class="nv">$proxy_host</span><span class="s2">:</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">  mkdir -p <span class="s2">&#34;</span><span class="nv">$tor_dir</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  : &gt;<span class="s2">&#34;</span><span class="nv">$tor_rc</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  tor -f <span class="s2">&#34;</span><span class="nv">$tor_rc</span><span class="s2">&#34;</span> --SocksPort <span class="s2">&#34;</span><span class="nv">$proxy_host</span><span class="s2">:</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span> --DataDirectory <span class="s2">&#34;</span><span class="nv">$tor_dir</span><span class="s2">/data&#34;</span> &gt;<span class="s2">&#34;</span><span class="nv">$tor_log</span><span class="s2">&#34;</span> 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">&amp;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">for</span> _ in <span class="o">{</span>1..60<span class="o">}</span><span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> grep -q <span class="s1">&#39;Bootstrapped 100%&#39;</span> <span class="s2">&#34;</span><span class="nv">$tor_log</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">      <span class="nb">break</span>
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl">    <span class="k">if</span> ! <span class="nb">kill</span> -0 <span class="s2">&#34;</span><span class="nv">$!</span><span class="s2">&#34;</span> 2&gt;/dev/null<span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">      <span class="nb">echo</span> <span class="s2">&#34;github-proxy: tor exited before bootstrap; see </span><span class="nv">$tor_log</span><span class="s2">&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span>
</span></span><span class="line"><span class="cl">      <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="cl">    <span class="k">fi</span>
</span></span><span class="line"><span class="cl">    sleep <span class="m">1</span>
</span></span><span class="line"><span class="cl">  <span class="k">done</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">if</span> ! grep -q <span class="s1">&#39;Bootstrapped 100%&#39;</span> <span class="s2">&#34;</span><span class="nv">$tor_log</span><span class="s2">&#34;</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    <span class="nb">echo</span> <span class="s2">&#34;github-proxy: timed out waiting for tor bootstrap; see </span><span class="nv">$tor_log</span><span class="s2">&#34;</span> &gt;<span class="p">&amp;</span><span class="m">2</span>
</span></span><span class="line"><span class="cl">    <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="cl">  <span class="k">fi</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">HTTPS_PROXY</span><span class="o">=</span><span class="s2">&#34;socks5h://</span><span class="nv">$proxy_host</span><span class="s2">:</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">HTTP_PROXY</span><span class="o">=</span><span class="s2">&#34;socks5h://</span><span class="nv">$proxy_host</span><span class="s2">:</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">ALL_PROXY</span><span class="o">=</span><span class="s2">&#34;socks5h://</span><span class="nv">$proxy_host</span><span class="s2">:</span><span class="nv">$proxy_port</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">exec</span> <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Notice <code>socks5h</code>. That <code>h</code> matters. It makes DNS resolution happen through the proxy, not through your local network. If you use plain <code>socks5://</code>, depending on the library, DNS may still happen locally before the proxy is used. With <code>socks5h://</code>, the idea is: &ldquo;take the hostname to the other side and resolve it there.&rdquo;</p>
<h2>Installing on Arch<span class="hx:absolute hx:-mt-20" id="installing-on-arch"></span>
    <a href="#installing-on-arch" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>On Arch:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo pacman -S tor github-cli iproute2
</span></span><span class="line"><span class="cl">mkdir -p ~/.local/bin</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Create the script:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nano ~/.local/bin/github-proxy</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Paste the wrapper above and make it executable:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod +x ~/.local/bin/github-proxy</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Test it directly:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">~/.local/bin/github-proxy gh api rate_limit --jq .resources.core.limit</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>An authenticated account usually returns:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">5000</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>That is what happened here. Direct timed out. Through the wrapper, <code>gh api rate_limit --jq .resources.core.limit</code> returned <code>5000</code>.</p>
<p>Now add an alias to your shell.</p>
<p>ZSH:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;alias gh=&#39;</span><span class="nv">$HOME</span><span class="s2">/.local/bin/github-proxy gh&#39;&#34;</span> &gt;&gt; ~/.zshrc
</span></span><span class="line"><span class="cl"><span class="nb">source</span> ~/.zshrc</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Bash:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;alias gh=&#39;</span><span class="nv">$HOME</span><span class="s2">/.local/bin/github-proxy gh&#39;&#34;</span> &gt;&gt; ~/.bashrc
</span></span><span class="line"><span class="cl"><span class="nb">source</span> ~/.bashrc</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Test:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">gh api rate_limit --jq .resources.core.limit
</span></span><span class="line"><span class="cl">gh pr list</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<h2>Ubuntu<span class="hx:absolute hx:-mt-20" id="ubuntu"></span>
    <a href="#ubuntu" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>On Ubuntu, the Tor package is easy:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update
</span></span><span class="line"><span class="cl">sudo apt install tor iproute2 curl</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>For GitHub CLI, if the <code>gh</code> package is available in your version:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install gh</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If it is not, follow the official GitHub CLI installation for Ubuntu/Debian. The rest is the same: create <code>~/.local/bin/github-proxy</code>, run <code>chmod +x</code>, and put the alias in <code>.bashrc</code> or <code>.zshrc</code>.</p>
<h2>Better alternatives than Tor<span class="hx:absolute hx:-mt-20" id="better-alternatives-than-tor"></span>
    <a href="#better-alternatives-than-tor" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Tor worked and it is convenient, but it is not the only option. Sometimes it is slow. Sometimes a service dislikes Tor exits. For <code>gh api</code> and listing PRs, fine. For heavier use, you may want something more predictable.</p>
<p>Reasonable options:</p>
<ul>
<li>Normal VPN: Proton, Mullvad, IVPN, your own WireGuard. Route everything or use split tunneling if you know how to configure it.</li>
<li>Tailscale with an exit node outside Brazil: clean, if you have a trusted machine outside the country or a VPS.</li>
<li>SSH SOCKS to a VPS: <code>ssh -N -D 127.0.0.1:9050 user@your-vps</code>. Then use the same <code>HTTPS_PROXY=socks5h://127.0.0.1:9050</code>.</li>
<li>Corporate proxy: if your company has egress outside Brazil, configure only the tools that need it.</li>
</ul>
<p>The care here is not changing everything at the same time. First prove that direct <code>api.github.com</code> fails. Then prove that another path works. Only then automate.</p>
<h2>Adjusting your own tools: ghpending<span class="hx:absolute hx:-mt-20" id="adjusting-your-own-tools-ghpending"></span>
    <a href="#adjusting-your-own-tools-ghpending" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>This block also hit one of my utilities: <a href="https://github.com/akitaonrails/ghpending"target="_blank" rel="noopener">ghpending</a>. I already wrote about it in <a href="/en/2026/05/23/i-built-a-cli-to-check-my-github-pending-stuff-ghpending/">&ldquo;I Built a CLI to Check My GitHub Pending Stuff: ghpending&rdquo;</a>. It lists open issues and pull requests across my repositories, so I know where somebody is waiting for an answer.</p>
<p>The problem is obvious: it uses the GitHub API. If <code>api.github.com</code> falls into a hole, it falls with it.</p>
<p>So I added a proxy fallback. <code>ghpending</code> now reads <code>GITHUB_TOKEN</code> like before, but also tries to use a SOCKS proxy in this order:</p>
<ol>
<li><code>GHPENDING_GITHUB_PROXY</code>, if you want to force a specific proxy.</li>
<li><code>HTTPS_PROXY</code>, <code>https_proxy</code>, <code>ALL_PROXY</code>, or <code>all_proxy</code>, if they are <code>socks5://</code> or <code>socks5h://</code>.</li>
<li>A local SOCKS proxy at <code>127.0.0.1:9050</code>, if one is listening.</li>
<li>If none of that exists, it tries direct access.</li>
</ol>
<p>In the README, it looks like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">GITHUB_TOKEN</span><span class="o">=</span><span class="k">$(</span>gh auth token<span class="k">)</span> ghpending</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And for proxy:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">GHPENDING_GITHUB_PROXY</span><span class="o">=</span>socks5h://127.0.0.1:9050 ghpending</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Or just run it through the wrapper:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">~/.local/bin/github-proxy ghpending</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>My wrapper starts Tor on <code>127.0.0.1:9050</code>; <code>ghpending</code> detects that proxy and uses it for API calls. If you are not blocked, it keeps working directly. If you are blocked, it has an escape route.</p>
<p>This is the kind of fallback every Brazilian dev should now consider for tools that depend on foreign APIs. It is ugly, but the Brazilian internet is getting unpredictable.</p>
<h2>The political problem<span class="hx:absolute hx:-mt-20" id="the-political-problem"></span>
    <a href="#the-political-problem" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>At the end of the thread, <a href="https://x.com/ayubio/status/2064880160893968643"target="_blank" rel="noopener">Ayub reminded everyone</a> that, because of these secret collateral blocks and their side effects, there would already be around 250 million addresses blocked on the Brazilian internet. He also linked a presentation about the state of blocking in Brazil. In another tweet in the same thread, he says authorities defend secrecy as the only alternative left to fight crime.</p>
<p>I do not buy that excuse.</p>
<p>Secret blocking of critical infrastructure, with no transparency, no public adversarial process, no auditable list, no explanation of scope, is operational censorship. In my read, it is illegal precisely because it dodges the public, auditable process that should exist when the State orders internet access to be broken. Maybe it started with pirate TV boxes. Maybe the speech sounds noble. But the mechanism is there: somebody presses a button, carriers apply the block, legitimate users only find out when a work tool stops.</p>
<p>Today, the collateral damage hit honest developers trying to work with GitHub. Tomorrow it hits a Linux package, a container registry, a CDN, a payment API, an authentication service. Then everybody runs to VPNs, Tor, proxies, alternate DNS, <code>/etc/hosts</code>, Pi-hole. Congratulations: little by little, we are rebuilding the survival manual for a censored internet.</p>
<p>No need to overdo the metaphor. Brazil is not China yet. But the smell is the same: centralized opaque blocking, collateral damage, and ordinary users having to learn bypasses to work.</p>
<p>If you were affected, document it. Run the commands. Save outputs. Open an issue with your provider. Complain with data. Share workarounds, but do not normalize this. A bypass is a bandage. The real problem is a State giving itself the power to silently break pieces of the internet.</p>
<p>And if all you wanted was to run <code>gh pr list</code> to review a pull request: welcome to Brazilian infrastructure in 2026.</p>
]]></content:encoded><category>ghpending</category><category>networking</category><category>security</category><category>linux</category></item><item><title>Accessing My Home Server With a Real Domain</title><link>https://akitaonrails.github.io/en/2025/09/09/accessing-my-home-server-with-a-real-domain/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2025/09/09/accessing-my-home-server-with-a-real-domain/</guid><pubDate>Tue, 09 Sep 2025 17:00:00 -0300</pubDate><description>&lt;p&gt;Now an advanced tip that complements my article about my &lt;a href="https://akitaonrails.com/2024/04/03/meu-netflix-pessoal-com-docker-compose/"target="_blank" rel="noopener"&gt;Home Server&lt;/a&gt;. In short, besides my desktop PC, which now runs Omarchy, I have a mini-PC (a simple Intel NUC, it doesn&amp;rsquo;t need to be very powerful), exclusively to run Docker containers.&lt;/p&gt;
&lt;p&gt;I have a nice Synology DS1821+ that also supports running Docker, but I prefer to keep the NAS doing only NAS duties and avoid risking my data by running other stuff on it. Having a single server that does everything isn&amp;rsquo;t a &amp;ldquo;problem&amp;rdquo; per se, but since I can, I prefer to separate things.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Now an advanced tip that complements my article about my <a href="https://akitaonrails.com/2024/04/03/meu-netflix-pessoal-com-docker-compose/"target="_blank" rel="noopener">Home Server</a>. In short, besides my desktop PC, which now runs Omarchy, I have a mini-PC (a simple Intel NUC, it doesn&rsquo;t need to be very powerful), exclusively to run Docker containers.</p>
<p>I have a nice Synology DS1821+ that also supports running Docker, but I prefer to keep the NAS doing only NAS duties and avoid risking my data by running other stuff on it. Having a single server that does everything isn&rsquo;t a &ldquo;problem&rdquo; per se, but since I can, I prefer to separate things.</p>
<p>This Intel NUC runs a headless Ubuntu Server LTS (no desktop manager), which I access only via SSH (as I explained in the <a href="https://akitaonrails.com/en/2025/09/09/omarchy-2-0-understanding-ssh-and-yubikeys/"target="_blank" rel="noopener">previous post about SSH</a>). On it I run things like Portainer, Plex, Sonarr, Bazarr, qBitTorrent and much more.</p>
<p>The way it&rsquo;s set up, I just added an entry to my desktop&rsquo;s <code>/etc/hosts</code> like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>192.168.0.100 synology.lan
192.168.0.200 plex.lan</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><strong>From now on all my domains and IP addresses will be fake, obviously.</strong></p>
<p>Anyway, this way I can open my browser and go to <code>http://plex.lan:32400</code> to access my Plex, for example. But this has three disadvantages:</p>
<ol>
<li>I can only use these hostnames on my desktop; from my laptop I&rsquo;d need to edit the hosts file too. On top of that, I need to know the ports for each container.</li>
<li>I have no SSL for anything, so all authentication goes in plain text. It&rsquo;s not a huge problem because the traffic is only internal on my local LAN. I haven&rsquo;t been accessing it from outside the house.</li>
<li>If I ever want to access it from outside, none of this works.</li>
</ol>
<p>There are dozens of ways to solve this problem, solutions involving WireGuard, or commercial solutions like TailScale and so on. But there&rsquo;s a reasonably simple solution that solves all the problems at once: <strong>Cloudflare Tunnels</strong>.</p>
<p>The idea is to create secure tunnels via Cloudflare to access my services on my internal LAN <strong>WITHOUT</strong> having to expose ports outside my router or anything like that. My network stays isolated and unchanged.</p>
<h3>1. Registering a Domain<span class="hx:absolute hx:-mt-20" id="1-registering-a-domain"></span>
    <a href="#1-registering-a-domain" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The first recommendation is to register a real domain. Doing this lets you have real SSL certificates that Cloudflare itself manages and renews automatically.</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/screenshot-2025-09-09_16-52-14.png" alt="Cloudflare Domain"  loading="lazy" /></p>
<p>I have a few domains registered and I&rsquo;m not going to reveal which one I use for my Home Server. I&rsquo;ll use this empty <strong>fabioakita.dev</strong> as an example just for this post.</p>
<p>Domains are cheap, around USD 12 per year, depending on the name you choose. Pick one that&rsquo;s short and easy to type.</p>
<h3>2. Installing Cloudflared<span class="hx:absolute hx:-mt-20" id="2-installing-cloudflared"></span>
    <a href="#2-installing-cloudflared" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>With the domain created, now we need to install the <a href="https://pkg.cloudflare.com/index.html"target="_blank" rel="noopener"><strong>cloudflared</strong></a> service on the Home Server. It&rsquo;s the one that connects to Cloudflare&rsquo;s servers and opens the tunnel into my local server. Click the link for installation instructions, but on an Ubuntu Server 22.04 it goes like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Add cloudflare gpg key</span>
</span></span><span class="line"><span class="cl">sudo mkdir -p --mode<span class="o">=</span><span class="m">0755</span> /usr/share/keyrings
</span></span><span class="line"><span class="cl">curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg <span class="p">|</span> sudo tee /usr/share/keyrings/cloudflare-main.gpg &gt;/dev/null
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Add this repo to your apt repositories</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s1">&#39;deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main&#39;</span> <span class="p">|</span> sudo tee /etc/apt/sources.list.d/cloudflared.list
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># install cloudflared</span>
</span></span><span class="line"><span class="cl">sudo apt-get update <span class="o">&amp;&amp;</span> sudo apt-get install cloudflared</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now we need to log in:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># login</span>
</span></span><span class="line"><span class="cl">sudo cloudflared tunnel login
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># add the homelab tunnel</span>
</span></span><span class="line"><span class="cl">sudo cloudflared tunnel create homelab
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># create the config directory</span>
</span></span><span class="line"><span class="cl">sudo mkdir -p /etc/cloudflared</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Use the same credentials you use to log in to the Cloudflare website. If everything goes well, at the end it will create a file at <code>/root/.cloudflared/xxxxx-yyyy-zzzz...json</code>, which holds your credentials, just like an SSH private key, so don&rsquo;t throw it on a USB stick or some cloud drive. Keep it very safe. Let&rsquo;s move it:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo mv /root/.cloudflared/*.json /etc/cloudflared
sudo chmod 600 /etc/cloudflared/*.json</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Finally, we need to create a configuration file <code>/etc/cloudflared/config.yml</code> with all the hostnames we want for each of the containers, pointing to the correct ports. Here&rsquo;s a snippet of my config, modified with fake IPs and the fake domain:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="c"># /etc/cloudflared/config.yml</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">tunnel</span><span class="p">:</span><span class="w"> </span><span class="l">homelab</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">credentials-file</span><span class="p">:</span><span class="w"> </span><span class="l">/etc/cloudflared/xxxx-yyyy-....json</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">ingress</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="l">...</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">plex.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.254:32400</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">plex.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">immich.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:2283</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">immich.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">overseer.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:5055</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">overseer.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">syncthing.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:8384</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">qbittorrent.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">radarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:7878</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">radarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">sonarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:8989</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">sonarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">bazarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:6767</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">bazarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">prowlarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:9696</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">prowlarr.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">portainer.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:9000</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">portainer.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">grafana.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http://192.168.0.200:3001</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">originRequest</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">httpHostHeader</span><span class="p">:</span><span class="w"> </span><span class="l">grafana.fabioakita.dev</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">http_status:404</span><span class="w"> </span><span class="c"># this has to be the LAST ONE</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>As you can see, it&rsquo;s an extremely simple file. I think anyone can understand what it does. Modify it for your own needs.</p>
<p>After saving the file and going back to the command line, you have to manually run this command for each hostname:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo cloudflared tunnel route dns homelab plex.fabioakita.dev</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>But that&rsquo;s a lot of work with this many hostnames, so I found it easier to create a script <code>/etc/cloudflared/add.sh</code> like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># run only once</span>
</span></span><span class="line"><span class="cl"><span class="nv">TUN</span><span class="o">=</span>homelab
</span></span><span class="line"><span class="cl"><span class="nv">CONF</span><span class="o">=</span>/etc/cloudflared/config.yml
</span></span><span class="line"><span class="cl">grep -E <span class="s1">&#39;^[[:space:]]*-[[:space:]]*hostname:&#39;</span> <span class="s2">&#34;</span><span class="nv">$CONF</span><span class="s2">&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="p">|</span> awk <span class="s1">&#39;{print $3}&#39;</span> <span class="p">|</span> tr -d <span class="s1">&#39;&#34;&#39;</span> <span class="p">|</span> tr -d <span class="s2">&#34;&#39;&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="p">|</span> <span class="k">while</span> <span class="nb">read</span> -r h<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="nb">echo</span> <span class="s2">&#34;adding </span><span class="nv">$h</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">    sudo cloudflared tunnel route dns <span class="s2">&#34;</span><span class="nv">$TUN</span><span class="s2">&#34;</span> <span class="s2">&#34;</span><span class="nv">$h</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="k">done</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now just run: <code>sudo sh /etc/cloudflared/add.sh</code>, <strong>only once!</strong> So make sure your config file is correct first!</p>
<p>Finally, we can configure the service to restart by itself on every boot:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo cloudflared --config /etc/cloudflared/config.yml service install
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">sudo systemctl <span class="nb">enable</span> --now cloudflared</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<h3>3. Accessing your services via the tunnel<span class="hx:absolute hx:-mt-20" id="3-accessing-your-services-via-the-tunnel"></span>
    <a href="#3-accessing-your-services-via-the-tunnel" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>If nothing went wrong, you&rsquo;re done! You can go straight to your browser and test it:</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/screenshot-2025-09-09_17-06-40.png" alt="Immich"  loading="lazy" /></p>
<p>How cool is that. Notice in the URL bar I typed <code>https://immich.fabioakita.dev</code> and it just worked. By the way, if you didn&rsquo;t know it, <a href="https://immich.app/"target="_blank" rel="noopener">Immich</a> works identically to Google Photos, except entirely under your control! It has a smartphone app and syncs nicely.</p>
<p>More importantly, notice it&rsquo;s on <strong>HTTPS</strong>, which was provided by Cloudflare for my entire domain. When I log in, it will go through an <strong>encrypted tunnel</strong>. And more than that: even if I&rsquo;m on 5G, away from home, on my phone, I&rsquo;ll be able to access my photos using this address!</p>
<p>From my phone it opens a secure tunnel to Cloudflare, and that <code>cloudflared</code> service on my home server also has a secure tunnel open to Cloudflare, so Cloudflare bridges the two tunnels and done! I have remote access without exposing my server directly to the internet! The best of both worlds!</p>
<p>Don&rsquo;t forget to configure all your services with strong passwords (I generate them via Bitwarden, but any service works, 1Password or whatever):</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/screenshot-2025-09-09_17-10-15.png" alt="Radarr General Auth Settings"  loading="lazy" /></p>
<h3>4. Bridge to vlans<span class="hx:absolute hx:-mt-20" id="4-bridge-to-vlans"></span>
    <a href="#4-bridge-to-vlans" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I don&rsquo;t remember exactly why, but my Plex container alone gave me more trouble. That&rsquo;s because it uses a different VLAN than the others. Again, I don&rsquo;t remember why I did this at the time, but it looks like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="w">  </span><span class="nt">plex</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="c">#image: plexinc/pms-docker:latest</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">linuxserver/plex:latest</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">restart</span><span class="p">:</span><span class="w"> </span><span class="l">unless-stopped</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">TZ=America/Sao_Paulo</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">PUID=1026</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">PGID=1026</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">VA_DRIVER=IHD</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">PLEX_HW_TRANS_MAX=16</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">PLEX_MEDIA_SERVER_OPTS=--network-host</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/config:/config</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/data:/data</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/transcode:/transcode</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/Videos:/media</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">devices</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/dev/dri:/dev/dri</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/dev/bus/usb:/dev/bus/usb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">healthcheck</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">test</span><span class="p">:</span><span class="w"> </span><span class="l">curl --connect-timeout 15 --silent --show-error --fail http://localhost:32400/identity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">interval</span><span class="p">:</span><span class="w"> </span><span class="l">1m00s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l">15s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">start_period</span><span class="p">:</span><span class="w"> </span><span class="l">1m00s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">mem_limit</span><span class="p">:</span><span class="w"> </span><span class="l">4g</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cpus</span><span class="p">:</span><span class="w"> </span><span class="m">5.0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">networks</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">plex_macvlan</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">ipv4_address</span><span class="p">:</span><span class="w"> </span><span class="m">192.168.0.254</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">mac_address</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;xx:xx:xx:xx:xx:xx&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">networks</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">plex_macvlan</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">external</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">plex_macvlan</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Because of this, <code>cloudflared</code> can&rsquo;t route to that container. The way to fix it is by creating a bridge from that vlan to my ethernet.</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo ip link add macvlan0 link enp3s0 <span class="nb">type</span> macvlan mode bridge
</span></span><span class="line"><span class="cl">sudo ip addr add 192.168.0.200/24 dev macvlan0   <span class="c1"># free IP in your LAN</span>
</span></span><span class="line"><span class="cl">sudo ip link <span class="nb">set</span> macvlan0 up</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Obviously, replace <code>enp3s0</code> with the correct name of your ethernet interface. Check with <code>ip addr</code> or <code>ip link</code>, for example. Just by running the commands above, if I go to the browser and type <code>https://plex.fabioakita.dev</code> it should already work. To make this permanent, we need systemd:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="c"># /etc/systemd/network/80-macvlan0.netdev</span>
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">NetDev</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">Name</span><span class="p">=</span><span class="nx">macvlan0</span>
</span></span><span class="line"><span class="cl"><span class="nx">Kind</span><span class="p">=</span><span class="nx">macvlan</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">MACVLAN</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">Mode</span><span class="p">=</span><span class="nx">bridge</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="c"># /etc/systemd/network/80-macvlan0.network</span>
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">Match</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">Name</span><span class="p">=</span><span class="nx">macvlan0</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">Network</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">Address</span><span class="p">=</span><span class="mf">192.168</span><span class="p">.</span><span class="mf">0.200</span><span class="err">/</span><span class="mi">24</span>
</span></span><span class="line"><span class="cl"><span class="nx">Gateway</span><span class="p">=</span><span class="mf">192.168</span><span class="p">.</span><span class="mf">0.1</span>
</span></span><span class="line"><span class="cl"><span class="nx">DNS</span><span class="p">=</span><span class="mf">192.168</span><span class="p">.</span><span class="mf">0.1</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And now, just restart the services:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl restart systemd-networkd
</span></span><span class="line"><span class="cl">ip addr show macvlan0</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>The &ldquo;correct&rdquo; thing would be to have my Plex configured with <code>network_mode: host</code>, but, again, I don&rsquo;t remember why it wasn&rsquo;t, and I wasn&rsquo;t in the mood to unconfigure everything just to find out. In case anyone has similar setups, this is how you bypass it.</p>
<p>Speaking of Plex, I had heard that you have to be careful with streaming via cloudflared, I don&rsquo;t know if there are limits or extra costs. I found <a href="https://mythofechelon.co.uk/blog/2024/1/7/how-to-set-up-free-secure-high-quality-remote-access-for-plex"target="_blank" rel="noopener">this article</a> that talks more about it but I didn&rsquo;t stop to look into it deeply. The only extra thing I did, on the Cloudflare dashboard, was add a rule to not do <strong>CACHING</strong> on the <code>plex</code> subdomain, to avoid additional costs.</p>
<h3>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>As you can see, it&rsquo;s extremely easy to have a home server, isolate everything with Docker, and then expose your containers via a secure tunnel for remote access. None of this means instant security. Make sure your containers are always up to date using services like <a href="https://github.com/containrrr/watchtower"target="_blank" rel="noopener">Watchtower</a>, make sure each service has strong, random, unique passwords - don&rsquo;t use the same password for everything. Make sure your firewall is well configured and active, even on a LAN.</p>
<p>Many modern Wi-Fi routers let you create a separate VLAN for guest Wi-Fi. That way guests can use your Wi-Fi but can&rsquo;t see your computers, which will be logically isolated on another VLAN. Check your router&rsquo;s documentation. I use a <strong>TP-Link BE1900 Tri-Band Wi-Fi 7</strong>, but for most people it&rsquo;s too expensive and overkill. Do your research. And don&rsquo;t bother asking me about other models: I haven&rsquo;t tested all of them to know the differences.</p>
<p>If you saw names like Radarr, Sonarr and don&rsquo;t know what they mean, read the <a href="https://wiki.servarr.com/"target="_blank" rel="noopener">Servarr Wiki</a>, which consolidates all the documentation for these services in one place. It&rsquo;s the infrastructure that lets you have your own &ldquo;Personal Netflix&rdquo;.</p>
<p>Also, don&rsquo;t ask me why I use Plex and not Jellyfin. It&rsquo;s a personal choice, pick what&rsquo;s best for you. I like Plex, I&rsquo;ve used Jellyfin, and I don&rsquo;t plan to switch.</p>
<p>I hate the idea of paying subscriptions for everything and owning nothing. I think it&rsquo;s money thrown away. I prefer to <strong>OWN</strong> my own things under <strong>MY CONTROL</strong>. It&rsquo;s more expensive, it&rsquo;s more work. Too much convenience means you have control over nothing and always depend on others.</p>
<p>I hate depending on others.</p>
]]></content:encoded><category>homelab</category><category>networking</category><category>containers</category></item><item><title>Configuring My Synology NAS with NFS on Linux</title><link>https://akitaonrails.github.io/en/2025/04/17/configuring-my-synology-nas-with-nfs-on-linux/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2025/04/17/configuring-my-synology-nas-with-nfs-on-linux/</guid><pubDate>Thu, 17 Apr 2025 20:40:00 -0300</pubDate><description>&lt;p&gt;3 posts on the same day, but I took the day off to fix my Linux problems, so here is one more note for my future self.&lt;/p&gt;
&lt;p&gt;Everyone who follows me, particularly on &lt;a href="https://www.instagram.com/akitaonrails/"target="_blank" rel="noopener"&gt;Instagram&lt;/a&gt;, knows about my NAS saga. In particular my new Synology DS1821+ with more than &lt;strong&gt;100TB&lt;/strong&gt; (4x 12TB HDs and 4x 20TB HDs, and I already have 4 more 20TB HDs to upgrade in the future when I need to). I use it for a lot of stuff, particularly my &lt;a href="https://www.akitaonrails.com/2024/04/03/meu-netflix-pessoal-com-docker-compose"target="_blank" rel="noopener"&gt;Personal Netflix&lt;/a&gt; that I explained in that other post on how I set it up with Docker.&lt;/p&gt;</description><content:encoded><![CDATA[<p>3 posts on the same day, but I took the day off to fix my Linux problems, so here is one more note for my future self.</p>
<p>Everyone who follows me, particularly on <a href="https://www.instagram.com/akitaonrails/"target="_blank" rel="noopener">Instagram</a>, knows about my NAS saga. In particular my new Synology DS1821+ with more than <strong>100TB</strong> (4x 12TB HDs and 4x 20TB HDs, and I already have 4 more 20TB HDs to upgrade in the future when I need to). I use it for a lot of stuff, particularly my <a href="https://www.akitaonrails.com/2024/04/03/meu-netflix-pessoal-com-docker-compose"target="_blank" rel="noopener">Personal Netflix</a> that I explained in that other post on how I set it up with Docker.</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/4egervwxarfvls2uw3kg5k13i3hd" alt="Synology DSM"  loading="lazy" /></p>
<p>In the highlights and posts about it on Insta I already discussed details of this NAS, but to summarize:</p>
<ul>
<li>I prefer Synology because deep down it is a Linux box with the BTRFS filesystem (which I like), which is almost as flexible but easier to use than ZFS. And yes, I know unraid, TrueNAS and others exist. But I think Synology DSM is very competent (there is an open source version if you want), and it does everything I need.</li>
<li>I prefer Plex over Emby or Jellyfin. I have tested them, but Plex&rsquo;s support for TV and mobile apps is much better in my opinion, the player is more stable, and I also think its organization features are more robust.</li>
<li>Why not just use Cloud? First because it is slow. My fiber is only 1Gbps and upload is half of that. Second because my internal network is ultra fast (10Gbps) and much better. Third because nothing in the &ldquo;Cloud&rdquo; has any guarantee, they can block you, they can get hacked, they can delete things by accident. Fourth, everything that is mine, I like it being <strong>really</strong> mine, within my reach, under my total control, with nobody to mess with my property. It costs more, it is a choice. I literally have more and better movies and series than Netflix with content you will not easily find in any streaming service anymore, for example.</li>
</ul>
<p>In fact, I trust &ldquo;cloud&rdquo; so little that I use it but I keep a copy of everything on my local NAS using the Cloud Sync app from the Synology store:</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/deednjd3ii774b5b7jdxu1azox3x" alt="Cloud Sync"  loading="lazy" /></p>
<p><strong>&ldquo;Yeah, but what if your NAS dies in some unrecoverable way and you lose EVERYTHING?!&rdquo;</strong></p>
<p>No backup is complete unless it follows the <strong>3-2-1 Mantra</strong>, remember??</p>
<ul>
<li><strong>3 copies, 2 media types, 1 off-site</strong></li>
</ul>
<p>I have some things recorded on Millennial Discs (mdiscs, which are like Blu-Rays but made of inorganic material that never degrades). And I make copies of the most important things from my NAS to Amazon Glacier using the &ldquo;Glacier Backup&rdquo; app that is also in the Synology store.</p>
<p>Glacier is like S3 but much cheaper because it does not have easy access or fast transfer. It is built for backups, where you write once and almost never access again. <strong>ENCRYPTED</strong>, of course.</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/y83uw9rtu8p5hgsq0ugyanb5cibj" alt="Glacier Backup"  loading="lazy" /></p>
<p>Notice how little I trust cloud, like dropbox, that I make a copy on my NAS and send it to another cloud. There are things with multiple copies indeed. I do not trust anyone&rsquo;s service, some human will always commit a catastrophic mistake one day, it is just a matter of time.</p>
<p>Oh yes, and I do download a lot of things from torrent and I consider myself a Power User and I know what is malware/virus and what is not, and I know how they work. But I am also human, so all my Windows machines have at least Windows Defender active, Malwarebytes which I also like, and even so I still run yet another antivirus on the NAS as well, which is also in the Synology store. I do not trust anything without redundancy of everything, under my total control.</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/bekpbla77t4o4uxcysqks18racwc" alt="antivirus"  loading="lazy" /></p>
<p>More importantly, and the reason I choose BTRFS both on the NAS and on my PC: <strong>snapshots</strong>. It takes snapshots of everything periodically. So, if at some point I run a botched <code>rm -Rf</code>, I lose nothing, I just go back to the previous snapshot and everything will be there, intact. Snapshots are smart, they take almost no space, because in BTRFS the same binary content of identical files points to the same physical location. It does not work like <code>rsync</code> that actually duplicates everything and doubles the space used.</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/zhbq7dv8ai8jupqwj3zqvmetq5yk" alt="Synology Snapshots"  loading="lazy" /></p>
<p>On your Linux PC/notebook, with BTRFS, install the Timeshift program to do the same thing. The best part: if one day you update your system and it does not boot or something breaks after an update, it is easy: just reboot and choose the previous snapshot in GRUB and that is it, it will go back exactly as it was before the update. On Arch/Manjaro it is smart and already takes snapshots automatically every time before <code>pacman</code> runs:</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/n20yo00ztofrjsu6p6678wmfphdd" alt="Timeshift"  loading="lazy" /></p>
<p>Anyway, another use is for personal code projects on my Linux. On the mini-PC I use on the TV as a media center, I run Windows 11. Because I use it connected to another eGPU with an RTX 4060 and I use Steam for games. Yes, many Steam games run on Linux, there is Bazzite, etc. But there are things that only run on Windows and I preferred convenience. I only use it for games and media, so screw it, it works plug and play.</p>
<p>My other home server mini-PC is where my Docker stuff for media center, torrent, plex server and everything else runs. It is a headless Ubuntu LTS. Plus my handhelds like the Rog Ally X that runs Windows. All of them have access to my Synology NAS, where I expose shared folders with SMB and that is it. Plug and play.</p>
<p>I used to do the same on my Manjaro Linux: mount the folders with SMB. But this has a problem if I want to code something and want to use Git: in SMB there are no chmod attributes (like the +x flag for executable scripts) and every time I do git push, it messes up all the permissions of everything. It is a huge pain. Anyone who has used Git on Windows knows this.</p>
<p>I cannot keep scripts executable in this shared directory. So it makes my life hard on Linux. So I decided to fix this once and for all and do the right thing: stop using SMB and start using NFS, which is the native Linux way to access shared folders on the network from another Linux server (if the server were Windows, then it would have to be SMB, but nobody in their right mind sets up a NAS with Windows Server).</p>
<p>In SMB, the service ignores filesystem ownership and permissions. I create users and assign them to the service, not to the files. Just log in with that user and it will have access to the files. So there is no way to do <code>chown</code> and change ownership, nor <code>chmod</code> to change permissions individually on the files, it is all normalized.</p>
<p>In NFS, the service exposes exactly the ownership and permissions on the filesystem directly, without an ACL middleman to check permissions on the side. So I have the same level of access to those attributes that I have on the local files of my Linux, which is what I want.</p>
<p>But Synology does an annoying thing for some reason. On any Linux, the first user and first group created are usually UID: 1000 and GID: 1000. Try it, go to your terminal and run <code>id [your user]</code>:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>❯ id akitaonrails
uid=1000(akitaonrails) gid=1000(akitaonrails) groups=1000(akitaonrails),998(wheel),996(audio),994(input),...</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>So it does not matter whether you do <code>chown akitaonrails:akitaonrails foo.txt</code> or <code>chown 1000:1000 foo.txt</code>. In practice, the identifier number is what matters, not the name.</p>
<p>With NFS, if on the Synology side there is a user with the same UID and GID number, I automatically have permission. But when you create users on Synology, for whatever reason, it starts creating them with IDs above <strong>1020 instead of 1000</strong>. So I have an &ldquo;akitaonrails&rdquo; user on Synology with UID 1026 instead of 1000.</p>
<p>Even being able to mount the shared folder with NFS, if I try to use Git, for example, it detects that my local UID is 1000 and the files have ownership of UID 1026:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>git st fatal: detected dubious ownership in repository at &#39;/mnt/gigachad/Projects/dotfiles&#39; To add an exception for this directory, call: 

	git config --global --add safe.directory /mnt/gigachad/Projects/dotfiles</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>I cannot keep using mixed UIDs, it becomes a mess as bad as SMB. There are mapping tricks and other hacks, but there are only two &ldquo;cleaner&rdquo; solutions:</p>
<ul>
<li>change my Linux UID/GID to also be 1026</li>
<li>create a new user on Synology, change its ID to 1000 and chown all files to this new user.</li>
</ul>
<p>I chose the second option. The first thing is to enable SSH access on the NAS (the ideal is to leave such things off, for security, but I am on a private local network so the risk is minimal):</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/jpanifwk7guaxaekpoph0hty61ve" alt="SSH Synology"  loading="lazy" /></p>
<p>At a minimum I always change the default SSH port, out of habit, but it does not really matter. You need to know how to use SSH, I will not teach it here, there is ChatGPT for that.</p>
<p>Now, create a new standard user:</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/l6surkfy60whkaqri8m2rzqrq7d2" alt="Novo Usuário"  loading="lazy" /></p>
<p>Let&rsquo;s also make sure the NFS service is on, since I am going to start using it (by default it comes off, with only SMB on because the majority of clients are Windows PCs):</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/tpyix3dfkc0h2i4x4iaad99djffj" alt="Enable NFS"  loading="lazy" /></p>
<p>Now SSH into the NAS and edit the UID and GID, first by editing <code>/etc/passwd</code> and finding a line like:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>akitaonrails-nfs:x:10xx:10xx:...</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And changing it to:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>akitaonrails-nfs:x:1000:1000:...</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now editing <code>/etc/group</code> and the same thing, changing the newly created <code>akitaonrails-nfs</code> group to <code>1000</code> as well. Done, now I have a user with UID 1000 and GID 1000 created. The name is not the same as on my PC but that does not matter, only the numbers.</p>
<p>In the Synology DSM GUI, do not forget to add permissions for each shared folder, for NFS:</p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/x5q0fmb5u6qxd7ahe7f7nquoy73k" alt="NFS permissions"  loading="lazy" /></p>
<p>Still over SSH, you have to change the ownership and fix the permissions of <strong>ALL FILES</strong> and in my case, with terabytes, it took QUITE a while, just leave it running there:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo chown -R 1000:1000 /volume1/GIGACHAD
sudo chmod -R 0755 /volume1/GIGACHAD</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If I want to disconnect from SSH and leave it running there (since it is going to take a long time), just run it detached from the SSH session with <code>nohup</code>:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>nohup chown -R 1000:1000 /volume1/GIGACHAD &gt; /tmp/chown.log 2&gt;&amp;1 &amp;</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>One thing to be careful about is not doing something like <code>chmod -R -x</code> on everything. First: directories need to have the execute bit and if you remove it, you will no longer be able to navigate directories, so you have to separate fixing directories from files. Second: it is good to apply this fix on directories to make sure no files were left with the executable bit (which can create security problems, imagine random files inside Node modules directories). Third: directories like &ldquo;#snapshot&rdquo; are for filesystem control and are read-only, trying to mess with them will only eat A LOT of time, so it is better to filter them out and not touch them.</p>
<p>Or make a script with this and run it with nohup so you can leave SSH while waiting for it to run (in my case, with terabytes, it takes hours):</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>nohup /tmp/fix-terachad-perms.sh &gt; /dev/null 2&gt;&amp;1 &amp;</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>There are still some hidden little problems. Still on the Synology SSH you have to change the <code>/etc/exports</code> that NFS uses because it still maps by default to user UID 1026 and 100, you have to change both to 1000:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code># old
sudo cat /etc/exports
Password:

/volume1/GIGACHAD       192.168.0.0/24(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
/volume1/TERACHAD       192.168.0.0/24(rw,async,no_wdelay,crossmnt,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>The problem with messing with system files like this is that you do not know if touching the NFS permissions GUI, or if updates come, will revert it to how it was before. If anyone knows of a more permanent solution, let me know.</p>
<p>And done, with all this, just unconfigure the CIFS/SMB configuration I had and replace it with NFS. I prefer to use <a href="https://wiki.archlinux.org/title/Autofs"target="_blank" rel="noopener">AutoFS</a> to do this. I had an <code>auto.cifs</code> before, which I can now delete. And create a new <code>/etc/autofs/auto.nfs</code> like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>gigachad  -fstype=nfs4,rw,nosuid,noatime 192.168.0.xx:/volume1/GIGACHAD
terachad  -fstype=nfs4,rw,nosuid,noatime 192.168.0.xx:/volume1/TERACHAD</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And replace the <code>auto.cifs</code> line in <code>/etc/autofs/auto.master</code> with this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>/mnt  /etc/autofs/auto.nfs --timeout=60 --ghost --browse</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now restart the service:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo systemctl daemon-reexec
sudo systemctl restart autofs</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And done, everything mounted with NFS and now I have full support for native Linux ownership and permissions, without the overhead and incompatibilities of crappy SMB. It was a bit scary doing chown and chmod en masse, but it is a NAS with BTRFS. It has RAID to handle data corruption, it has snapshots if I need to revert something. That is the advantage of having safety systems: you can do things knowing that if something goes wrong, there is a way to revert. That peace of mind is priceless.</p>
]]></content:encoded><category>homelab</category><category>linux</category><category>networking</category></item><item><title>[Discussion] Can we protect our work from DNS providers suffering DDoS attacks?</title><link>https://akitaonrails.github.io/en/2016/10/31/discussion-can-we-protect-our-work-from-dns-providers-suffering-ddos-attacks/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2016/10/31/discussion-can-we-protect-our-work-from-dns-providers-suffering-ddos-attacks/</guid><pubDate>Mon, 31 Oct 2016 15:00:00 -0200</pubDate><description>&lt;p&gt;A few days ago we witnessed a coordinated &lt;a href="https://dyn.com/blog/dyn-statement-on-10212016-ddos-attack/"target="_blank" rel="noopener"&gt;DNS amplification attack&lt;/a&gt; against Dyn DNS. There are many problems along the way, a lot of &lt;a href="https://threatpost.com/mirai-fueled-iot-botnet-behind-ddos-attacks-on-dns-providers/121475/"target="_blank" rel="noopener"&gt;blaming&lt;/a&gt;, and lots of &lt;a href="http://dyn.com/blog/ddos-attacks-bcp38-internet-security-cloudflare-downtime-managed-dns-open-recursives/"target="_blank" rel="noopener"&gt;possible solutions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Bottom line is that attacks like this will probably &lt;a href="https://github.com/emc-advanced-dev/unik/wiki/Worried-about-IoT-DDoS%3F-Think-Unikernels"target="_blank" rel="noopener"&gt;happen again, more often&lt;/a&gt;. The more poorly managed online devices (IoT) we add to the network, the more open recursive DNS servers around, and the more blackhat hackers learn how easy it is to run attacks like this, the worse it will become.&lt;/p&gt;</description><content:encoded><![CDATA[<p>A few days ago we witnessed a coordinated <a href="https://dyn.com/blog/dyn-statement-on-10212016-ddos-attack/"target="_blank" rel="noopener">DNS amplification attack</a> against Dyn DNS. There are many problems along the way, a lot of <a href="https://threatpost.com/mirai-fueled-iot-botnet-behind-ddos-attacks-on-dns-providers/121475/"target="_blank" rel="noopener">blaming</a>, and lots of <a href="http://dyn.com/blog/ddos-attacks-bcp38-internet-security-cloudflare-downtime-managed-dns-open-recursives/"target="_blank" rel="noopener">possible solutions</a>.</p>
<p>Bottom line is that attacks like this will probably <a href="https://github.com/emc-advanced-dev/unik/wiki/Worried-about-IoT-DDoS%3F-Think-Unikernels"target="_blank" rel="noopener">happen again, more often</a>. The more poorly managed online devices (IoT) we add to the network, the more open recursive DNS servers around, and the more blackhat hackers learn how easy it is to run attacks like this, the worse it will become.</p>
<p>Now, how does one mitigate this kind of problem?</p>
<p>What I will suggest now is not the be-all and end-all solution. As a disclaimer, I am neither a whitehat hacker nor a fully experienced systems administrator. If you are, please by all means let me know in the comments section below if what I am saying is totally busted or if it actually works the way I am describing.</p>
<p>I have a small company where up to 100 people work every day, either as software developers or performing administrative back-office work. We need access to a number of services such as GitHub, CodeClimate, Google Apps, Dropbox, and a number of internal services such as GitLab, Mattermost and so on.</p>
<p>When the DynDNS attack happened, we had some problems for a few hours. We didn&rsquo;t go total dark, though.</p>
<p>Some of the internal services we use were not affected because the authoritative DNS was not DynDNS. So our internal chat app, Mattermost, for example, remained responsive and online. The same for GitLab. So we didn&rsquo;t stop all our work duties. But some of our projects in GitHub and deployments over Heroku became compromised.</p>
<p>So this is the mitigation plan I am testing: installing my own DNS recursive/forwarder server. I want to forward all DNS queries to some public recursive DNS such as Google (8.8.8.8) or OpenDNS (208.69.38.170) and cache the results for more time than the TTL that returns from the query.</p>
<p>If you&rsquo;re not aware, every time you perform a DNS lookup, it returns the IP address for a given name (for example, 50.19.85.154, 50.19.85.156, and 50.19.85.132 for heroku.com) and a <strong>Time To Live</strong> (for example, 28 seconds when I ran <code>dig</code> against heroku.com).</p>
<p>It means that for that window of 28 seconds any other DNS lookup can rely on the IP addresses provided without having to run the queries against the DNS servers again (caching).</p>
<p>After the TTL expires, I should query again to see if the IP addresses did change. TTLs are usually small so the administrators of the services can freely move and decommission servers at least after a certain small window (TTL) and be sure that almost everybody will see new IP addresses when the TTL expires. On the other hand, the smaller the TTL, the more DNS traffic we all need to keep re-checking addresses all the time.</p>
<p>In practice I believe most services are stable enough to not be changing servers all the time. They do, eventually, for maintenance or even scalability purposes, but I believe it&rsquo;s &ldquo;rare&rdquo;.</p>
<p>Actually, I believe that if I had my own DNS server, caching DNS results and overriding the TTLs from 60 seconds/15 minutes to a larger extent (let&rsquo;s say, 1 full day) before expiring and requiring a new query, we would have passed through that DDoS episode without noticing it.</p>
<p>In fact, I manually inserted GitHub&rsquo;s web address in my local <code>/etc/hosts</code> file and I was able to browse through GitHub in the midst of the DDoS attacks.</p>
<p>For most people, that whole apocalyptic episode felt like &ldquo;the internet fell&rdquo;, but in reality only the authoritative DynDNS servers went down and every other recursive DNS, obeying the TTLs, also failed to get responses.</p>
<p>The cascading effect was that we were just unable to translate domain name queries such as spotify.com or heroku.com into their static IP addresses. But if we had those addresses in local caches, we wouldn&rsquo;t feel it because Spotify&rsquo;s, ZenDesk&rsquo;s, Heroku&rsquo;s servers were all online and fine.</p>
<p>It&rsquo;s different from when <a href="http://www.theregister.co.uk/2016/06/05/aws_oz_downed_by_weather/"target="_blank" rel="noopener">AWS&rsquo;s Sydney data center suffered an outage</a>. That&rsquo;s way more rare and I&rsquo;ve seen it happen just once every couple of years.</p>
<h3>Unbound<span class="hx:absolute hx:-mt-20" id="unbound"></span>
    <a href="#unbound" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I was going to install BIND9 in an AWS EC2 t2.micro machine. But I&rsquo;ve read that it&rsquo;s probably overkill if I am not interested in setting up an authoritative server. What&rsquo;s more, I can&rsquo;t set a minimum TTL in BIND if I am not mistaken.</p>
<p>So the other simpler option is <a href="http://unbound.net/index.html"target="_blank" rel="noopener">Unbound</a>. It&rsquo;s a simple <code>apt-get install unbound</code> away.</p>
<p>Configuration is super easy as well, I just added this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>server:
  interface: 0.0.0.0
  do-ip4: yes
  do-ip6: yes
  do-udp: yes
  do-tcp: yes
  do-daemonize: yes
  # access-control: 0.0.0.0/0 allow
  access-control: &lt;your public IP&gt;/8 allow
  access-control: &lt;your public IP&gt;/8 allow

  # Use all threads (roughly the same number of available cores)
  num-threads: 4

  # 2^{number_of_threads}
  msg-cache-slabs: 16
  rrset-cache-slabs: 16
  infra-cache-slabs: 16
  key-cache-slabs: 16

  # More cache memory (this is per thread, if I am not mistaken)
  rrset-cache-size: 150m
  msg-cache-size: 75m

  # More outgoing connections
  # Depends on number of threads
  outgoing-range: 206 # &lt;(1024/threads)-50&gt;
  num-queries-per-thread: 128 # &lt;(1024/threads)/2&gt;

  # Larger socket buffer
  so-rcvbuf: 4m
  so-sndbuf: 4m

  # Faster UDP with multithreading (only on Linux)
  so-reuseport: yes

  # cache for at least 1 day
  cache-min-ttl: 172800

  # cache for at most 1.5 day
  cache-max-ttl: 259200

  # security
  hide-identity: yes
  hide-version: yes
  harden-short-bufsize: yes
  harden-large-queries: yes
  harden-glue: yes
  harden-dnssec-stripped: yes
  harden-below-nxdomain: yes
  harden-referral-path: yes
  use-caps-for-id: yes

  use-syslog: yes

  python:
    remote-control:
            control-enable: no

  forward-zone:
    name: &#34;.&#34;
    forward-addr: 8.8.8.8
    forward-addr: 8.8.4.4</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Replace the <code>&lt;your public IP&gt;</code> with whatever IP you get when you Google for &ldquo;what&rsquo;s my IP&rdquo;, it&rsquo;s better to whitelist every IP you want to enable access to query this server.</p>
<p>Unbound comes pre-configured for DNSSEC and it seems to work out of the box (or at least this is what <a href="https://dnssec.vs.uni-due.de/"target="_blank" rel="noopener">this test</a> says).</p>
<p>In my &ldquo;enterprise&rdquo; ISP account I have a static IP address and I can set my Airport Extreme and add my new DNS server IP address and all clients connecting there receive the new DNS automatically.</p>
<p>In my inexpensive backup ISP account (your usual DSL or Cable internet service), it doesn&rsquo;t have a static IP so I have to use the ISP&rsquo;s DHCP and NAT and enable &ldquo;Bridge Mode&rdquo; on the router. In that case I can&rsquo;t have a secondary DHCP turned on to set up the DNS automatically on the clients, so I have to add it manually in my notebook&rsquo;s network configuration.</p>
<p>Anyway, one immediate advantage of setting up my own DNS server is that response times are much faster as I chose a data center very close to me, geographically. So instead of the usual 60ms from Google&rsquo;s DNS I get less than 30ms on average now (not a dramatic improvement, but somewhat noticeable in web browsing).</p>
<p>The disadvantage is that a recursive DNS should obey the protocol and use the authoritative TTL, never overriding. But as I am using it only for whitelisted IPs within my own organization, I believe that with an occasional manual flush, I should be ok most of the time.</p>
<p>This is not a 100% guarantee that we will not suffer anything in case of another DDoS episode like we had, because not all domain names will be cached in this local DNS server. But the ones we use the most probably will be, particularly essential services such as access to GitHub or Heroku or ZenDesk.</p>
<p>With this new DNS &ldquo;caching&rdquo; system all my queries will return and be cached with a larger TTL, for example:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ dig heroku.com

; &lt;&lt;&gt;&gt; DiG 9.8.3-P1 &lt;&lt;&gt;&gt; heroku.com
;; global options: &#43;cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 34732
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;heroku.com.      IN  A

;; ANSWER SECTION:
heroku.com.   172800  IN  A 50.19.85.156
heroku.com.   172800  IN  A 50.19.85.132
heroku.com.   172800  IN  A 50.19.85.154

;; Query time: 357 msec
;; SERVER: xx.xx.xx.xx#53(xx.xx.xx.xx)
;; WHEN: Mon Oct 31 15:07:37 2016
;; MSG SIZE  rcvd: 76</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>I&rsquo;m obfuscating my DNS IP, of course. The important bit is that you can see that my DNS is returning a TTL of <strong>172800 seconds</strong> now. My local notebook cache should keep it that long now as well.</p>
<p>And now my organization should (possibly) be protected against another DNS DDoS attack like we had with Dyn DNS. Zerigo already went through that. SimpleDNS already went through that. Who knows which one will suffer next, maybe all of them again.</p>
<p>As I said before, I am not 100% sure this is a good mitigation. We will see if it works on the next Mirai attack. And a final <strong>BIG DISCLAIMER</strong>:</p>
<blockquote>
  <p>EVERY DNS recursive server MUST obey the authoritative TTL!! TTLs exist for many important reasons, so if you manage a publicly available DNS server, you MUST NOT override the TTL with a minimum cache time like I did. Make sure you know what you&rsquo;re doing!</p>

</blockquote>
<p>Are you an experienced whitehat hacker? Let me know if there&rsquo;s something easier/more secure. The goal is not to fix the internet, just to protect the productivity of my tiny organization.</p>
]]></content:encoded><category>security</category><category>networking</category></item><item><title>[Off-Topic] Commenting on the Approved Marco Civil</title><link>https://akitaonrails.github.io/en/2014/03/30/off-topic-comentando-o-marco-civil-aprovado/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2014/03/30/off-topic-comentando-o-marco-civil-aprovado/</guid><pubDate>Sun, 30 Mar 2014 09:46:00 -0300</pubDate><description>&lt;p&gt;As I said on social media before, I&amp;rsquo;m on the fence about this Marco Civil. Being a little cynical, if it comes from the government, from a PT-party government and still with opposition support, it already doesn&amp;rsquo;t smell right. The timing and the urgency are there to cash in on the recent American-government wiretapping on Brazilian soil and the Snowden controversy. The goal is to look like the nation&amp;rsquo;s savior while quietly embedding safeguards that legalize government activities that are shady at best.&lt;/p&gt;</description><content:encoded><![CDATA[<p>As I said on social media before, I&rsquo;m on the fence about this Marco Civil. Being a little cynical, if it comes from the government, from a PT-party government and still with opposition support, it already doesn&rsquo;t smell right. The timing and the urgency are there to cash in on the recent American-government wiretapping on Brazilian soil and the Snowden controversy. The goal is to look like the nation&rsquo;s savior while quietly embedding safeguards that legalize government activities that are shady at best.</p>
<p>I&rsquo;ll publish the full text and add a few comments. Plenty of people have opinions about this Marco Civil, and my guess is 99% never read the law before weighing in. So I recommend reading it. I took the text from <a href="http://estaticog1.globo.com/2014/03/25/marcocivilInternet-textofinalcamara-25mar2014.pdf"target="_blank" rel="noopener">this PDF</a>; if it&rsquo;s outdated, let me know.</p>
<p>Don&rsquo;t forget to comment.</p>
<blockquote>
  <p><strong>Translator&rsquo;s note:</strong> the full legal text of the Marco Civil is preserved in the original Portuguese (it&rsquo;s a Brazilian law, whose authoritative text is Portuguese). Only Akita&rsquo;s commentaries are translated below, interleaved with a brief summary of each article so an English reader can follow along.</p>

</blockquote>
<h4>GLOBAL SUBSTITUTE SUB-AMENDMENT TO PLENARY AMENDMENTS TO BILL No. 2,126 OF 2011<span class="hx:absolute hx:-mt-20" id="global-substitute-sub-amendment-to-plenary-amendments-to-bill-no-2126-of-2011"></span>
    <a href="#global-substitute-sub-amendment-to-plenary-amendments-to-bill-no-2126-of-2011" class="subheading-anchor" aria-label="Permalink for this section"></a></h4><p>Establishes principles, guarantees, rights, and duties for the use of the Internet in Brazil.</p>
<h2>CHAPTER I. PRELIMINARY PROVISIONS<span class="hx:absolute hx:-mt-20" id="chapter-i-preliminary-provisions"></span>
    <a href="#chapter-i-preliminary-provisions" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Art. 1.</strong> This Law establishes principles, guarantees, rights, and duties for the use of the Internet in Brazil.</p>
<p><strong>Art. 2.</strong> The discipline of Internet use in Brazil is grounded on respect for freedom of expression, as well as: (I) recognition of the global scale of the network; (II) human rights, personal development, and exercise of citizenship in digital media; (III) plurality and diversity; (IV) openness and collaboration; (V) free initiative, free competition, and consumer protection; and (VI) the social purpose of the network.</p>
<blockquote>
  <p>There&rsquo;s no way to guarantee &ldquo;the social purpose of the network.&rdquo; A purpose isn&rsquo;t defined by decree; it&rsquo;s whatever the users make of it. Guaranteeing a &ldquo;social purpose&rdquo; requires restrictive manipulation, and the Internet is what it is precisely because no purpose was imposed on it. Everyone does what they want, and the free market adjusts on its own.</p>
<p>The Internet is a data transport medium, everyone pays for it, and its use follows from that free access. Once you define an objective, however good the intentions, you create restrictions. Every restriction has to be regulated, and every regulation needs someone to audit it.</p>

</blockquote>
<p><strong>Art. 3.</strong> The discipline of Internet use in Brazil has the following principles: (I) guarantee of freedom of expression; (II) protection of privacy; (III) protection of personal data; (IV) preservation and guarantee of network neutrality; (V) preservation of stability, security, and functionality of the network; (VI) accountability of agents according to their activities; (VII) preservation of the participatory nature of the network; (VIII) freedom of business models on the Internet.</p>
<blockquote>
  <p>Principles II and III are redundant, and III actually restricts II: the first defines privacy, the second breaks it and hands the government a monopoly on the breach.</p>

</blockquote>
<blockquote>
  <p>V should be irrelevant. Following any standard by decree doesn&rsquo;t work, and it begs the question: who defines what &ldquo;techniques compatible with international standards&rdquo; or &ldquo;use of good practices&rdquo; are? In practice, some government body ends up holding a monopoly on that regulation.</p>

</blockquote>
<blockquote>
  <p>VII can&rsquo;t be defined either. Who decides what &ldquo;participatory nature&rdquo; means? These bits guarantee one more bureaucratic jobs rack, an Anatel or something like it, to &ldquo;guarantee&rdquo; these &ldquo;rights.&rdquo; Every non-fundamental &ldquo;right&rdquo; demands a regulator, and every regulator is harmful.</p>

</blockquote>
<p><strong>Art. 4.</strong> The discipline of Internet use in Brazil has the following objectives: (I) promote the right of access to the Internet to all; (II) promote access to information, knowledge and participation in cultural life; (III) promote innovation and broad dissemination of new technologies; (IV) promote adherence to open technology standards that allow communication, accessibility, and interoperability.</p>
<blockquote>
  <p>This whole article is bad. You can&rsquo;t &ldquo;guarantee&rdquo; Internet access for everyone, the same way you can&rsquo;t guarantee food or education to anyone. The moment you define one person&rsquo;s right, you decree another&rsquo;s servitude, because the government doesn&rsquo;t have the means to guarantee it, we citizens do. And when you declare that someone has a right to something that&rsquo;s ours, you infringe our rights too.</p>

</blockquote>
<blockquote>
  <p>Sorry, the Internet isn&rsquo;t free. Electricity, water, and basic sanitation aren&rsquo;t free either, somebody pays. Put a government regulator in charge and we&rsquo;ll get the same level of service as Sabesp and Eletropaulo: water shortages, blackouts, and the lights going out when it rains. Why do we put up with that? Government regulation.</p>

</blockquote>
<blockquote>
  <p>Fostering &ldquo;innovation&rdquo; isn&rsquo;t and shouldn&rsquo;t be the government&rsquo;s job. Innovation is a natural consequence of free competition and a free market. Making it a state task hands out permission to burn our tax money. And, again, who defines what &ldquo;innovation&rdquo; is? Another regulator, another rack of bureaucrats.</p>

</blockquote>
<blockquote>
  <p>So far, the only thing these articles guarantee is the creation of regulatory bodies.</p>

</blockquote>
<p><strong>Art. 5.</strong> Definitions: Internet, terminal, autonomous system administrator, IP address, Internet connection, connection record, Internet applications, and records of access to Internet applications.</p>
<blockquote>
  <p>At least it shows some politicians aren&rsquo;t total illiterates. These are just technical definitions, pretty raw, but they do the job for this document. Note the &ldquo;IP address,&rdquo; as if it guaranteed identifying someone. What&rsquo;s missing is a line saying an IP address can&rsquo;t be used as the basis to identify anyone.</p>

</blockquote>
<p><strong>Art. 6.</strong> In the interpretation of this Law, the nature of the Internet, its particular uses and customs, and its importance for the promotion of human, economic, social, and cultural development shall be taken into account.</p>
<h2>CHAPTER II. RIGHTS AND GUARANTEES OF USERS<span class="hx:absolute hx:-mt-20" id="chapter-ii-rights-and-guarantees-of-users"></span>
    <a href="#chapter-ii-rights-and-guarantees-of-users" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Art. 7.</strong> Access to the Internet is essential to the exercise of citizenship, and the following rights are guaranteed to users: inviolability of intimacy and private life; inviolability and secrecy of communications; non-suspension of Internet connection except for debts; maintenance of the contracted quality; clear information in contracts; non-provision of personal data to third parties except with consent; clear information about data collection and use; express consent; deletion of personal data upon request; publicity of usage policies; accessibility; application of consumer protection norms.</p>
<blockquote>
  <p>Translating &ldquo;inviolability&rdquo;: the access provider shouldn&rsquo;t violate it unless the Judiciary forces them to.</p>

</blockquote>
<blockquote>
  <p>The maintenance of the contracted quality should be the domain of Consumer Rights.</p>

</blockquote>
<blockquote>
  <p>The paragraphs of this article are all redundant. In short: the provider has to declare how it uses the data it collects, and when that isn&rsquo;t clear, the government holds a monopoly on getting at it, since every paragraph ends with &ldquo;except by judicial order, in the form of the law.&rdquo; Everyone already does this. We have the &ldquo;Terms of Service&rdquo; nobody reads and everybody accepts, but that technically are there.</p>

</blockquote>
<blockquote>
  <p>It&rsquo;s not a totally bad article: it ratifies behaviors that are already standard in any decent service. But we all know that, by judicial order, anyone can get anything in this country, because there&rsquo;s no privacy limit on the government. And if the government can access everything, so can anyone else. There&rsquo;s no guarantee of privacy anywhere in this document.</p>

</blockquote>
<p><strong>Art. 8.</strong> The guarantee of the right to privacy and freedom of expression in communications is a condition for the full exercise of the right of access to the Internet.</p>
<h2>CHAPTER III. PROVISION OF CONNECTION AND INTERNET APPLICATIONS<span class="hx:absolute hx:-mt-20" id="chapter-iii-provision-of-connection-and-internet-applications"></span>
    <a href="#chapter-iii-provision-of-connection-and-internet-applications" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><h3>Section I. Network Neutrality<span class="hx:absolute hx:-mt-20" id="section-i-network-neutrality"></span>
    <a href="#section-i-network-neutrality" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Art. 9.</strong> The person responsible for transmission, switching, or routing has the duty to treat any data packets in an isonomic way, without distinction by content, origin, destination, service, terminal, or application. Traffic discrimination or degradation is only allowed for: (I) indispensable technical requirements, and (II) priority for emergency services.</p>
<blockquote>
  <p>In short, this is the article that should stop a provider from creating a &ldquo;Facebook&rdquo; plan, where traffic to Facebook gets high priority and access to everything else is slower or nonexistent. It also blocks silent &ldquo;traffic shaping,&rdquo; where the provider watches your traffic and makes access to certain places, like the Pirate Bay, slower.</p>

</blockquote>
<blockquote>
  <p>The principle is valid enough. Nobody in their right mind would be against &ldquo;neutrality&rdquo; or isonomy.</p>

</blockquote>
<blockquote>
  <p>Except it raises a question. We&rsquo;ve had commercial Internet in Brazil for nearly 20 years, and before this document none of that was illegal. So why don&rsquo;t you see a Claro or a Net selling &ldquo;YouTube&rdquo; plans?</p>

</blockquote>
<blockquote>
  <p>Ask yourself that. The answer isn&rsquo;t simple, and you&rsquo;ll start wondering what the real purpose of this article is.</p>

</blockquote>
<h3>Section II. Protection of Records, Personal Data, and Private Communications<span class="hx:absolute hx:-mt-20" id="section-ii-protection-of-records-personal-data-and-private-communications"></span>
    <a href="#section-ii-protection-of-records-personal-data-and-private-communications" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Arts. 10–12.</strong> Guardianship and disclosure of connection and application access records, personal data, and content of private communications; sanctions (warning, fines up to 10% of revenue, suspension, prohibition).</p>
<blockquote>
  <p>This article makes it explicit that all data sit at the Judiciary&rsquo;s disposal. Privacy is broken by law, and the government holds a monopoly on the breach. That opens the door to every kind of corruption. If only the government can open someone&rsquo;s information, corporate espionage gets easier: grease a judge&rsquo;s palm, issue a warrant, and whoever can pay gets access to anything.</p>

</blockquote>
<blockquote>
  <p>Yet another mechanism that guarantees the creation of a regulator, and here it&rsquo;s spelled out, &ldquo;in the form of the regulation.&rdquo; Who&rsquo;s going to &ldquo;verify compliance with Brazilian law on data collection, storage, and retention&rdquo;? This was always unnecessary and still is, but now we&rsquo;ll pay some deadbeat auditor to do nothing and bully smaller services on top of it, choking off free competition. Want to mess with someone&rsquo;s business? Call this &ldquo;police&rdquo; and say company X isn&rsquo;t complying with this paragraph.</p>

</blockquote>
<h3>Subsection I. Storage of Connection Records<span class="hx:absolute hx:-mt-20" id="subsection-i-storage-of-connection-records"></span>
    <a href="#subsection-i-storage-of-connection-records" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Art. 13.</strong> In providing Internet connection, the relevant autonomous system administrator has the duty to maintain connection records, under secrecy, in a controlled and secure environment, for one year.</p>
<blockquote>
  <p>I take this article to cover only Internet access providers. It&rsquo;s just an excuse to raise costs and, again, break privacy.</p>

</blockquote>
<h3>Subsection II. Storage of Access Records to Internet Applications in Connection Provision<span class="hx:absolute hx:-mt-20" id="subsection-ii-storage-of-access-records-to-internet-applications-in-connection-provision"></span>
    <a href="#subsection-ii-storage-of-access-records-to-internet-applications-in-connection-provision" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Art. 14.</strong> In providing connection, paid or free, it is forbidden to store records of access to Internet applications.</p>
<h3>Subsection III. Storage of Access Records in Application Provision<span class="hx:absolute hx:-mt-20" id="subsection-iii-storage-of-access-records-in-application-provision"></span>
    <a href="#subsection-iii-storage-of-access-records-in-application-provision" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Art. 15.</strong> The provider of Internet applications constituted as a legal entity, which carries out this activity in an organized, professional, and economic manner, must maintain the respective records of access to Internet applications, under secrecy, for six months.</p>
<blockquote>
  <p>This one is even more <a href="http://pt.wikipedia.org/wiki/George_Orwell"target="_blank" rel="noopener">Orwellian</a>. It lets the government force a provider to track more information, for an indefinite period and indiscriminately. The government could already pull this off before, through Anatel&rsquo;s pull and other lobbies, but now it&rsquo;s secured by law.</p>

</blockquote>
<p><strong>Arts. 16–17.</strong> Prohibition of storing records of access to other applications without prior consent; opting not to store records doesn&rsquo;t imply responsibility for damages.</p>
<h3>Section III. Responsibility for Damages from Third-Party Content<span class="hx:absolute hx:-mt-20" id="section-iii-responsibility-for-damages-from-third-party-content"></span>
    <a href="#section-iii-responsibility-for-damages-from-third-party-content" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Arts. 18–21.</strong> Connection providers are not civilly liable for damages from third-party content. Application providers can only be civilly liable for damages from third-party content after a specific judicial order. Special treatment for cases involving nudity/private sexual content.</p>
<blockquote>
  <p>This doesn&rsquo;t seem totally bad, it already happens today, but it got more confusing. In practice, if a user of your site posts an offensive comment and the offended party gets a judicial order, the site isn&rsquo;t criminally liable for the content as long as it takes the comment down when ordered.</p>

</blockquote>
<blockquote>
  <p>The people who lean on this the most are the imbecile candidates for public office, who fire off judicial orders all the time against any site with political content. The problem is that offending a politician is against the law. Our Constitution itself has become a problem these days.</p>

</blockquote>
<h3>Section IV. Judicial Request for Records<span class="hx:absolute hx:-mt-20" id="section-iv-judicial-request-for-records"></span>
    <a href="#section-iv-judicial-request-for-records" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p><strong>Arts. 22–23.</strong> The interested party may request that the judge order the person responsible for the storage to provide connection records. Secrecy and privacy must be preserved.</p>
<blockquote>
  <p>This article extends what the previous ones already set up: unrestricted, indiscriminate access to data that&rsquo;s supposed to have &ldquo;privacy&rdquo; guaranteed.</p>

</blockquote>
<blockquote>
  <p>&ldquo;It&rsquo;s up to the judge,&rdquo; meaning, forget your privacy. Judges can be, and are, bought. It&rsquo;s a market.</p>

</blockquote>
<h2>CHAPTER IV. ACTION OF THE PUBLIC POWER<span class="hx:absolute hx:-mt-20" id="chapter-iv-action-of-the-public-power"></span>
    <a href="#chapter-iv-action-of-the-public-power" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Art. 24.</strong> Guidelines for the action of the Union, States, Federal District, and Municipalities in the development of the Internet in Brazil: multi-stakeholder governance, promotion of management rationalization, interoperability, open standards, data publicity, infrastructure optimization, capacity building, promotion of culture and citizenship, provision of integrated public services.</p>
<blockquote>
  <p>This article sanctions the Orwellian part: the creation of regulatory bodies, the <a href="http://en.wikipedia.org/wiki/Thought_Police"target="_blank" rel="noopener">&ldquo;Thought Police&rdquo;</a>. That body would be responsible for &ldquo;guaranteeing&rdquo; what&rsquo;s in the paragraphs: setting up governance mechanisms, rationalizing management, promoting interoperability, and on it goes. You&rsquo;ve sanctioned by law a machine for corruption, market reserve, breach of free competition, and the rotting of the Internet market.</p>

</blockquote>
<blockquote>
  <p>Understand: there&rsquo;s no way to define &ldquo;multi-stakeholder governance,&rdquo; &ldquo;collaborative,&rdquo; or &ldquo;rationalization.&rdquo; Who decides what counts as collaborative, interoperable, or efficient? Someone has to interpret it, and anything left open to interpretation only benefits whoever has the power to impose their reading. By definition, it&rsquo;s a bad text.</p>

</blockquote>
<p><strong>Arts. 25–28.</strong> Internet applications of public entities should seek compatibility with multiple terminals, accessibility, compatibility with both human reading and automated processing, usability, and strengthening of social participation.</p>
<blockquote>
  <p>This shouldn&rsquo;t be here. They&rsquo;re technical clauses for software procurement bids, which already exist, and I don&rsquo;t see the use of them. In some cases the items are dispensable and add one more unnecessary restriction.</p>

</blockquote>
<blockquote>
  <p>This isn&rsquo;t the state&rsquo;s duty.</p>

</blockquote>
<blockquote>
  <p>Again, it&rsquo;s not the state&rsquo;s duty. This whole chapter is restrictive and shouldn&rsquo;t exist, because it frees up unrestricted use of our money on government programs. As a taxpayer, I&rsquo;m against any program that spends my money that way. It&rsquo;s one person&rsquo;s right breaking another&rsquo;s, and by definition that can&rsquo;t be a guaranteed right.</p>

</blockquote>
<h2>CHAPTER V. FINAL PROVISIONS<span class="hx:absolute hx:-mt-20" id="chapter-v-final-provisions"></span>
    <a href="#chapter-v-final-provisions" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Arts. 29–32.</strong> The user has the option of free choice in using software for parental control; the defense of interests and rights established in this Law may be exercised in court; until the entry into force of the specific law, liability for copyright infringement remains governed by current legislation; the Law enters into force sixty days after publication.</p>
<p>Representative ALESSANDRO MOLON.
Rapporteur</p>
<blockquote>
  <p>Honestly, I don&rsquo;t see the upside of this text. The relevant part, neutrality, should be regulated by Consumer Rights. Everything else sanctions the legality of breaking privacy and hands the government a monopoly on that breach. And it creates &ldquo;rights&rdquo; that will demand more public spending and more state apparatus, at our expense and with no apparent benefit. At bottom it&rsquo;s a propaganda document to make the government look good, at my expense and at yours. Congratulations.</p>

</blockquote>
]]></content:encoded><category>law-and-regulation</category><category>networking</category><category>security</category><category>off-topic</category></item><item><title>[Off-Topic] A View from the Past About the Internet</title><link>https://akitaonrails.github.io/en/2013/05/26/off-topic-visao-do-passado-sobre-a-internet/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2013/05/26/off-topic-visao-do-passado-sobre-a-internet/</guid><pubDate>Sun, 26 May 2013 20:56:00 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Sales on the Internet&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Forewords&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The real &lt;em&gt;Cold War&lt;/em&gt; in the 60s wasn&amp;rsquo;t being fought in the field, with soldiers and planes, but in research laboratories, funded by the government, and universities were already equipped with the best computing resources available. It was thought that the ability to create and maintain technological advantages over the adversary would determine the winner of the conflict.&lt;/p&gt;
&lt;p&gt;The idea of connecting these centers, aiming at the exchange of information, began to be developed. However, a determining factor was attributed to the choice of network technology that would enable the connection of the strategic centers: the information should continue to flow even under the worst conditions, such as a nuclear attack.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Sales on the Internet</strong></p>
<p><strong>Forewords</strong></p>
<p>The real <em>Cold War</em> in the 60s wasn&rsquo;t being fought in the field, with soldiers and planes, but in research laboratories, funded by the government, and universities were already equipped with the best computing resources available. It was thought that the ability to create and maintain technological advantages over the adversary would determine the winner of the conflict.</p>
<p>The idea of connecting these centers, aiming at the exchange of information, began to be developed. However, a determining factor was attributed to the choice of network technology that would enable the connection of the strategic centers: the information should continue to flow even under the worst conditions, such as a nuclear attack.</p>
<p><strong>ARPA</strong> (Advanced Research Projects Agency) and <strong>DoD</strong> (Department of Defense) were delegated the responsibility of developing the best alternative for integrating information centers.</p>
<p>A few years later, ARPA would change its name to <strong>DARPA</strong> (Defense Advanced Research Projects Agency), starting a plan called the <strong>Internetting Project</strong> to investigate the possible forms of connection between packet-switched networks. As a result of this project and the studies of the <strong>INWG</strong> (InterNetwork Working Group), the two basic protocols of the Internet were developed and presented. In <em>1974</em>, Vinton Cerf and Robert Kahn presented <strong>IP</strong> (Internet Protocol) and <strong>TCP</strong> (Transmission Control Protocol). These two protocols specified how messages (files or commands) would be transferred between computers on the Internet.</p>
<p><strong>Numbers</strong></p>
<p>To understand the importance of the Internet in every sense — social, political, and financial — it&rsquo;s necessary to see who surfs the Internet. We&rsquo;ll base ourselves on the research of <strong>John Quarterman</strong>, an access provider, consultant, and publisher from Austin, Texas, who researches the composition of the Internet population in his <strong>Internet Demographic Survey</strong>.</p>
<p>One of the things Quarterman has been doing is defining several Internets according to the types of applications running on the servers and the activities of the users. The &ldquo;core of the Internet&rdquo; is made up of computers that offer interactive services like FTP, Telnet, or WWW applications. The &ldquo;consumer Internet&rdquo; includes people who use the interactive services offered by the core — for example, users browsing the World Wide Web. The total cyberspace, which he labels as the &ldquo;matrix,&rdquo; includes all users who exchange email with other users. These categories fit into one another: the matrix includes the consumer Internet, which includes the Core Internet.</p>
<p>One of the problems Quarterman has to face involves virtual hosts. An Internet access provider has to register domain names for users, but the addresses actually reside on the provider&rsquo;s machines. This can lead to misunderstandings, making it seem that people have machines connected to the Internet. This group belongs to the consumer Internet category, and all the mail Quarterman sends to postmasters at various addresses is ultimately handled by one host.</p>
<p>&ldquo;The problem of virtual hosts has grown enormously in the last year (1995),&rdquo; said Quarterman. &ldquo;You can access a Web site, there really is information there, and it really corresponds to the organization. It&rsquo;s actually on a computer on the Internet, but it may be the same computer as other domains.&rdquo;</p>
<p>The most recent survey, for 1995, was published in January 1996. Out of the universe of <strong>45,091 domains</strong>, <strong>2.9% (1,293) responded</strong>. In the world of statistics, more than 1,000 responses is a large number of data, and these responses represent entire organizations, not just users. In this survey, Quarterman estimates that there were <strong>16.9 million users of the core Internet</strong> (more than double the previous year) and <strong>26.4 million users of the consumer Internet</strong> (again double); <strong>39 million users</strong> (a 50% increase) already had email. Quarterman attributes the increase to Internet users on consumer networks (America Online, CompuServe, Prodigy, and others).</p>
<p>In the 1995 survey, Quarterman counted 45,000 machines connected to the Internet. The actual number of registered domains exceeded this number because not all registered domains are used, and some are domains on other networks, such as UUCP, where you can send mail, but you can&rsquo;t use interactive Internet services.</p>
<p><em>The Web is hot, but FTP still beats browsing</em>. Quarterman also notes that the use of the Windows operating system is declining, and that Macintoshes (despite using the Internet Protocol and not MacOS) and Unix machines are increasing their share of domain control.</p>
<p>The results are announced and posted on the <strong>MIDS</strong> Web site (which publishes the monthly magazines <strong>Matrix News</strong> and <strong>Matrix Maps Quarterly</strong>, both on paper and online, and sells maps and other information about Internet hosts, users, and other demographic data) at <strong><a href="http://www.mids.org"target="_blank" rel="noopener">http://www.mids.org</a></strong>. &ldquo;What we made available to survey respondents, and to the Internet as a whole almost a month ago, is a result of the responses for each question. We also manage to draw detail levels between individual responses (which are never revealed) and the summaries. That&rsquo;s how we get some income.&rdquo;</p>
<p>Speaking of <strong>Brazil</strong>, the Secretary of Informatics and Automation Policy of the Ministry of Science and Technology, <strong>Ivan Moura Campos</strong>, says that Brazil boasts one of the most astonishing growth rates toward <em>cyberspace</em> — we are growing 50% per month. With that, we reached a population of <strong>260 thousand cybernauts</strong> at the beginning of May this year. To give an idea, if the adoption rate continued at this speed, by the end of the year the number of Brazilian cybernauts would be 16 million. But the Secretary&rsquo;s predictions, more realistic, estimate <strong>one million users</strong> at the turn of the year.</p>
<p><strong>Advertising</strong></p>
<p>After the microcomputer revolution in the 80s and the spread of computing with &ldquo;<em>a micro on every desk and in every home</em>,&rdquo; we had one of the greatest evolutions ever seen in history, where humanity evolved in 10 years what it hadn&rsquo;t managed to evolve since the Middle Ages, entering the <strong>Information Age</strong>.</p>
<p>With microcomputers and the Internet, physical borders have been erased, in a place where &ldquo;countries&rdquo; and &ldquo;oceans&rdquo; no longer have meaning and where physical distances no longer make sense. <strong>Virtualization</strong> has evolved to such a point that a person living in a country like Brazil can already get to know and make friends with people from anywhere in the world, such as Australia, for example. Tools like Netscape Inc.&rsquo;s <strong>CoolTalk</strong> (<strong><a href="http://www.netscape.com"target="_blank" rel="noopener">http://www.netscape.com</a></strong>), which replaces the telephone, or <strong>TimedVideo Grabber</strong> (<strong><a href="http://www.avernus.com/~allan"target="_blank" rel="noopener">http://www.avernus.com/~allan</a></strong>), which enables the transmission of <em>real-time</em> images using a camera, makes it possible for people to meet without ever actually having to meet in the &ldquo;flesh and bone.&rdquo;</p>
<p>And speaking of evolution, after 500 years of absolute reign of print media as a disseminator of information, it&rsquo;s being rapidly replaced by digital publications on the <strong>World Wide Web</strong>, the part of the Internet that most catches attention today.</p>
<p>With pioneering works like <strong>Encyclopedia Britannica</strong> (<strong><a href="http://www.eb.com"target="_blank" rel="noopener">http://www.eb.com</a></strong>), which was absolutely shaken after printed encyclopedias fell into total disuse after the emergence of digital encyclopedias like <strong>Microsoft</strong>&rsquo;s <strong>Encarta</strong> (<strong><a href="http://www.microsoft.com"target="_blank" rel="noopener">http://www.microsoft.com</a></strong>), and also of &ldquo;yellow pages&rdquo;-type search services like those offered by sites like <strong>Yahoo!</strong> (<strong><a href="http://www.yahoo.com"target="_blank" rel="noopener">http://www.yahoo.com</a></strong>) or <strong>Lycos</strong> (<strong><a href="http://www.lycos.com"target="_blank" rel="noopener">http://www.lycos.com</a></strong>), they made the Internet also the largest data repository ever built, the best place for research you can find.</p>
<p>World-famous magazines like <strong>PC Magazine</strong> (<strong><a href="http://www.pcmag.com"target="_blank" rel="noopener">http://www.pcmag.com</a></strong>) from <strong>Ziff Davis Publishing</strong> (<strong><a href="http://www.ziff.com"target="_blank" rel="noopener">http://www.ziff.com</a></strong>) or <strong>Playboy</strong> (<strong><a href="http://www.playboy.com"target="_blank" rel="noopener">http://www.playboy.com</a></strong>) already have their publications displayed and updated periodically on the <strong>WWW</strong>.</p>
<p>The World Wide Web or WWW was conceived to give a &ldquo;face&rdquo; to the Internet, enabling the editing of graphical sites as opposed to the hitherto text-based interface (something similar to the transition from DOS to Windows, for example). A new scripting language was created, <strong>HTML</strong> (Hyper Text Markup Language), and a specific protocol, <strong>HTTP</strong> (Hyper Text Transfer Protocol). And for navigation through these pages, <strong>browsers</strong> were created, programs made to interpret HTML. Right from the start, two stood out: Netscape with its <strong>Netscape Navigator</strong> and <strong>SpyGlass</strong> with its <strong>Mosaic</strong>. Netscape became more widespread, and SpyGlass sold the Mosaic rights to Microsoft, which today distributes Netscape&rsquo;s biggest competitor, <strong>Internet Explorer</strong>, in one of the largest software distribution campaigns ever seen.</p>
<p>The possibility of editing virtually everything that exists in print media quickly caught the world&rsquo;s attention to the Internet. New concepts began to emerge such as <strong>online publishing</strong>. One of the most recent examples is about the Atlanta Olympics, where the computing work was in charge of <strong>IBM</strong> (<strong><a href="http://www.ibm.com"target="_blank" rel="noopener">http://www.ibm.com</a></strong>), which set up a grandiose scheme of machines and networks and information distribution via the Internet that can be checked on the <strong>Olympics</strong> homepage (<strong><a href="http://www.atlanta.olympic.org"target="_blank" rel="noopener">http://www.atlanta.olympic.org</a></strong>), where the data are updated as soon as they are obtained. Thus, at the end of each game, the homepage can be updated and the whole world has access to it, not having to wait until the next day to read it in the newspapers.</p>
<p>Speaking of newspapers, they are not far behind, putting on the WWW much of their daily publications such as <strong>The Gate</strong> (<strong><a href="http://sfgate.com"target="_blank" rel="noopener">http://sfgate.com</a></strong>), an Internet-based product of two newspapers from the West Coast of the United States, the <strong>San Francisco Chronicle</strong> and the <strong>San Francisco Examiner</strong> with a right to conference areas with discussion forums such as Community, Media, Sports, Movies, etc.</p>
<p><strong>Agência Estado</strong>, which publishes famous newspapers like <strong>Estado de São Paulo</strong>, also already distributes its newspaper via internet (<strong><a href="http://www.agestado.com.br"target="_blank" rel="noopener">http://www.agestado.com.br</a></strong>) with the main headlines of the day and various information, including its classifieds and, in an Olympics period, with special areas for the sports in Atlanta.</p>
<p>Another concept that became famous with the Internet is online services such as the giants <strong>CompuServe</strong> and <strong>America Online</strong>, which serve people around the world and have allies like Netscape and Microsoft. This type of organization is based on &ldquo;services&rdquo; that include discussion forums; libraries with updated information; magazines, newspapers, and other periodicals; virtual stores that sell everything from CDs to clothes; leisure and business tips; and also services common to the Internet like email and the WWW.</p>
<p>In Brazil, such types of service have also started to spread, with emphasis on <strong>Folha de São Paulo</strong> and <strong>Grupo Abril</strong>, which launched, respectively, <strong>Universo Online</strong> and <strong>Brasil Online</strong>. Such Brazilian services are still experimental and free, with no projections regarding costs. For illustration, <strong>The New York Times</strong> charges USD 30.00 per month and America Online charges USD 9.95 for 5 hours or USD 19.95 for 20 hours.</p>
<p>Such services have very high billing mainly because of the current excitement of the world around the virtualization of services and the rental of digital space for companies interested in placing &ldquo;virtual billboards&rdquo; or even adding other services like digital stores on the main pages, since the number of people who travel through the digital lines every day is very large. To see this, just go to the <em>Brasil Online</em> page, for example, and come across advertising calls from companies like <strong>Sun</strong> or <strong>Credicard</strong>. These calls are links that lead to the homepages of the respective companies.</p>
<p>And speaking of advertising, someone must be making such pages and ads. These companies are specializing in designing specific and creative pages for a type of media that goes beyond the limitations of paper and enables things like <strong>Hypertext</strong> (words within a text that lead to other pages), <strong>Marquees</strong> (phrases that move on the line), music (through <strong>WAVE</strong> files or the new <strong>Real Audio</strong> technology), animations (via animated <strong>GIF</strong> images or using features of the <strong>Java</strong> language), or even totally three-dimensional environments (using <strong>VRML - Virtual Reality Markup Language</strong> technology) and much more. In this marketing niche are companies like <strong>Vivid Studio</strong> (<strong><a href="http://www.vivid.com"target="_blank" rel="noopener">http://www.vivid.com</a></strong>), which has clients like the giants <strong>Silicon Graphics</strong> and Microsoft, or <strong>Razorfish</strong> (<strong><a href="http://www.razorfish.com"target="_blank" rel="noopener">http://www.razorfish.com</a></strong>), which designs for <strong>Time-Warner</strong> and <strong>Pepsi</strong>.</p>
<p><strong>Commerce</strong></p>
<p>The main point of friction when talking about digital commerce is <strong>security</strong>. The TCP/IP protocol is the starting point for the Internet, conceived as a universal protocol but that falls short on the security aspect, where, unlike its siblings <strong>IPX/SPX</strong> or <strong>NetBIOS</strong>, for example, it doesn&rsquo;t have encrypted data transmission. Since it&rsquo;s the standard data transmission protocol, it would have been convenient to stipulate a standard data security protocol as well. Since this doesn&rsquo;t exist, the impasse is around companies fighting to develop the standard that would cause the initial surge toward the end of printed money and the development of digital credit.</p>
<p>One of the oldest is <strong>CyberCash</strong> (<strong><a href="http://www.cybercash.com"target="_blank" rel="noopener">http://www.cybercash.com</a></strong>), about a year old. For now, the company only works with credit card services, but soon promises to offer monetary payment services. Currently, with a browser connected to the network, you can shop safely in virtual shopping malls. Through the <strong>SIPS</strong> (Secure Internet Payment Service) protocol, according to the company, it&rsquo;s as easy as point and click. In this type of transaction, you buy as many cybercashes as desired and it&rsquo;s debited from the credit card.</p>
<p>The CyberCash standard supports all types of credit cards. It uses the <strong>768-bit RSA</strong> and <strong>56-bit DES</strong> encryption standards. All transactions are authenticated with <strong>MDS</strong> and 768-bit RSA signatures. The first step for those interested is to download the free program the company offers. The CyberCash server is connected to the private networks of several banks. The company&rsquo;s initial services include credit and debit cards and an electronic payment system. For the services, users pay a modest amount, comparable to the value of a stamp. For suppliers, the system represents savings on fees charged for credit card transactions, due to the risk that still exists in transactions by telephone and email.</p>
<p>In this type of development, there are also companies like <strong>DigiCash</strong> (<strong><a href="http://www.digicash.com"target="_blank" rel="noopener">http://www.digicash.com</a></strong>), with services centered on the <strong>First Digital Bank</strong> site (<strong><a href="http://bank.digicash.com"target="_blank" rel="noopener">http://bank.digicash.com</a></strong>), using an e-cash system (real money converted into virtual money in virtual accounts). <strong>Visa</strong> (<strong><a href="http://www.visa.com"target="_blank" rel="noopener">http://www.visa.com</a></strong>) (which is also a partner of <strong>Sony</strong> — <strong><a href="http://www.sony.com"target="_blank" rel="noopener">http://www.sony.com</a></strong> — in developing a multifaceted environment of entertainment, information, and commercial transactions) and Microsoft own <strong>STT</strong> (Secure Transaction Technology), the standard that these two powerhouses want to become an electronic version of the credit card. <strong>Mastercard</strong> (<strong><a href="http://www.mastercard.com"target="_blank" rel="noopener">http://www.mastercard.com</a></strong>) is partnered with IBM, Netscape, GTE, and CyberCash, with the <strong>SEPP</strong> (Secure Electronic Payment Protocol) standard. It&rsquo;s an open protocol for secure online transactions.</p>
<p>Netscape develops the open security protocol <strong>SSL</strong> (Secure Sockets Layer) and contributes to the development of the <strong>SSL</strong> interface of the <strong>W3C</strong> (World Wide Web Consortium), a European consortium dedicated to creating a standard for the European Common Market — <strong><a href="http://www.w3.org"target="_blank" rel="noopener">http://www.w3.org</a></strong>). About 50 companies from around the world are part of this consortium. The company will license the SSL technology to its partners for commercial use. The list of partners includes MCI (<a href="http://www.mci.com"target="_blank" rel="noopener">http://www.mci.com</a>), Bank of America (<a href="http://www.bankamerica.com"target="_blank" rel="noopener">http://www.bankamerica.com</a>), Mastercard, First Data Corporation, Novell (<a href="http://www.novell.com"target="_blank" rel="noopener">http://www.novell.com</a>), Digital (<a href="http://www.dec.com"target="_blank" rel="noopener">http://www.dec.com</a>), and Silicon Graphics.</p>
<p>Practically all companies in the financial sector have been investing heavily in developing a platform that is secure and reliable enough for financial transactions of all levels of importance. Hackers aside, business via the Internet doesn&rsquo;t differ much from those conducted outside it. That is, the best way to be free from problems is to trust the credibility of serious companies. It&rsquo;s unlikely that anyone will want to compromise their good name by failing to deliver the merchandise on time or &ldquo;negotiating&rdquo; the credit card number.</p>
<p>In Brazil, <strong>Mappin</strong> (<strong><a href="http://www.mappin.com.br"target="_blank" rel="noopener">http://www.mappin.com.br</a></strong>) was the first large company to enter the computer-sales business. It&rsquo;s also possible to choose sweets and pies at <strong>Confeitaria Brunella</strong> (<strong><a href="http://www.ams.com/brunella"target="_blank" rel="noopener">http://www.ams.com/brunella</a></strong>) in São Paulo or make reservations at <strong>Marcellu&rsquo;s Bar</strong> (<strong><a href="http://www.marcellus-bar.com.br"target="_blank" rel="noopener">http://www.marcellus-bar.com.br</a></strong>) in Rio de Janeiro. The consumer chooses the sweet or pie they want to buy through the photos and descriptions on Brunella&rsquo;s homepage, then the shop calls to confirm the order and sends the merchandise. In the case of Marcellu&rsquo;s Bar, the reservation is made by email.</p>
<p>If anyone is moving to the United States or simply needs to compare prices, they can consult <strong>For Sail By Owner Connection</strong>. It&rsquo;s a site specialized in house sales, with photos and specifications. If you actually need to sell your house, you can also advertise on this page: <strong><a href="http://www.cracker.com/byowner"target="_blank" rel="noopener">http://www.cracker.com/byowner</a></strong>.</p>
<p>Thinking about travel, <strong>Cruisin</strong> (<strong><a href="http://www.cracker.com/cruisin"target="_blank" rel="noopener">http://www.cracker.com/cruisin</a></strong>) is the first tourism agency specialized in cruises that serves exclusively via the Internet. But there are already many hotels and agencies on the network. Really, there are alternatives for all bank limits: from Ceará cashews for less than R$ 3.00 up to a house in Florida for USD 329,000. Today it&rsquo;s virtually possible to buy anything on the Internet.</p>
<p><strong>Afterwords</strong></p>
<p>Created for military purposes, then expanded to academic circles, and finally reaching the general public, the Internet is walking in accelerated evolution, covering practically all sectors of society, where the foundations of what can be considered a virtual world are being built.</p>
<p>When the Internet evolves enough, new technologies will build the expected <strong>Information Super Highway</strong>, where, then, a truly worldwide network will be constituted, using not only computers in the way we know them but also any electronic equipment, such as set-top boxes (the replacements for VCRs and video-lasers).</p>
<p>In this next generation, &ldquo;walking&rdquo; will be wearing a virtual reality suit and visiting virtual locations with friends from other continents in a digital meeting. And this isn&rsquo;t science fiction delusions: we are so close to it that such technologies are real and already exist — all that&rsquo;s left is time to make them accessible and operational at the level of mass distribution.</p>
]]></content:encoded><category>computing-history</category><category>networking</category><category>off-topic</category></item><item><title>[Off-Topic] A View from the Past About the Internet</title><link>https://akitaonrails.github.io/en/2013/05/26/off-topic-visao-do-passado-sobre-a-internet--2/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2013/05/26/off-topic-visao-do-passado-sobre-a-internet--2/</guid><pubDate>Sun, 26 May 2013 19:56:00 -0300</pubDate><description>&lt;p&gt;I&amp;rsquo;m opening some really old backups, work I&amp;rsquo;ve kept from 1995 to 2001, half a decade of history. On &lt;a href="http://www.facebook.com/akitaonrails"target="_blank" rel="noopener"&gt;my Facebook page&lt;/a&gt; there are some examples I just posted. When I was in college, I started writing a book (which I never finished or published) about computing in general and about the early days of the Internet.&lt;/p&gt;
&lt;p&gt;The text below is exactly as I left it in a Word file, on August 3, 1996, at 9:52 in the morning, named &amp;ldquo;CAP12.DOC&amp;rdquo;. See how I saw the Internet 17 years ago.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I&rsquo;m opening some really old backups, work I&rsquo;ve kept from 1995 to 2001, half a decade of history. On <a href="http://www.facebook.com/akitaonrails"target="_blank" rel="noopener">my Facebook page</a> there are some examples I just posted. When I was in college, I started writing a book (which I never finished or published) about computing in general and about the early days of the Internet.</p>
<p>The text below is exactly as I left it in a Word file, on August 3, 1996, at 9:52 in the morning, named &ldquo;CAP12.DOC&rdquo;. See how I saw the Internet 17 years ago.</p>
<p><strong>Sales on the Internet</strong></p>
<p><strong>Forewords</strong></p>
<p>The real <em>Cold War</em>, in the 60s, wasn&rsquo;t being fought in the field, with soldiers and planes, but in research laboratories funded by the government, and universities were already equipped with the best computing resources available. It was thought that the ability to create and maintain technological advantages over the adversary would determine the winner of the conflict.</p>
<p>The idea of connecting these centers, aiming at the exchange of information, began to be developed. However, a determining factor was assigned to the choice of the network technology that would make the connection of the strategic centers viable: the information had to keep flowing, even under the worst conditions, such as a nuclear attack.</p>
<p><strong>ARPA</strong> ( Advanced Research Projects Agency ) and the <strong>DoD</strong> ( Department of Defense ) were delegated the responsibility of developing the best alternative for integrating the information centers.</p>
<p>A few years later, ARPA would change its name to <strong>DARPA</strong> ( Defense Advanced Research Projects Agency ), starting a plan called the <strong>Internetting Project</strong> to investigate the possible forms of connection between packet-switched networks. As a result of this project and the studies of the <strong>INWG</strong> ( InterNetwork Working Group ), the two basic protocols of the Internet were developed and presented. In <em>1974</em>, Vinton Cerf and Robert Kahn presented <strong>IP</strong> ( Internet Protocol ) and <strong>TCP</strong> ( Transmission Control Protocol ). These two protocols specified the way in which messages ( files or commands ) would be transferred between computers on the Internet.</p>
<p><strong>Numbers</strong></p>
<p>To understand the importance of the Internet in every sense: social, political, and financial, one needs to see who navigates the Internet. We&rsquo;ll base ourselves on the research of <strong>John Quarterman</strong>, an access provider, consultant, and publisher from Austin, Texas, who researches the composition of the Internet population in his <strong>Internet Demographic Survey</strong>.</p>
<p>One of the things Quarterman has done is define several Internets according to the types of applications running on the servers and the activities of the users. The &ldquo;core of the Internet&rdquo; is made up of computers that offer interactive services like FTP, Telnet, or WWW applications. The &ldquo;consumer Internet&rdquo; includes people who use the interactive services offered by the core - for example, users who navigate the World Wide Web. The whole of cyberspace, which he labels the &ldquo;matrix,&rdquo; is all the users who exchange email with other users. These categories nest inside one another: the matrix includes the consumer Internet, which includes the Core Internet.</p>
<p>One of the problems Quarterman has to face involves virtual hosts. An Internet access provider has to register the domain names for the users, but the addresses actually reside on the provider&rsquo;s machines. This can lead to misunderstandings, making it seem that people have machines connected to the Internet. This group belongs to the consumer Internet category, and all the mail Quarterman sends to the postmasters at various addresses is in the end grouped under a single host.</p>
<p>&ldquo;The problem of virtual hosts grew enormously last year ( 1995 ),&rdquo; said Quarterman. &ldquo;You can reach a Web site, there really is information there, and it really corresponds to the organization. It is in fact on a computer on the Internet, but it may be the same computer as other domains.&rdquo;</p>
<p>The most recent survey, for 1995, was published in January 1996. Out of the universe of <strong>45,091 domains</strong>, <strong>2.9% ( 1,293 )</strong> responded. In the world of statistics, more than 1,000 responses is a large amount of data, and these responses represent entire organizations, not just users. In this survey, Quarterman estimates that there were <strong>16.9 million users of the core Internet</strong> ( more than double the previous year ) and <strong>26.4 million users of the consumer Internet</strong> ( again double ); <strong>39 million users</strong> ( an increase of 50% ) <strong>already had email</strong>. Quarterman attributes the increase to the Internet users on the consumer networks ( America Online, Compuserve, Prodigy, and others ).</p>
<p>In the 1995 survey, Quarterman counted 45 thousand machines connected to the Internet. The real number of registered domains exceeded this figure because not all registered domains are used, and some are domains on other networks, such as UUCP, where you can send mail but cannot use interactive Internet services.</p>
<p><em>The Web is hot, but FTP still outweighs browsing</em>. Quarterman also notices that the use of the Windows operating system is falling, and that Macintoshes ( despite using the Internet Protocol and not the MacOS ) and Unix machines are increasing their share of domain control.</p>
<p>The results are announced and published on the Web site of <strong>MIDS</strong> ( which publishes the monthly magazines <strong>Matrix News</strong> and <strong>Matrix Maps Quarterly</strong>, both in print and online, and sells maps and other information about Internet hosts, users, and other demographic data ).  &ldquo;What we made available to those who answered the questionnaires, and to the Internet as a whole about a month ago, is a result of the answers to each question. We also managed to trace levels of detail between the individual responses ( which are never revealed ) and the summaries. That is how we get some income.&rdquo;</p>
<p>Speaking of <strong>Brazil</strong>, the Secretary of Informatics and Automation Policy of the Ministry of Science and Technology, <strong>Ivan Moura Campos</strong>, says Brazil boasts one of the most astonishing growth rates toward <em>cyberspace</em> - we are growing 50% per month. With that we reached a population of <strong>260 thousand cybernauts</strong> at the beginning of May this year. To give an idea, if the adoption rate kept up at that speed, by the end of the year the number of Brazilian cybernauts would be 16 million. But the Secretary&rsquo;s more realistic predictions estimate <strong>one million users</strong> by the turn of the year.</p>
<p><strong>Advertising</strong></p>
<p>After the microcomputer revolution in the 80s and the spread of computing with &ldquo;<em>a micro on every desk and in every home</em>,&rdquo; we had one of the greatest evolutions ever seen in history, where humanity evolved in 10 years what it had not managed to evolve since the Middle Ages, entering the <strong>Information Age</strong>.</p>
<p>With microcomputers and the Internet, physical borders have been erased, in a place where &ldquo;countries&rdquo; and &ldquo;oceans&rdquo; no longer have meaning and where physical distances no longer make sense. <strong>Virtualization</strong> has evolved to such a point that a person living in a country like Brazil can already meet and make friends with people from anywhere in the world, like Australia, for example. Tools like Netscape Inc.&rsquo;s <strong>CoolTalk</strong>, which replaces the telephone, or the <strong>TimedVideo Grabber</strong>, which enables real-time image transmission using a camera, make it possible for people to get to know each other without ever really having to meet in &ldquo;flesh and blood.&rdquo;</p>
<p>And speaking of evolution, after 500 years of the absolute reign of print media as a spreader of information, it is being rapidly replaced by digital publications on the <strong>World Wide Web</strong>, the part of the Internet that most catches attention today.</p>
<p>With pioneering works like the <strong>Encyclopedia Britannica</strong>, which was thoroughly shaken after print encyclopedias fell into total disuse following the appearance of digital encyclopedias like <strong>Microsoft</strong>&rsquo;s <strong>Encarta</strong>, and also &ldquo;yellow pages&rdquo;-style search services like those offered by sites such as <strong>Yahoo!</strong> or <strong>Lycos</strong>, the Internet also became the largest data repository ever built, the best place for research one can find.</p>
<p>World-famous magazines like <strong>PC Magazine</strong> from <strong>Ziff Davis Publishing</strong> or <strong>Playboy</strong> already have their publications displayed and updated periodically on the <strong>WWW</strong>.</p>
<p>The World Wide Web, or WWW, was conceived to give a &ldquo;face&rdquo; to the Internet, enabling the editing of graphical sites, unlike the until-then text-based interface ( something similar to the transition from DOS to Windows, for example ). A new scripting language was created, <strong>HTML</strong> ( Hyper Text Mark-Up Language ), and a specific protocol, <strong>HTTP</strong> ( Hyper Text Transfer Protocol ). And for navigating these pages, <strong>browsers</strong> were created, programs made to interpret HTML. Right at the start, two stood out: Netscape with its <strong>Netscape Navigator</strong> and <strong>SpyGlass</strong> with its <strong>Mosaic</strong>. Netscape became more widespread, and SpyGlass sold the Mosaic rights to Microsoft, which today distributes Netscape&rsquo;s biggest competitor, <strong>Internet Explorer</strong>, in one of the biggest software distribution campaigns ever seen.</p>
<p>The possibility of editing practically everything that exists in print media quickly drew the world&rsquo;s attention to the Internet. New concepts began to emerge, such as <strong>online publishing</strong>. One of the most recent examples is the Atlanta Olympics, where the computing work was handled by <strong>IBM</strong>, which set up a grand scheme of machines and networks and information distribution over the Internet that can be checked on the <strong>Olympics</strong> homepage, where the data is updated as soon as it is obtained, so that at the end of each match the homepage can be updated and the whole world has access to it, without having to wait until the next day to read it in the newspapers.</p>
<p>Speaking of newspapers, they are not far behind either, putting much of their daily publications on the WWW, like <strong>The Gate</strong>, an Internet-based product of two newspapers from the West Coast of the United States, the <strong>San Francisco Chronicle</strong> and the <strong>San Francisco Examiner</strong>, complete with conference areas with discussion forums like Community, Media, Sports, Movies, etc.</p>
<p>The <strong>Agência Estado</strong>, which publishes famous newspapers like <strong>Estado de São Paulo</strong>, also already distributes its newspaper over the internet with the main headlines of the day and various information, including its classifieds and, during an Olympic period, with special areas for the sports in Atlanta.</p>
<p>Another concept that became famous with the Internet is that of <strong>online services</strong> like the giants <strong>Compuserve</strong> and <strong>America On-line</strong>, which serve people all over the world and have allies like Netscape and Microsoft. This type of organization is based on &ldquo;services&rdquo; that include discussion forums; libraries with up-to-date information; magazines, newspapers, and other periodicals; virtual stores that sell everything from CDs to clothes; leisure and business tips; and also services common to the Internet like email and WWW.</p>
<p>In Brazil, such types of service also began to spread, most notably the <strong>Folha de São Paulo</strong> and the <strong>Grupo Abril</strong>, which launched, respectively, <strong>Universo Online</strong> and <strong>Brasil Online</strong>. Such Brazilian services are still experimental and free, with no projections on costs. As an illustration, <strong>The New York Times</strong> charges US$ 30.00 per month, and America Online charges US$ 9.95 for 5 hours or US$ 19.95 for 20 hours.</p>
<p>Such services have very high revenues, mainly because of the world&rsquo;s current excitement around the virtualization of services and the rental of digital space to companies interested in placing &ldquo;virtual billboards&rdquo; or even adding other services like digital stores on the main pages, given that the number of people traveling through the digital lines every day is very large. To see this, just go to the <em>Brasil Online</em> page, for example, and come across advertising calls from companies like <strong>Sun</strong> or <strong>Credicard</strong>. These calls are links that lead to the homepages of the respective companies.</p>
<p>And speaking of advertising, someone must be crafting these pages and ads. These companies are specializing in designing specific and creative pages for a kind of media that steps out of the limitations of paper and enables things like <strong>Hypertext</strong> ( words inside a text that lead to other pages ), <strong>Marquees</strong> ( phrases that move along the line ), music ( through <strong>WAVE</strong> files or the new <strong>Real Audio</strong> technology ), animations ( via animated <strong>GIF</strong> images or else using resources of the <strong>Java</strong> language ), or even fully three-dimensional environments ( using the <strong>VRML - Virtual Reality Markup Language</strong> technology ) and much more. In this market niche are companies like <strong>Vivid Studio</strong>, which has as clients the giants <strong>Silicon Graphics</strong> and Microsoft, or <strong>Razorfish</strong>, which designs for <strong>Time-Warner</strong> and <strong>Pepsi</strong>.</p>
<p><strong>Commerce</strong></p>
<p>The main point of friction when talking about digital commerce is <strong>security</strong>. The TCP/IP protocol is the starting point for the Internet, conceived as a universal protocol but one that falls short on the security aspect, where, unlike its siblings <strong>IPX/SPX</strong> or <strong>NetBIOS</strong> for example, it does not have encrypted data transmission. Since it is the standard protocol for data transmission, it would have been convenient to establish a standard protocol for data security as well. Since this does not exist, the impasse revolves around companies fighting to develop the standard that would cause the initial surge toward the end of printed money and the development of digital credit.</p>
<p>One of the oldest is <strong>cybercash</strong>, about a year old. For now, the company only works with credit card services, but it soon promises to offer monetary payment services. Currently, with a browser connected to the network, one can shop securely in virtual malls. Through the <strong>SIPS</strong> ( Secure Internet Payment Service ) protocol, according to the company, it is as easy as point and click. In this type of transaction, you buy as many cybercashes as you wish and it is charged to the credit card.</p>
<p>The Cybercash standard supports all types of credit card. It uses the <strong>768-bit RSA</strong> and <strong>56-bit DES</strong> encryption standards. All transactions are authenticated with <strong>MDS</strong> and 768-bit RSA signatures. The first step for anyone interested is to download the free program the company offers. The Cybercash server is connected to the private networks of several banks. The company&rsquo;s initial services include credit and debit cards and an electronic payment system. For the services, users pay a modest amount, comparable to the value of a stamp. For the suppliers, the system represents savings on the fees charged for credit card transactions, due to the risk still present in transactions by telephone and email.</p>
<p>In this type of development one still finds companies like <strong>Digicash</strong>, with services centered on the <strong>First Digital Bank</strong> site, using an e-cash system ( real money converted into virtual money in virtual accounts ). <strong>Visa</strong> ( which is also already a partner of <strong>Sony</strong> - in developing a multifaceted environment of entertainment, information, and commercial transactions ) and Microsoft have <strong>STT</strong> ( Secure Transaction Technology ), the standard of these two powerhouses that wants to become an electronic version of the credit card. <strong>Mastercard</strong> is in partnership with IBM, Netscape, GTE, and Cybercash, with the <strong>SEPP</strong> ( Secure Eletronic Payment Protocol ) standard. It is an open protocol for secure online transactions.</p>
<p>Netscape develops the open security protocol <strong>SSL</strong> ( Secure Sockets Layer ) and contributes to the development of the <strong>SSL</strong> interface of the <strong>W3C</strong> ( World Wide Web Consortium ), a European consortium dedicated to creating a standard for the European Common Market. About 50 companies from all over the world are part of this consortium. The company will license the SSL technology to its partners for commercial use. The list of partners includes MCI, Bank of America, Mastercard, First Data Corporation, Novell, Digital, and Silicon Graphics.</p>
<p>Practically all the companies in the financial sector have been investing heavily in developing a platform secure and reliable enough for financial transactions of every level of importance. Hackers aside, business over the Internet does not differ much from that done outside it. That is, the best way to stay free of problems is to trust in the credibility of serious companies. It is unlikely that anyone will want to compromise their good name by failing to deliver the goods on time or by &ldquo;trading&rdquo; the credit card number.</p>
<p>In Brazil, <strong>Mappin</strong> was the first large company to enter the business of computer sales. It is also possible to choose sweets and pies at <strong>Confeitaria Brunella</strong> in São Paulo, or make reservations at <strong>Marcellu&rsquo;s Bar</strong> in Rio de Janeiro. The consumer chooses the sweet or pie they want to buy through the photos and descriptions on Brunella&rsquo;s homepage, then the store telephones to confirm the order and sends the goods. In the case of Marcellu&rsquo;s Bar, the reservation is made by email.</p>
<p>If someone is moving to the United States, or simply needs to compare prices, they can consult the <strong>For Sail By Owner Connection</strong>. It is a site specialized in home sales, with photos and specifications. If you actually need to sell your house, you can also advertise on this page.</p>
<p>Thinking about travel, <strong>Cruisin</strong> is the first tourism agency specialized in cruises that serves exclusively over the Internet. But there are already many hotels and agencies on the network. There really are alternatives for every bank limit: from Ceará cashews for less than R$ 3.00 to a house in Florida for US$ 329 thousand. These days it is virtually possible to buy anything on the Internet.</p>
<p><strong>Afterwords</strong></p>
<p>Created for military purposes, then expanded to academic circles, and finally reaching the general public, the Internet marches on in accelerated evolution, covering practically all sectors of society, where the foundations of what can be considered a virtual world are being built.</p>
<p>When the Internet evolves enough, the new technologies will build the awaited <strong>Information Super Highway</strong> where, then yes, a truly worldwide network will take shape, using not only computers in the way we know them but also any electronic equipment, like set-top boxes ( the replacements for VCRs and video-lasers ).</p>
<p>In this next generation, &ldquo;strolling around&rdquo; will be putting on a virtual reality suit and visiting virtual places with friends from other continents in a digital meeting. And this is not science fiction delusions: we are so close to it that such technologies are real and already exist, all that remains is the time to make them accessible and operational at the level of mass distribution.</p>
]]></content:encoded><category>computing-history</category><category>networking</category><category>off-topic</category></item></channel></rss>