HOWTO Install OpenWRT on NetGear DG834G v2 ========================================== It is possible to install OpenWRT on a NetGear DG834G v2 wireless ADSL firewall router, driving the ethernet ports and connecting as a WiFi client, using WEP encryption, to an access point. Here is how I did it. 1. Enable telnet on the device by visiting: http:///setup.cgi?todo=debug 2. Backup the flash and modify ADAM2 See http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/DG834G and http://www.earth.li/~noodles/hardware-dg834g.html I recommend you back up mtd0 through mtd4. 3. Download and Compile OpenWRT I succeeded with SVN development revision 14793. i. Download from e.g. http://downloads.openwrt.org/kamikaze/ or via Subversion e.g. svn co https://svn.openwrt.org/openwrt/trunk/ ii. install a .config file or run 'make menuconfig' The .config files I have employed are here and here iii. make (then wait - it takes an hour or two to download all the components and compile) 4. Split the images into mtd0 and mtd1 See http://www.earth.li/~noodles/hardware-dg834g.html again for how to split the image into two components, one for mtd0 and one for mtd1. You will find them in bin/openwrt-ar7-squashfs.bin dd if=openwrt-ar7-squashfs.bin of=ow-mtd1.bin count=720896 bs=1 dd if=openwrt-ar7-squashfs.bin of=ow-mtd0.bin skip=720896 bs=1 5. Install them onto the router I had *no success* going about this using Adam2, as described on http://www.earth.li/~noodles/hardware-dg834g.html. I began the ftp upload, which was still going 12 hours later. I pulled the plug, and of course found the firmware file had only been partially uploaded and the router was "bricked". Well not completely. Here's how to de-brick in this situation. [[ http://kb.netgear.com/app/products/model/a_id/2324 i.e. download a firmware e.g. ftp://downloads.netgear.com/files/dg834v2_dg834gv2_3_01_38_uk_only.zip and the Windows-only recovery utility e.g. ftp://downloads.netgear.com/files/dg834_recovery_utility.zip Unzip and follow the instructions ]] So having failed at Adam2, I decided to install using dd. This requires getting the OpenWRT image files onto the router first. A helpful way of doing this is with the DGTeam custom firmware! http://dgteam.ilbello.com/ http://dgteam.ilbello.com/index.php?pid=9 Download and install this firmware using the Netgear's standard web interface. Then enable telnet once again as per (1) above and enable the dropbear ssh (part of the DGTeam custom firmware) again from the Netgear's customised web interface. Now copy the mtd0.bin and mtd1.bin files to the router: cat ow-mtd0.bin | ssh 'cat >/tmp/mtd0.bin' cat ow-mtd1.bin | ssh 'cat >/tmp/mtd1.bin' Now telnet/ssh to the router, check the files with md5sum and install the firmware files. REMEMBER, INSTALLING FIRMWARE FILES IS DANGEROUS AND CAN BRICK YOUR ROUTER. DON'T DO IT IF YOU DON'T KNOW WHAT YOU'RE DOING. Check them first with md5sum on the router: # md5sum /tmp/mtd* And on your Linux box: # md5sum ow-mtd* MAKE SURE THE NUMBERS MATCH!!! Now install: # dd if=/tmp/mtd1.bin of=/dev/mtdblock/1 # dd if=/tmp/mtd0.bin of=/dev/mtdblock/0 Once this is done, reboot the router and wait a few minutes for OpenWRT to come up. You should be able to telnet to it on 192.168.42.1. Run 'passwd' and configure yourself a root password. Then telnet will stop working, but ssh will start working! 6. Install the ACX111 wireless driver firmware First get hold of the firmware e.g. from http://www.hauke-m.de/fileadmin/acx/fw.tar.bz2 Using the above ssh trick, copy the appropriate file to the router e.g. # cat acx111_2.3.1.31/tiacx111c16 | ssh 'cat >/lib/firmware/tiacx111c16' (Yes I know, the 2.3.1.31 isn't what's recommended on http://acx100.sourceforge.net/wiki/Firmware, but it's what I have and it works for me. Others may work too). Now ssh to your router (on 192.168.42.1) and get the wifi up and running with the following commands: # insmod acx # iwconfig wlan0 essid key restricted # ifconfig wlan0 up # route add default gw # echo nameserver >/etc/resolv.conf If all has gone to plan, you should be able to ping and other machines in the outside world. If not, examine the syslog by running logread i.e. # logread 7. That's it for now. What I did this for was to be able to employ the Netgear as a 'repeater' in order to wireless-enable hardward that wasn't wireless-capable. A few more steps are required to complete this job, i.e. # iptables -t nat -F # iptables -t filter -F # iptables -P FORWARD ACCEPT # iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE ... and enabling a dhcp server on the router. struan dot bartlett [at] News Now dot co dot uk Primary References http://www.earth.li/~noodles/hardware-dg834g.html http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/DG834G http://acx100.sourceforge.net/wiki/Firmware http://forum.openwrt.org/viewtopic.php?pid=53713#p53713 / http://forum.openwrt.org/viewtopic.php?id=11749 http://wiki.openwrt.org/AR7Port http://dgteam.ilbello.com/index.php?pid=9 http://kb.netgear.com/app/products/model/a_id/2324