A collection of notes taken when tinkering with technology. I also have another website (link below) to record personal solutions to security challenges.
entware is a tool suite allowing you to use tools such as tcpdump on your router. The following is a tutorial extracted from Tomato USB explaining how to install entware.
Disk formatting
It is recommended that you format your USB storage device to ext3 (for HDDs) or etx2 (for flash drives, to minimize writes to the flash and avoid wearing it too much). If you are unfamiliar with Linux disk formatting tools (fdisk and mkfs), it is suggested that you format the disk using a graphical tool from a Linux desktop (such as Ubuntu).
The suggested size for the partition is max 1 Gbyte, or even less (512Mbyte is already more than enough). While formatting, use the label “optware” for the partition that you intend to use for Optware.
If you want to store additional data in the USB key, you can simply use a different partition (or store it within the Optware’s partition, if you want to).
Router configuration
Log into your router with the web interface. Usually http://192.168.1.1.
Go to USB and NAS » USB Support
Enable “Core USB Support”, “USB 2.0 Support”, “USB Storage Support”, All “File Systems Support”, and also enable “Automount”
Go to Administration » Scripts » Init and add the following line
Then click [SAVE].
This tells Tomato to automatically mount the partition named “optware” in /opt. You can change the filesystem from “ext3” to “ext2” in case you formatted it with ext2.
Checking configuration
Reboot your router.
Plug the USB disk/pendrive if you have not already.
In the web interface, go to USB and NAS » USB Support » Attached Devices and check the list. There should be your USB drive, with a text like Partition “optware” ext3 is mouned on /opt.
You can mount/umount the partition from the web interface.
Download the entware shell:
cd /opt
wget http://qnapware.zyxmon.org/binaries-armv7/installer/entware_install_arm.sh
# Output
Connecting to qnapware.zyxmon.org (81.4.123.217:80)
entware_install_arm. 100% |*********************************************************************************************************************************| 1711 0:00:00 ETA