<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Syed Zubyl N | Software Developer - Networking</title>
      <link>https://syedzubyl.space</link>
      <description>Syed Zubyl N — Software Developer focused on Java, Spring Boot, backend development, REST APIs, databases, Flutter and production-oriented applications.</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://syedzubyl.space/tags/networking/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Mon, 20 Jul 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Building a Secure Personal NAS with Ubuntu and Cloudflare Tunnel</title>
          <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
          <author>Syed Zubyl N</author>
          <link>https://syedzubyl.space/blog/building-secure-personal-nas/</link>
          <guid>https://syedzubyl.space/blog/building-secure-personal-nas/</guid>
          <description xml:base="https://syedzubyl.space/blog/building-secure-personal-nas/">&lt;h3 id=&quot;the-problem&quot;&gt;The Problem&lt;&#x2F;h3&gt;
&lt;p&gt;I wanted a personal Network Attached Storage (NAS) to back up files and access my data remotely from anywhere. The traditional approach involves buying an expensive Synology unit, opening ports on the home router (Port Forwarding), and setting up Dynamic DNS. Opening ports on a home network exposes it to relentless automated scanning and potential attacks.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;context&quot;&gt;Context&lt;&#x2F;h3&gt;
&lt;p&gt;I had an older laptop with decent storage and a reliable power supply (built-in battery acts as a UPS!). My goal was to install Ubuntu Server, attach high-capacity SSDs, and securely access the files over the internet using &lt;code&gt;FileBrowser&lt;&#x2F;code&gt;, but with absolutely zero open inbound ports on my router.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-i-tried&quot;&gt;What I Tried&lt;&#x2F;h3&gt;
&lt;p&gt;I initially looked into setting up OpenVPN or WireGuard on a Raspberry Pi to VPN into my home network.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-failed&quot;&gt;What Failed&lt;&#x2F;h3&gt;
&lt;p&gt;While VPNs are secure, they add friction. I wanted the ability to access my files seamlessly from any web browser on any device without installing a VPN client first.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-worked-technical-explanation&quot;&gt;What Worked &amp;amp; Technical Explanation&lt;&#x2F;h3&gt;
&lt;p&gt;I implemented an outbound-only tunnel architecture using Cloudflare Zero Trust.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Architecture Flow:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Browser → HTTPS → Cloudflare Edge → Cloudflare Tunnel (Outbound) → cloudflared daemon → Local File Browser → SSD&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;1. Hardware &amp;amp; OS Setup&lt;&#x2F;strong&gt;
I installed Ubuntu Server on the old laptop. To ensure storage reliability, I formatted the external SSDs to &lt;code&gt;ext4&lt;&#x2F;code&gt; and mounted them via &lt;code&gt;&#x2F;etc&#x2F;fstab&lt;&#x2F;code&gt; using their UUIDs, ensuring they always mount to the exact same directory even if USB ports are swapped.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;2. Application Layer&lt;&#x2F;strong&gt;
I installed &lt;code&gt;FileBrowser&lt;&#x2F;code&gt;, a lightweight web-based file manager. I configured it to run as a background service managed by &lt;code&gt;systemd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;3. The Network Layer (Cloudflare Tunnel)&lt;&#x2F;strong&gt;
Instead of opening Port 443 on my router, I installed the &lt;code&gt;cloudflared&lt;&#x2F;code&gt; daemon on the Ubuntu server. This daemon establishes a secure, outbound connection to Cloudflare’s edge network.&lt;&#x2F;p&gt;
&lt;p&gt;I configured my domain (&lt;code&gt;nas.mydomain.com&lt;&#x2F;code&gt;) in Cloudflare to route traffic through this tunnel to the local &lt;code&gt;localhost:8080&lt;&#x2F;code&gt; (where FileBrowser was running).&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;4. Security&lt;&#x2F;strong&gt;
Because the connection is outbound-only, my home IP address is never exposed to the public internet, and no ports are open. Furthermore, I placed the URL behind Cloudflare Access, requiring a One-Time PIN sent to my email before the tunnel even allows traffic to reach the local server.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;lessons-learned&quot;&gt;Lessons Learned&lt;&#x2F;h3&gt;
&lt;p&gt;Old hardware is incredibly capable if running a lightweight Linux distribution. Furthermore, modern zero-trust networking tools like Cloudflare Tunnels completely change the paradigm of self-hosting. You no longer need to compromise local network security for remote accessibility.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-i-would-do-differently&quot;&gt;What I Would Do Differently&lt;&#x2F;h3&gt;
&lt;p&gt;I would implement a secondary local backup strategy using &lt;code&gt;rsync&lt;&#x2F;code&gt; or &lt;code&gt;Restic&lt;&#x2F;code&gt; to occasionally mirror the SSD to a separate drive. While the networking is secure, SSDs can still fail, and RAID 1 over USB is generally not recommended.&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
