Hey, this router runs Linux!

I was poking around the admin web pages on my Verizon router, and noticed an option to allow local telnet access on port 23. So I tried it, and it let me login with the same user/pass as the admin pages.

Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
Username: admin
Password: ************

Wireless Broadband Router> 

Cool! First thing to do is type help, and after browsing command options I found one to start a shell,

Wireless Broadband Router> help system shell
shell   Spawn busybox shell in foreground

Returned 0
Wireless Broadband Router> system shell
Temporary setting log_level off


BusyBox v1.01 (2005.09.07-07:38+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.

/ #

Oh, I'm right at home there. I spent most of my working days at a Linux shell prompt.

What kind of CPU is this thing running? 99% sure its going to be a 32-bit ARM of some kind...

/ # cat /proc/cpuinfo 
Processor       : ARM926EJ-Sid(wt) rev 1 (v5l)
BogoMIPS        : 1196.03
Features        : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 16384
I assoc         : 4
I line length   : 32
I sets          : 128
D size          : 16384
D assoc         : 4
D line length   : 32
D sets          : 128

Hardware        : Feroceon-KW2
Revision        : 0000
Serial          : 0000000000000000

How much memory is available?

/ # free
              total         used         free       shared      buffers
  Mem:       122528        93436        29092            0            0
 Swap:            0            0            0
Total:       122528        93436        29092

How much flash "disk" space is available?

/ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
cramfs                    2200      2200         0 100% /mnt/cramfs
modfs                      208       208         0 100% /mnt/modfs
/dev/mtdblock0           32768      7636     25132  23% /mnt/jffs2

This is very similar to the Zink hAppy printer that I spent several years working on.

Can I write files?

/ # ps > ps.txt
/ # ls -l ps.txt
-rw-r--r--    1 0        0            1497 Sep  3 00:19 ps.txt

I wonder if Go can cross-build for this architecture? Maybe check that out later.

Many (perhaps most) consumer routers have been built on Linux since the late 2000s, so this tech note isn't unique or revelatory, but I still get a thrill out of poking at devices and finding a familiar environment.

"I liked it before it was cool."

From 1999 to 2008 I used an a Corel NetWinder as my home router behind my cable modem. It was a neat little machine running ARM Linux, and I had fun playing with the routing and firewall rules. At one point I had it configured play a "plink" sound through the internal speaker when a packet trying to find an unsecured service would hit and get dropped.