<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Openwrt on Frank&#39;s Blog</title>
    <link>https://frankblogs.com/tags/openwrt/</link>
    <description>Recent content in Openwrt on Frank&#39;s Blog</description>
    <generator>Hugo -- 0.150.0</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 06 Oct 2025 21:32:45 +0800</lastBuildDate>
    <atom:link href="https://frankblogs.com/tags/openwrt/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Router VM Saga: OpenWrt vs. iStoreOS &amp; The Great Migration</title>
      <link>https://frankblogs.com/posts/article-5/</link>
      <pubDate>Mon, 06 Oct 2025 21:32:45 +0800</pubDate>
      <guid>https://frankblogs.com/posts/article-5/</guid>
      <description>With PVE running, it was time to create the router VM. This post details my struggles with vanilla OpenWrt, the dependency hell, and the eventual, crucial decision to migrate to the pre-integrated iStoreOS.</description>
      <content:encoded><![CDATA[<p>My Proxmox VE (PVE) hypervisor was installed and the host networking configured on my N100 box. Now it was time to create the core component: the virtual machine that would act as my main home router. My initial plan was to use vanilla <strong>OpenWrt</strong>, the classic, highly customizable Linux distribution for routers.</p>
<h2 id="act-i-the-struggles-with-vanilla-openwrt">Act I: The Struggles with Vanilla OpenWrt</h2>
<p>Creating the VM in PVE (giving it VM ID 100) involved several steps:</p>
<ol>
<li><strong>Download Firmware:</strong> Get the official OpenWrt x86-64 combined-ext4 image (<code>.img.gz</code>).</li>
<li><strong>Upload &amp; Import:</strong> Upload the <code>.img.gz</code> file to PVE (e.g., via SCP or the web UI&rsquo;s storage browser – note: uploading directly as an ISO image type fails). Import the disk image into the VM using <code>qm importdisk 100 openwrt.img.gz local-lvm</code>.</li>
<li><strong>VM Hardware Config:</strong> Assign CPU cores, RAM. Remove the default SCSI disk. Attach the imported OpenWrt disk as a VirtIO block device. Add two VirtIO network cards – one connected to PVE&rsquo;s <code>vmbr0</code> (WAN) and one to <code>vmbr1</code> (LAN). Set the boot order to use the OpenWrt disk.</li>
<li><strong>Disk Resizing:</strong> The default image is tiny. Resize the virtual disk in PVE&rsquo;s hardware tab. Boot the VM with a GParted Live ISO attached, use GParted to expand the OpenWrt partition to fill the larger virtual disk.</li>
<li><strong>Initial Network Config:</strong> Boot OpenWrt. Access the console (via PVE&rsquo;s web UI or <code>qm terminal 100</code> - not <code>qm console</code>). Use the <code>vi</code> editor to modify <code>/etc/config/network</code>, changing the LAN interface&rsquo;s IP address to <code>10.0.0.1</code>.</li>
</ol>
<p>So far, so good. I could access the OpenWrt LuCI web interface at <code>10.0.0.1</code>. I configured PPPoE on <code>eth1</code> (WAN, connected to <code>vmbr0</code>) and set up the LAN interface (<code>eth0</code>, connected to <code>vmbr1</code>) with DHCP and IPv6 server settings. Basic routing worked!</p>
<h3 id="the-dependency-hell">The Dependency Hell</h3>
<p>The problems began when I tried to customize OpenWrt by installing packages. My goal was simple: install <code>luci-app-adguardhome</code>. But <code>opkg update</code> often failed to connect to the repositories. When it did connect, attempting to install AdGuard Home resulted in a cascade of errors about <strong>incompatible architectures</strong> or missing dependencies (<code>luci-lua-runtime</code> was a frequent culprit). Even manually downloading <code>.ipk</code> packages failed with similar architecture errors.</p>
<p>I spent hours trying different package versions, compiling dependencies, and scouring forums. I even managed to &ldquo;force install&rdquo; some packages, but this led to a broken LuCI interface – the &ldquo;Services&rdquo; menu simply wouldn&rsquo;t appear, despite the package seemingly being installed.</p>
<p>[<strong>Placeholder: Add a screenshot of the terminal showing the <code>opkg</code> errors or the LuCI interface missing the Services menu.</strong>]</p>
<p>Clearing LuCI caches (<code>rm /tmp/luci-indexcache</code>) did nothing. Log files (<code>logread</code>) showed no obvious errors. File permissions seemed correct. The final nail in the coffin was a detailed error log clearly stating that key LuCI components and their dependencies were fundamentally incompatible with the base system. Trying to manually build a complex setup on vanilla OpenWrt felt like assembling a car from mismatched parts found in a junkyard.</p>
<h2 id="act-ii-the-turn-towards-istoreos">Act II: The Turn Towards iStoreOS</h2>
<p>Frustrated and realizing the &ldquo;DIY package management&rdquo; route was unsustainable, I revisited earlier advice: use a <strong>pre-integrated firmware</strong> like <strong>iStoreOS</strong>. Based on OpenWrt but comes with a user-friendly interface and, crucially, a curated app store where dependencies <em>should</em> just work.</p>
<h3 id="the-migration-plan">The Migration Plan</h3>
<p>The challenge: perform this migration without disrupting my family&rsquo;s internet access for too long.</p>
<ol>
<li><strong>Preparation:</strong> In PVE, create a <em>new</em> VM (e.g., VM ID 101) for iStoreOS. Download the iStoreOS x86 <code>.img.gz</code> firmware.</li>
<li><strong>Import &amp; Basic Config:</strong> Upload and import the iStoreOS disk into VM 101. Configure its hardware similarly to the OpenWrt VM (CPU, RAM, 2x VirtIO NICs connected to <code>vmbr0</code> and <code>vmbr1</code>).</li>
<li><strong>Offline Config Attempt (Failed):</strong> Boot VM 101 with GParted. Try to mount the iStoreOS partition to change the default IP (<code>192.168.100.1</code>) to <code>10.0.0.1</code> offline. <strong>Failure!</strong> GParted couldn&rsquo;t identify the filesystem. Manual <code>mount</code> commands failed, complaining about unknown filesystem types or missing superblocks. Offline config was impossible.</li>
<li><strong>The Switch:</strong> Plan B - configure online. Physically disconnect the WAN cable from the N100. Shut down the old OpenWrt VM (100). Start the new iStoreOS VM (101). Set my Mac&rsquo;s IP statically to <code>192.168.100.5</code>. Connect my Mac to one of the N100&rsquo;s LAN ports (connected to <code>vmbr1</code>). Try accessing <code>192.168.100.1</code>.</li>
</ol>
<h3 id="the-wanlan-inversion-twist">The WAN/LAN Inversion Twist</h3>
<p>Failure again! <code>192.168.100.1</code> was unreachable. In a moment of desperation (or maybe just random plugging), I moved my Mac&rsquo;s cable to the N100 port I had designated for <strong>WAN</strong> (connected to <code>vmbr0</code>). And&hellip; success! I reached the iStoreOS login page.</p>
<p><strong>Diagnosis:</strong> iStoreOS had, for some reason, <strong>reversed</strong> the network interface identification compared to OpenWrt. It saw <code>eth0</code> (connected to PVE&rsquo;s <code>vmbr1</code>, my LAN bridge) as its <em>WAN</em> interface, and <code>eth1</code> (connected to PVE&rsquo;s <code>vmbr0</code>, my WAN bridge) as its <em>LAN</em> interface, assigning the <code>192.168.100.1</code> address there.</p>
<p><strong>Resolution:</strong> Logged into iStoreOS via the &ldquo;wrong&rdquo; port. Navigated to <code>Network -&gt; Interfaces</code>. Edited the LAN and WAN interfaces, <strong>swapping</strong> their assigned physical devices (<code>eth0</code> &lt;-&gt; <code>eth1</code>). Saved and applied. Moved my Mac&rsquo;s cable back to a correct LAN port. Set my Mac back to DHCP. Accessed <code>192.168.100.1</code> (the default iStore IP). Success! Changed the iStoreOS LAN IP to <code>10.0.0.1</code>. Plugged the WAN cable back into the N100&rsquo;s WAN port.</p>
<p>The network migration was complete in under 15 minutes. The foundation was finally stable. iStoreOS provided the pre-packaged environment I needed. Now, it was time to deploy the services that started this whole journey.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Failed Rescue of a Bricked Router: An OpenWrt Adventure</title>
      <link>https://frankblogs.com/posts/article-2/</link>
      <pubDate>Sat, 20 Sep 2025 20:59:17 +0800</pubDate>
      <guid>https://frankblogs.com/posts/article-2/</guid>
      <description>With my ISP modem failing to provide proper IPv6, I turned to an old, supposedly bricked Netgear R8000 running OpenWrt. This post details the intense process of reviving it via Failsafe Mode, only to hit another dead end.</description>
      <content:encoded><![CDATA[<p>My quest for functional IPv6 hit a wall with the ISP&rsquo;s faulty modem (ONT). Since I couldn&rsquo;t get a proper <strong>Prefix Delegation (PD)</strong> from it, I needed a router capable enough to potentially handle the connection differently, perhaps even taking over PPPoE duties if necessary. My gaze fell upon a Netgear R8000 Nighthawk X6 collecting dust – a once-powerful router I had previously flashed with OpenWrt, only to seemingly &ldquo;brick&rdquo; it during a configuration mishap. Could this be its moment of redemption?</p>
<h2 id="operation-unbrick">Operation: Unbrick</h2>
<p>Reviving a bricked OpenWrt router usually involves entering <strong>Failsafe Mode</strong>, a minimal environment allowing command-line access. The process is timing-sensitive and requires precision:</p>
<ol>
<li>
<p><strong>Static IP Setup:</strong> I configured my computer with a static IP address in the <code>192.168.1.x</code> range (e.g., <code>192.168.1.2</code>), subnet mask <code>255.255.255.0</code>.</p>
</li>
<li>
<p><strong>Direct Connection:</strong> Connected the computer directly to one of the R8000&rsquo;s LAN ports.</p>
</li>
<li>
<p><strong>Power Cycle &amp; Trigger:</strong> Powered on the R8000. As soon as a specific LED (usually the Power or WPS light) started blinking rapidly, I repeatedly pressed the WPS button. This triggers Failsafe Mode.</p>
</li>
<li>
<p><strong>SSH Connection:</strong> Opened a terminal and attempted to SSH into the router&rsquo;s default failsafe IP:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ssh root@192.168.1.1
</span></span></code></pre></div></li>
</ol>
<p>After a few tense tries, catching the blinking light at just the right moment, I got a connection! The familiar OpenWrt command prompt appeared. From there, the standard unbricking procedure followed:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Mount the root filesystem read-write</span>
</span></span><span class="line"><span class="cl">mount_root
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Reset configuration to defaults</span>
</span></span><span class="line"><span class="cl">firstboot
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Force reboot</span>
</span></span><span class="line"><span class="cl">reboot -f
</span></span></code></pre></div><h2 id="the-mysterious-10001">The Mysterious 10.0.0.1</h2>
<p>After the reboot, I expected to access the OpenWrt LuCI web interface at the standard <code>192.168.1.1</code>. But&hellip; nothing. The page wouldn&rsquo;t load. Puzzled, I opened the terminal again and ran <code>ping 192.168.1.1</code>. No response.</p>
<p>What was going on? I vaguely remembered the OpenWrt firmware I had flashed wasn&rsquo;t an official build, but a custom one from a forum. Could it have a different default IP? I decided to check my computer&rsquo;s network settings – had it received an IP via DHCP?</p>
<p>Indeed, it had received <code>10.0.0.141</code>. The gateway? <code>10.0.0.1</code>.</p>
<p>A quick <code>ping 10.0.0.1</code> confirmed it – the router was alive and well, just hiding at a non-standard address! This custom firmware developer had decided to use <code>10.0.0.1</code> as the default management IP. Lesson learned: always check DHCP when standard IPs fail.</p>
<h2 id="configuring-the-r8000-hope-rises">Configuring the R8000 (Hope Rises)</h2>
<p>Logging into the LuCI interface at <code>10.0.0.1</code>, I proceeded to configure the R8000 as my main router:</p>
<ul>
<li><strong>PPPoE:</strong> Set up the WAN interface for PPPoE dialing using my ISP credentials. Success – it connected and got an IPv4 address (still <strong>CGNAT</strong>, of course).</li>
<li><strong>IPv6:</strong> Configured the WAN6 interface for &ldquo;Native IPv6&rdquo;. As expected, due to the ONT issue, it didn&rsquo;t get a delegated prefix, but it did acquire a WAN IPv6 address.</li>
<li><strong>Interfaces:</strong> Mapped the physical ports correctly (identifying <code>eth0.2</code> as WAN and <code>eth0.1</code>/<code>br-lan</code> as LAN).</li>
<li><strong>Wi-Fi:</strong> Configured the SSIDs and security. Interestingly, I initially set WPA3, but some older devices failed to connect. Downgrading to WPA2-PSK resolved this compatibility issue. Set appropriate channel widths (20MHz for 2.4GHz to reduce interference, 80MHz for 5GHz for speed).</li>
</ul>
<p>For a moment, things looked promising. The router was routing traffic, Wi-Fi was working (albeit with some WPA3 issues). Could this be the solution?</p>
<h2 id="the-final-failure-hope-dashed">The Final Failure (Hope Dashed)</h2>
<p>My optimism was short-lived. As I started exploring further configuration – trying to set up firewall rules or install necessary packages (<code>opkg update</code> often failed or was incredibly slow) – the R8000 started acting erratically. Sometimes the interface would become unresponsive. Other times, the lights would start flashing indefinitely, requiring a hard reboot.</p>
<p>After hours of troubleshooting, observing the inconsistent behavior, I had to face the harsh reality: this router wasn&rsquo;t just bricked by configuration before; it likely had an underlying, <strong>unrecoverable hardware fault</strong>. The flash memory was probably damaged, leading to corrupted data and instability under load.</p>
<p>The rescue attempt had failed. The Netgear R8000 was truly destined for the electronics recycling bin.</p>
<p>It seemed consumer-grade hardware, even powerful ones running flexible firmware like OpenWrt, had reached its limit for my needs. If I wanted reliability, performance, and the ability to truly overcome my network&rsquo;s challenges, I needed to look towards a different class of hardware altogether: the world of x86 soft routers.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
