<<

BEFN$?FN Tuning WLAN Routers

:ljkfd`q`e^pfli_fd\iflk\in`k_Fg\eNik >@EJ@;< Ai^Mfccd\i#=fkfc`X

Learn how to take control of your home device with OpenWrt.

BY THOMAS LEICHTERNSTERN

he OpenWrt project calls itself “a many basic uses, but it doesn’t begin to custom logging, scripts, or alerts. Open- distribution for embedded exploit the device’s true potential. Wrt can also save you money by letting Kdevices.” Beyond this simple in- OpenWrt lets you adapt the to you adapt an inexpensive router, such as troduction, OpenWrt [1] is a framework your own needs. To monitor traffic, you the WRT54GL, to perform the functions for creating custom to install can build in security tools, such as Snort of a more expensive tool. on devices such as home routers and and . Also, you can configure Of course, hacking the home router is firewalls. not exactly an activity for the Versions of OpenWrt are novice. OpenWrt provides a available for a variety of de- variety of powerful and inter- vices, including the trusty esting features, but you need WRT54GL residential to be ready to experiment. / router [2], a low- Although OpenWrt imple- budget SOHO router you ments various security mech- probably recognize from anisms to help you restore the browsing the aisles of com- system, use of the OpenWrt puter shops (Figure 1). software can alter the device in a way that could make it N_p:ljkfd`q\6 impossible to return to the The pre-installed firmware original configuration. that comes with a device Installing third-party soft- such as the WRT54GL is ware on a device such as a intended for easy configura- home router also usually tion in a one-size-fits-all voids your warranty. environment. This prepack- OpenWrt is available for aged solution is good for =`^li\(1K_\C`ebjpjNIK,+>C`jXgfglcXiJF?F]`i\nXccXe[iflk\i% several router models, includ-

52 ISSUE 93 AUGUST 2008 Tuning WLAN Routers BEFN$?FN

Alternatives

Other open source projects, such as FreeWRT [5] and DD-WRT [6], also offer third-party firmware alternatives for embedded devices. ing devices by Linksys, , Allnet, or Asus. The OpenWrt system was origi- nally designed to operate from the com- mand line, but the recent X-Wrt [3] front end provides a GUI environment for router configuration. Because X-Wrt does not fully support the current Open- Wrt release (code name “Kamikaze”), it makes more sense to use the previous version (“White Russian”) if you plan to use the X-Wrt front end. X-Wrt is avail- able for download either as an / GUI bundle or as a web GUI standalone for various router models [4]. To replace the original WRT54GL router software with OpenWrt and X-Wrt, open the web interface (the ad- =`^li\)1=ifdk_\=`idnXi\Lg^iX[\Zfe]`^liXk`fe[`Xcf^`ek_\fi`^`eXcjf]knXi\#pflZXe dress defaults to http:// 192. 168. 1. 1), lgcfX[k_\Fg\eNik`dX^\kfpfliiflk\iXe[`ejkXcck_\lg^iX[\% type admin as the username and pass- word, and then click Administration | Firmware Upgrade (Figure 2). Then click the folder icon next to the input box and select the image file in the file browser. To launch the process, click the Upgrade button. Note that the network connection must be up while you are installing the image. To avoid irreparable damage to the device, do not attempt this step via WLAN. After about a minute, the X-Wrt GUI appears without any further inter- vention. The new operating system as- similates the original configuration files. >\kk`e^JkXik\[ To prepare the system for use, you first need to set up the network. OpenWrt is simply a core installation. Localizations, add-on modules, or updates are down- loaded off the . Watch out for the following quirk whenever you change the router’s settings: To apply changes, first click the Save Changes button, and then click on the Apply text link – only then will the system actually store the changes. Clicking Network in the top menu bar takes you to a submenu where you can select the first entry, WAN-LAN, to go to the basic setup. To use the router to connect to the In- =`^li\*1KfZfee\Zkkfk_\@ek\ie\k#Fg\eNike\\[jX;JCdf[\c%:fe]`^li\k_\ZfekXZk ternet via a DSL or conventional , [\kX`cj]fik_`j`eN8E$C8Ej\kk`e^j%

AUGUST 2008 ISSUE 93 53 BEFN$?FN Tuning WLAN Routers

Command Line dialog is automatically enabled after you packages you need before installing. If complete the installation. not, you might run out of space for criti- OpenWrt supports comprehensive The System | Packages section (Figure cal extensions at a later stage. configuration via the console, which you 4) features a list of hundreds of Avail- can access via SSH. Use root as the able packages, which you can install by NC8E username with the admin password that clicking the Install item next to the pack- The comprehensive WLAN configuration you have set. Thanks to BusyBox, you age description. options, which by far outclass the origi- can access almost any system tools that Unfortunately, most of these packages nal firmware, are some of the most inter- you are familiar with from Linux. lack a graphical user interface, and con- esting aspects for many users. To access The lightweight ipkg package manager, figuration requires a detour to the con- the basic settings, press Network | Wire- based on Debian’s dpkg, is available sole (see the box titled “Command less, where you can specify the operating for installing and uninstalling packages. Line”). Besides displaying installed and mode for the network. Options The command ipkg install package_ installable packages, the website also of- include Client, Ad Hoc, and Access Point. name installs the specified package and fers a nearly complete package manage- The latter is the default, which is typi- automatically resolves any dependen- ment system that is reminiscent of DPKG cally the right choice for most applica- cies. ipkg update and ipkg upgrade up- and supports repository management. tion scenarios. grade your system to the latest version. On top of this, the Install Package from When you boot a WLAN client, it first URL also supports the installation of broadcasts a message to discover reach- select PPPoE as your Connection Type selected online packages. able access points. Setting ESSID Broad- (Figure 3). In the Redial Policy, specify cast to Hide makes your router invisible whether the router will dial up the Inter- JJC

54 ISSUE 93 AUGUST 2008 Tuning WLAN Routers BEFN$?FN

stall add-on software via the Install NAS metric. The Processes entry takes you to up the configuration files and partitions Package option. a list of all active processes, which is re- are available below System | Backup & The advanced WLAN configuration is freshed at 20-second intervals. Clicking Restore. accessible via Advanced Wireless. The Stop Refreshing stops the refresh and dis- Restrict access (MAC address) filter lets plays a pull-down menu next to the pro- I\j\k you restrict access to the router to spe- cess names. If you can’t get the to talk to cific MAC addresses. If the router and From the pull-down menu, you can you in the normal way, pressing the client are further apart, you can modify kill individual processes by sending the reset button might be your only option. the transmitter output below Transmit SIGHUP, SIGKILL, or SIGTERM signals. Hold down the reset button at the rear of Power (in mw). Status | Wireless displays the connected the device for 30 seconds, then continue WLAN clients and also acts as a WLAN holding down the button while you un- 8eXcpj`j scanner to discover other WLAN de- plug the power connection and for an- OpenWrt offers far more statistical op- vices. Currently, the device lacks a other 20 seconds after unplugging. tions than the original software, and it f unction for disconnecting connected When you reconnect the power supply, will help you analyze various events on clients. the DMZ LED lights up to indicate that the device. The Graphs link in the top Clicking on Log opens a system log the router is now in maintenance mode menu bar takes you to the graphical pro- configuration window that lets you write and that your settings have been reset. cessor and network load display (Figure logfiles to an external machine (log 5); the software updates this every sec- server). The submenu also lets you ac- I\jkfi\ ond, giving you a real-time view of the cess the system and kernel logs and the To restore the original software, first device’s health state. firewall protocol. Filtering options are download the manufacturer’s image file Clicking the Status link opens up a restricted to searching for keywords. [7]. Then go to System | Upgrade in the submenu in which you can query vari- GUI and click on Find… next to Firm- ous system parameters, starting with the 9XZb`e^Lg ware file:. In the file browser, select the loaded modules, the connected clients, OpenWrt is a system that really invites image you downloaded and then click and the current network status. This users to experiment. To make sure you Open. Finally, click Upgrade to reinstall screen gives you a comprehensive over- can restore a working system if disaster the original firmware. view of almost any critical system status does strike, various methods of backing :feZclj`fej OpenWrt considerably extends the WRT54GL’s capabilities compared with the original software. The basic system comes with an enormous feature set, which also is extensible by installing modules – for example, for UPnP or QoS (). If you are not an experienced user, you should avoid installing the software. Because of the enormous number of op- tions, the risk of a broken configuration is considerable. On top of this, the web-based manage- ment interface is not exactly intuitive at times. Various functions hide behind confusing links or are only accessible by taking convoluted detours. p INFO

[1] OpenWrt: http:// . org [2] Linksys: http:// www. linksys. com [3] X-Wrt: http:// x-wrt. org [4] X-Wrt firmware download: http:// x-wrt. org/ install. html [5] FreeWRT: http:// freewrt. org [6] DD-WRT: http:// www. dd-wrt. com [7] Linksys WRT firmware: http:// tinyurl. =`^li\,1>iXg_`ZXcXeXcpj`jf]mXi`fljgXiXd\k\ij#jlZ_XjgifZ\jjficfX[Xe[e\knfib com/ 4utmuy kiX]]`Z#`ei\Xck`d\%

AUGUST 2008 ISSUE 93 55