Skip to content

Instantly share code, notes, and snippets.

@yoyosan
Last active December 13, 2022 07:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoyosan/af11ad438b2a5b0ed9914cfa9bad3219 to your computer and use it in GitHub Desktop.
Save yoyosan/af11ad438b2a5b0ed9914cfa9bad3219 to your computer and use it in GitHub Desktop.
Reverting from Open WRT to OEM firmware for Zyxel Armor Z2 NBG6817

Easyguide

I'm using Manjaro but this is valid for Arch.

Install atftp and net-tools. I'm using trizen and ohmyzsh aliases.

trin atftp net-tools

Set up OEM firmware in TFTP server home

cd /tmp
wget ftp://ftp2.zyxel.com/ARMOR_Z2_(NBG6817)/firmware/ARMOR%20Z2%20(NBG6817)_V1.00(ABCS.9)C0.zip
unzip ARMOR\ Z2\ \(NBG6817\)_V1.00\(ABCS.9\)C0.zip
rm NBG*
rm ARMOR\ Z2\ \(NBG6817\)_V1.00\(ABCS.9\)C0.zip
mv V1.00\(ABCS.9\)C0.bin ras.bin
mv ras.bin /srv/atftp
cd /srv/atftp
sudo chown atftp:atftp ras.bin

Start and check TFTP server

# BEFORE Starting
# change your LAN ip to 192.168.1.99

# start tftp server
sudo systemctl start atftp.service
# check status
sudo systemctl status atftp.service
# check you can retrieve the file
cd ~
atftp 192.168.1.99
get ras.bin
quit
# check the file is in the current directory
ls -lah ras.bin

Before rebooting the router with the WPS button pressed, make sure you open a terminal and run:

journalctl /usr/bin/atftpd -f

You should see something similar to this, while rebooting the router:

nov 10 17:45:42 yolosan-pc atftpd[27663]: Serving ras.bin to 192.168.1.1:2383
nov 10 17:45:42 yolosan-pc atftpd[27663]: timeout option -> 5
nov 10 17:45:42 yolosan-pc atftpd[27663]: blksize option -> 1468
nov 10 17:45:46 yolosan-pc atftpd[27663]: Server thread exiting

It means that the router got the firmware.

Additional resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment