WRT54g for MANET

26
WRT54g for MANET Ian Chakeres

Transcript of WRT54g for MANET

WRT54g for MANETIan Chakeres

Ian Chakeres

Outline

Linksys WRT54g

OpenWRT

Installation and configuration

Creating a custom image

Open discussion

Resources

DEMOs throughout

Ian Chakeres

HardwareLinksys WRT54g - retail approx. $70Wired: 5 ports - ADMtekWireless: IEEE 802.11g - Broadcom

Dual RP-TNC antenna portsAdjustable transmit power

FLASH: 4MB, 2MB usableRAM: 16MBCPU: 200MHz MIPSOS: LinuxOpen Source

Ian Chakeres

Default Configuration

vlan0

vlan1

vlan0

Ian Chakeres

Configuration

br0

vlan1

eth1

eth0

Ian Chakeres

New Box

WAN: DHCP

LAN: 192.168.1.1

http administration

DEMO

WAN setup required for certain operations

boot_wait=on, loading new firmware

Ian Chakeres

boot_wait

boot_wait=on

safe boot mode - 3 to 5 seconds

eth0 responds ARP and tftp requests

allows firmware loading

boot_wait=off by default

Ian Chakeres

Setting boot_wait=on

Management page ping exploit;cp${IFS}*/*/nvram${IFS}/tmp/n;*/n${IFS}set${IFS}boot_wait=on;*/n${IFS}commit;*/n${IFS}show>tmp/ping.log

DEMO

Ian Chakeres

Distributions

Linksys GPL

Preinstalled firmware

SveaSoftThe Sveasoft firmware adds a host of new features to your Linksys WRT54G or WAP54G router - including increased performace.

Ad-hoc mode

OpenWRT

Ian Chakeres

OpenWRT

Minimal base providessquashfs and jffs2network initializationfirewalldhcptelnetbusybox environment

Everything else is a package

Ian Chakeres

OpenWRT

Building a the image> wget http://openwrt.org/cgi-bin/viewcvs.cgi/buildroot/buildroot.tar.gz> tar xzvf buildroot.tar.gz> cd buildroot> make

Takes about one hourrequires internet access

Ian Chakeres

Loading the New Image

Configure the WAN interfaceConfigure your interfaceTFTP always 192.168.1.1>tftp 192.168.1.1tftp> binarytftp> rexmt 1tftp> tracetftp> put openwrt-g-code.bin

Unplug-plugin WRTDEMO

Ian Chakeres

firstboot

Wait for firstboot to complete - IMPORTANT

Power light will stop blinking

DMZ light will turn OFF

DO NOT INTERRUPT OR REBOOT

Ian Chakeres

Filesystem Layout

Two filesystems

squashfs - read-only

jffs2

4MB flash

2MB usable

Ian Chakeres

Logging In

Configure your interface

Telnet 192.168.1.1

DEMO - login, filesystem

If already configured, IP might be different

Ian Chakeres

Filesystem Manipulation

jffs2 points to squashfssaves space

Editing filesremove linkcopy file from /romedit

DEMO - unlink, copy, edit file

Ian Chakeres

NVRAM

Non Volatile RAMImportant things live here

nvramshowget nameset name=valuecommitDEMO - nvram

WARNING - RESET button

Ian Chakeres

after_firstboot.nvram

after_firstboot.nvram NODEID

192.168.10.NODEID wired uplink

192.168.16.NODEID wireless

192.168.17.NODEID wired backplane

DEMO - after_firstboot.nvram

Sets up lots of NVRAM variables

wl0, wifi, wan, lan, etc

REBOOT - causes variables to take effect

Ian Chakeres

Basic Custom Image

Lots of modifications and additionsConfiguration

dns, routing tables, startupModules

ipv6, netfilterSoftware

mne, nrlolsr, mgenDEMO - modules, config, software

Ian Chakeres

Package Management

ipkg

update

install, upgrade

remove

list

status

DEMO - ipkg

dropbear (ssh), tcpdump, olsrd (unik)

Ian Chakeres

Creating a Custom Image

Important locationsbuild_mipsel/rootbuild_mipsel/release/src/linux/linuxuse find . -name “x” -print

Building and rebuildingpre_recompile_kernel.shmake

Some files/directories get overwritten

Ian Chakeres

Installing and Configuring New Image

Same process as new box

TFTP 192.168.1.1 unplug/plugin

IP address after load will be configured

after_firstboot.nvram may be unnecessary

Ian Chakeres

NRL and the WRT54g

NRL-OLSR, MNE, MGEN, ssh, IPv6, WEPCheap laptop replacementQuick demosLarge scale testsEasy setupCustomizable

Ian Chakeres

Problems

Ad-hoc mode

Failed installation

always set boot_wait=on

attempt reinstall using tftp

WARNING - RESET button

de-bricking instructions available

Ian Chakeres

Discussion

Questions

Comments

Ian Chakeres

Resources

Lots of content verbatim from belowOpenWRT

http://openwrt.orguser guide, NVRAM, faq, forums, wiki

Linksys GPLhttp://www.linksys.com/support/gpl.asp

Seattle Wirelesshttp://www.seattlewireless.net/index.cgi/LinksysWrt54g

SveaSoftDe-brick - http://openwrt.org/forum/viewtopic.php?t=17