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 much more expensive hardware.
Such a firmware is Tomato USB. Its 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.
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.
Step 2:
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.
https://ip_router:8082
default: https://192.168.1.1:8082
Step 3:
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.
Step 4:
Install Optware package manager by using the following code.
cd /tmp
wget https://tomatousb.org/local–files/tut:optware-installation/optware-install.sh -O – | tr -d ‘\r’ > /tmp/optware-install.sh
chmod 755 optware-install.sh
sh optware-install.sh
Note that it may take time depending on your internet speed and your router’s processing power.
Step 5:
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.
nano /opt/etc/lighttpd/lighttpd.conf
and add this:
server.event-handler =”poll”
Modify the default running port of the webserver (default is 8081).
server.port = 80
Save everything and close nano.
Step 7:
Restart the webserver.
/opt/etc/init.d/S80lighttpd restart
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
Its done! now enjoy the features on your budget router. Do post your queries or suggestions in the comments.