How to Install Linux (OpenWrt) on the Netgear WNDR4300SW (Surewest) to Use as a Hotspot (XfinityWiFi) Repeater

A couple of years ago, I purchased a Netgear WNDR4300SW from a thrift store for $5. With 128MB of flash, and 128MB of RAM it’s pretty decent. More info here: openwrt.org/toh/hwdata/n…. Having an Atheros AR9344, AR9580 2.4GHz:b/g/n 5.0GHz:a/n WiFi chipset makes it a perfect candidate for Linux. The USB 2.0 port makes it possible to USB tether an Android phone. Which will allow us to connect to a 5GHz XfinityWifi hotspot, and rebroadcast it on both the 2.4GHz and 5GHz radios. This can mitigate the 15 maximum number of concurrent clients for the xfinitywifi public hotspots.

Requirements:

  1. A Netgear WNDR4300SW device, and 12v 2.5a power supply.
  2. A Linux computer (Ubuntu 18.10) with an ethernet jack
  3. An Android phone with a 5GHz radio (Nexus 5) with OS that allows USB tethering (LineageOS 14.1)
  4. Micro USB cable.
  5. A Cat5/e/6 cable.
  6. A working internet connection with an ethernet jack free.
  7. At least one 110v plug free to run the router.
  8. Incredible patience.

Installing OpenWRT on the WNDR4300SW

    1. Download the OpenWRT two images from here: openwrt.org/toh/views/to…
    2. Compile the C Program used to modify the WNDR4300 firmware for the WNDR4300SW. (Thank you to all the fine, smart folks here: gist.github.com/aplocher…) , and modify the WNDR4300 factory firmware with this pasted into a terminal:
      wget https://raw.githubusercontent.com/jphein/wndr4300sw/master/patch4300V1.0.0.6SW.c
      gcc -o 4300sw patch4300V1.0.0.6SW.c
      chmod u+x 4300sw
      ./4300sw openwrt-18.06.1-ar71xx-nand-wndr4300-ubi-factory.img
    3. Reset the router to factory defaults by holding down the reset button with a paperclip for 30 seconds.
    4. Connect either via ethernet orusing the default SS Use the URL: 192.168.1.1.
      I was unable to access the router via telnet using this: wiki.openwrt.org/toh/net…, but thanks to Todd Nestor, I was able to get the default username and password from his article here: toddnestor.com/hacking-t… The stock WNDR4300SW default credentials (username/password) are admin/cciadmin . Upload the factory image using the firmware update feature.
    5. OR, use the TFTP option here: oldwiki.archive.openwrt….
      1. set a static IP on your computer, i.e 192.168.1.35, and connect the ethernet cable to the router
      2. power on the router
      3. press and hold the RESET button as soon as the switch LEDs light up.
      4. keep holding RESET until the power LED begins to flash orange and then green.
      5. once the power LED is flashing green, release RESET
      6. start the TFTP transfer to router at 192.168.1.1. In your computer execute:

        sudo apt install tftp-hpa
        tftp 192.168.1.1 -m binary -c put openwrt-18.06.1-ar71xx-nand-wndr4300-ubi-factory.img
      7. log on to openwrt and upgrade using the openwrt-18.06.1-ar71xx-nand-wndr4300-squashfs-sysupgrade.tar

Installing Lineage OS on the Nexus 5

  1. This is well documented here: wiki.lineageos.org/devic…
  2. Turn off lock screen
  3. Enable auto USB tether using Automate: android.stackexchange.co…
  4. Run the flow, Turn off logging, and check “start running flows on device boot”.

Connecting and Configuring

    1. Connect smartphone to wifi Hotspot with Micro USB cable.
    2. Enable USB tethering in router and smartphone: openwrt.org/docs/guide-u…
        1. ssh [email protected]
        2. Connect router to internet via it’s WAN port
        3. opkg update
          opkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether
          uci set network.TetheringWAN=interface
          uci set network.TetheringWAN.proto='dhcp'
          uci set network.TetheringWAN.ifname='usb0'
          uci set firewall.@zone[1].network='wan wan6 TetheringWAN'
          uci commit
    3. Enable Wireless

If later you want to just use the router you can use the 5GHz radio and change the MAC to the authorized Nexus 5. Using: gist.github.com/rcg4u/91…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.