Skip to content

Instantly share code, notes, and snippets.

@Timmmm
Created September 1, 2016 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Timmmm/9c71c358383c1ea2d530926727a5fb80 to your computer and use it in GitHub Desktop.
Save Timmmm/9c71c358383c1ea2d530926727a5fb80 to your computer and use it in GitHub Desktop.

Tomato Installation

This page describes how to install Tomato on an Asus RT-N16 router (and possibly others) in Linux.

Note that the original Tomato is no longer developed. There are two maintained mods, as of 2016 - Toastman and Shibby.

Choosing an Image

There are loads of different version to download. The information about which to choose isn't very clear. There is some information here, here, here and here.

For RT-N16 you'll want something like tomato-K26USB-1.28.RT-MIPSR2-138-Mega-VPN.zip.

Linux

Download the appropriate firmware.

  1. Install tftp:

     sudo apt-get install tftp
    
  2. Use a cable to connect your computer to LAN port 1 on the router.

  3. Turn off the router, disable your ethernet connection:

     sudo ifconfig eth0 down
    
  4. Turn on the router while holding down the 'restore' button on the back. You should be rewarded with a slowly flashing power LED (about 0.5 Hz). You only need to hold the restore button down for a second.

  5. Enable your network:

     sudo ifconfig eth0 up 192.168.1.2
    
  6. Check you can ping your router.

     ping 192.168.1.1
    
  7. Upload the firmware:

     cd <place where it is downloaded>
     ls *.trx
     tftp 192.168.1.1
     binary
     put <the trx file>
    
  8. Then wait for the prompt to be returned, and wait for a further minute. If it says Transfer timed out. then it is probably because the image is too large. Try a smaller one, for example AIO didn't work for me, but Mega-VPN did (it is half the size).

  9. Finally turn off the router, set your ethernet back to auto, wait a minute, turn on the router, go to http://192.168.1.1/ and you should have a tomato install! If you had a previous Tomato install it will retain your settings. If you want to reset them you need to clear NVRAM as described below.

Additional clarifications from Sergey Gleizer (thanks!):

  • Sometimes (but not others) pinging the router in step 6 will cause the power LED to stop flashing and the router will not accept the tftp session after that; restart the process and proceed without pinging, if this happens.
  • After TFTP session completes, wait about five minutes for the firmware to actually be flashed. There is no visual indicator that flashing is complete... If you fail to wait long enough before power cycling the router, it will have an incomplete firmare flash and will go to recovery mode (slow flashing power LED, same as when powering up with 'restore' button pressed)
  • After a successfull flash, it is a good idea to clear NVRAM by powering up while holding down WPS button and continuing to hold it for 30 sec after power-up.

Windows

If you've done this on Windows let me know, but I guess the differences are:

  1. You need to download a tftp binary. Shibby has one on his site here.

  2. When you enable ethernet, you need to give it a static IP of 192.168.1.2 as described by Google.

I haven't tried it on Windows.

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