Here is how to install Tomato firmware on your cheap Wi-Fi router to attain functionality of a high-cost router.
What if you could simply enhance your router’s functionalities just by some software alteration. well, Few people understand why some routers cost $15 and some hundreds of dollars.
There are hardware differences and… software differences.
Using a custom firmware (if supported by the router) can give you options/features available on a much more expensive hardware.
Such a firmware is Tomato USB. It’s an open source firmware for Broadcomm based routers.
The first step is to see if your router is supported by Tomato, so please check Shibby Tomato Builds. If it is, get the newest version and flash it on the administration interface.
Usually, there are some flavors: AIO (All in One) or VPN (few features, smaller size, perfect for most users).
If it cannot be flashed through Web interface (like Asus RT-N53), you must use the emergency procedure (see router documentation) to upload the custom firmware to the router.
After you install and set up all the usual settings on Tomato (WIFI, LAN etc.), you can go further, and with some work, you can install many programs, for example, a webserver with PHP support or Transmission Torrent client (the router must have USB ports).
Different routers have different flash memory sizes. Inside the flash reside the firmware and settings. Depending on the flash size and firmware size (VPN or AIO), some unused space might still remain, so you can create a JFFS partition to install software. This is critical for routers without USB or if you do not want to use a USB drive. If you do want to use a USB drive, read here how to create a partition, and after you create it, continue this tutorial from Step 3.
Okay lets start.
How To Upgrade Your Ordinary Router With Functionality Of A High Cost One Using Tomato Firmware
Step 1: Create a JFFS partition.
Go to Administration – JFFS – Enable – Format Erase
In the text box paste:
mount -o bind /jffs /opt
Wait a few minutes, and if you do not get any message, reboot the router.
Go to Administration – Admin Access and modify the default port settings for router administration (ex: 8082).
This will allow you to access your router on specified port.
3. Access the router on SSH using Putty (Windows) or Terminal (Mac).
On Mac, the command is:
ssh -l root IP
Username must be root and the password of the admin user.
Install Optware package manager by using the following code.
wget http://tomatousb.org/local–files/tut:optware-installation/optware-install.sh -O – | tr -d ‘\r’ > /tmp/optware-install.sh
chmod 755 optware-install.sh
Note that it may take time depending on your internet speed and your router’s processing power.
Install nano (text editor), lighttpd (webserver), and PHP
ipkg install nano
ipkg install lighttpd
ipkg install php-fcgi
Step 6: Edit the lighttpd configuration file.
and add this:
Modify the default running a port of the webserver (default is 8081).
server.port = 80
Save everything and close nano.
Restart the webserver.
Now you can put files and scripts in /opt/share/www/
If you want your webserver to be accessible from WAN, you need to add those lines to the Firewall script (Administration – Scripts – Firewall):
iptables -t filter -A INPUT -p tcp –dport 80 -j ACCEPT
iptables -t filter -A INPUT -p tcp –dport 443 -j ACCEPT
It’s done! now enjoy the features on your budget router. Do post your queries or suggestions in the comments.