← All projects

Latest version

Version 1.6.019 Nov 2026

OpenNGFW

OpenNetgearFirmware: minimal, modular embedded Linux for the Netgear R6300v2 and ARMv7 platforms, built with Buildroot.

License Platform Stack

   ___                      _   _  ____ _______        __
  / _ \ _ __   ___ _ __    | \ | |/ ___|  ___\ \      / /
 | | | | '_ \ / _ \ '_ \   |  \| | |  _| |_   \ \ /\ / /
 | |_| | |_) |  __/ | | |  | |\  | |_| |  _|   \ V  V /
  \___/| .__/ \___|_| |_|  |_| \_|\____|_|      \_/\_/
       |_|
 OpenNetgearFirmware - High-Performance Embedded Linux for Netgear Routers

Facts

Target Netgear R6300v2 (Broadcom BCM4708 Cortex-A9 dual-core) and ARMv7 platforms
Base Buildroot (BR2_EXTERNAL), Linux 6.6 LTS, musl libc, BusyBox
Image openngfw.chk, flashed with nmrpflash
License MIT (OpenNGFW), GPL-2.0 (Buildroot, Linux)

Features

  • Modern Linux kernel (6.6 LTS): upstream long-term stable kernel with Broadcom Northstar (BCM4708) support, native WireGuard (CONFIG_WIREGUARD=y), and the full Netfilter IPv4/IPv6 subsystem.
  • Clean and lean userland: fast BusyBox initramfs with musl libc, Zsh with Powerlevel10k styling, and the Dropbear SSH daemon.
  • USB storage and automatic persistence:
    • Automatically mounts ext4 USB flash drives at /mnt/usb on boot.
    • Transparent OverlayFS on /etc (/mnt/usb/persist/etc_upper): network configuration, WireGuard keys and service units survive reboots with no manual sync.
    • Persistent /root and /home mounts.
  • Native package manager (apkg / pkg):
    • Written in V (compiled to a C/ARM binary) for fast package operations on embedded hardware.
    • Installs binaries, libraries and utilities directly to USB storage (/mnt/usb/opt).
    • Available packages: netclient, ufw, git, btop, htop, nano, fastfetch.
  • WireGuard and Netmaker netclient integration:
    • Out-of-the-box automatic zero-trust mesh networking.
    • A systemd unit translation shim (systemctl) to run daemons natively on SysVinit.
  • Resilient time synchronization:
    • Fake hardware clock (last_time) timestamp restore on boot.
    • Multi-provider HTTP header and NTP time synchronization daemon (S45time).
  • One-command reproducible build system:
    • A single setup.sh bootstraps host dependencies, toolchains and build trees.
    • Sub-minute incremental kernel rebuilds (make linux-rebuild) and rootfs packaging (make rootfs).
    • Automatic Netgear .chk firmware generation with proper TRX v1 and Fletcher checksums (make chk).

Install

Connect your PC to any LAN port of the Netgear R6300v2 via Ethernet:

# Find your network interface name (e.g. eth0 or enp0s20f0u1u4)
ip link

# Flash using nmrpflash
sudo nmrpflash -i <your-interface> -f build/r6300v2/images/openngfw.chk

Power-cycle the router when prompted. The router flashes the kernel/rootfs partition and reboots into OpenNGFW.

Usage

USB storage and persistence

Format a USB drive with an ext4 filesystem on your PC:

sudo mkfs.ext4 -L OPENNGFW /dev/sdX1

Plug the USB drive into either USB port on the router. OpenNGFW detects and mounts it on boot, and activates /etc overlay persistence and /root storage.

Package manager (pkg / apkg)

Install packages to your USB drive:

pkg update
pkg list
pkg install netclient
pkg install ufw
pkg install git

Services

Manage services with the lightweight systemctl runner:

systemctl start netclient
systemctl status netclient
systemctl restart netclient

Build from source

Prerequisites: Ubuntu, Debian, Arch or Fedora.

  1. Clone the repository:

    git clone https://code.weexnes.dev/OpenNGFW.git
    cd OpenNGFW
  2. Set up the host environment. The setup script verifies dependencies and fetches Buildroot LTS:

    ./setup.sh
  3. Build the firmware from scratch:

    make r6300v2
    # or: ./build.sh r6300v2

    For a fast incremental rebuild (20 to 30 seconds) after changing overlay files, scripts or kernel configs, repack and generate the flashable image without rebuilding Buildroot:

    make chk

Both build commands generate the flashable image build/r6300v2/images/openngfw.chk (and artifacts/r6300v2/openngfw.chk).

Project structure

.
├── setup.sh                         # One-command host environment & toolchain setup
├── check-environment.sh             # Validates host build dependencies
├── build.sh                         # Main build orchestrator
├── clean.sh                         # Safe cleanup utility
├── Makefile                         # Top-level Makefile wrapper
├── versions.env                     # Pinned component versions & source checksums
├── .env.example                     # Environment template
│
├── br2-external/                    # Buildroot External Tree (OPENNGFW)
│   ├── external.desc                # BR2_EXTERNAL descriptor
│   ├── external.mk                  # Package inclusion makefile
│   ├── Config.in                    # Package configuration menu
│   ├── configs/
│   │   ├── r6300v2_defconfig        # Netgear R6300v2 production defconfig
│   │   └── generic_arm_test_defconfig # QEMU ARMv7-A validation defconfig
│   └── board/
│       └── netgear/r6300v2/         # Kernel config, patches, and rootfs overlay
│
├── packages/                        # Standalone Package Management
│   ├── apkg/                        # apkg package manager source (V / C)
│   ├── builder/                     # Package archive packaging tool (build_packages.py)
│   └── repo/                        # Local repository server & index
│
├── scripts/                         # Firmware packing & recovery tools
│   ├── make_netgear_image.py        # Generates OpenWrt-spec TRX & Netgear CHK images
│   ├── fetch-sources.sh             # Downloads & verifies Buildroot LTS tarball
│   └── verify-output.sh             # Static artifact validator
│
├── docs/                            # Documentation
│   ├── architecture.md              # System architecture specification
│   ├── development.md               # Developer guide
│   └── recovery.md                  # CFE bootloader & TFTP recovery guide
│
└── tests/                           # Static syntax & integrity tests
    ├── test-build.sh                # Directory hierarchy & permission tests
    └── test-configs.sh              # Defconfig & kernel configuration validation

Docs

License

  • Buildroot: GPL-2.0
  • Linux kernel: GPL-2.0-only
  • OpenNGFW configurations and tools: MIT