I very quickly realised that the web interface was limited. And I found myself diving into the console to get things done. Not a huge problem, but certainly for people with less Linux knowledge, a web interface can be nice. A project that is run alongside OpenWRT is X-Wrt. Instead of installing this over the top of my OpenWRT image, I just downloaded a pre-made firmware with X-Wrt already installed.
X-Wrt has so much more functionality, such as the ability to organise your firewall rules (instead of editing them manually in a text file). However, it does use up more space on the device.
What makes OpenWRT very userfriendly and quick to deploy, is the “ipkg” package system. Porting software to OpenWRT is hard work, especially when trying to keep the footprint as small as possible – so leaving this to other people kind of makes sense.
Once you’ve set up your package repositories (the default is the official OpenWRT), then you can find pretty much anything you need.
It’s also very quick to remove any packages that you don’t think you’ll need. I installed kmod-cifs and cifsmount, so that I could mount the Terastation on the router’s local file system. The same principle applies for any SAMBA/Windows Share.
I added the following line in to my startup scripts, via the web interface.
”“/sbin/mount.cifs //192.168.0.11/share /mnt/terastation -o guest””
192.168.0.11 is the IP address of the Terastation, and /mnt/terastation is a folder I made previously.
I then rebooted the router, so that the cifs Kernel module could be loaded, and the new startup script executed.
To access this, I needed a web browser interface. This turned out to be much more annoying than I originally intended. Although OpenWRT uses BusyBox, getting this to work with PHP was very difficult indeed, constantly coming up against issues. Today, a new version of BusyBox was released, with new features that might aid this, but this new version hasn’t been ported to OpenWRT yet.
I did have limited success using the built in webif-page CGI wrapper, to get PHP working. Using this and one of my favourite simple PHP scripts, File Thingie. This is a single PHP file, that will you give you browsing capability of a folder (such as our Terastation), including ability to upload files.
However, although I had limited success – implementing it took modification of the original code and certainly wasn’t a walk in the park.
Believe me, I spent hours trying to get this working, and although it is possible to get lighthttpd+php working, I kept running out of space and frustration got the better of me.