Welcome to the CSIR Meraka Institute's "COIN" Blog

Thursday, October 28, 2004

How to set up Linksys as a RIP2 router with client mode

How to set up Linksys as a RIP2 router with client mode

1. Load Alchemy pre-release 5.2.3 onto the linksys

2. Set the Linksys Wireless interface to Client mode and set SSID to "pta-mesh"

Using the web interface select Wireless - Basic Settings
Wireless Mode : Client
SSID: pta-mesh
Select Save Settings - continue

3. Choose your IP addresses for the Wireless interface and the LAN interface

I chose the following
WAN interface: 10.50.1.13
LAN interface: 10.3.11.1

Using the Web interface select Setup - Basic Setup
Internet Connection Type: Static IP
Internet IP Address: 10.50.1.13
Subnet Mask: 255.255.255.0
Router Name: Something you like eg. david_home
Local IP Address: 10.3.11.1
Subnet Mask: 255.255.255.0

Select Save Settings - continue

4. Add router configuration files to the target directory

Enter the router directory ($LINKSYS/src/router)
# cd /mipsel-uclibc/target
# mkdir /usr/local
# mkdir /usr/local/etc

Download my RIP configuration files for linksys
ripd.conf
zebra.conf

Copy these files to $LINKSYS/src/router/mipsel-uclibc/target/usr/local/etc

Download my image making script which will build files in the code.bin image
makeimage.sh

Copy this script to $LINKSYS/src/router
Run the script
./makeimage.sh

You should now have a code.bin with the router config files in /usr/local/etc
Upload this new firmware to the linksys

5. Add commands to rc_startup to startup RIP, Flush iptables (so that RIP messages can arrive on RIP port) and remove NAT

zebra -d -f /usr/local/etc/zebra.conf
ripd -d -f /usr/local/etc/ripd.conf
iptables -F
iptables -F -t nat

8. You should now have a rip enabled linksys client - Try ping the network connected to the wireless interface from a machine connected to the LAN


Things to improve in this recipe
1. Don't flush all iptables - just enable the port for RIP routing
2. Find location in Makefile where the code.bin image is made - don't need my custom script

Thursday, October 21, 2004

Compiling Satori 4.0 with latest tool chain

To compile using the latest toolchain:

1) Apply this patch (also fixes zebra):
http://www.greyskydesigns.com/~lonewolf/satori_fix.patch

Code:
lonewolf@lonewolf:/data4/wrt54g/satori/WRT54G$ patch -p1 --dry-run
patching file src/router/rc/writeimage.c
patching file src/router/zebra/Makefile
patching file src/router/zebra/lib/Makefile
patching file src/router/zebra/ospfd/Makefile
patching file src/router/zebra/ripd/Makefile
patching file src/router/zebra/zebra/Makefile
lonewolf@lonewolf:/data4/wrt54g/satori/WRT54G$ patch -p1
patching file src/router/rc/writeimage.c
patching file src/router/zebra/Makefile
patching file src/router/zebra/lib/Makefile
patching file src/router/zebra/ospfd/Makefile
patching file src/router/zebra/ripd/Makefile
patching file src/router/zebra/zebra/Makefile
lonewolf@lonewolf:/data4/wrt54g/satori/WRT54G.orig$


2) Run 'make'

3) When 'make' errors out, run 'for i in src/router/iproute2/lib/*.a; do mipsel-uclibc-ranlib $i; done'

4) Run make again

5) for i in src/router/iproute2/tc/*.a; do mipsel-uclibc-ranlib $i; done

6) make yet again

Check out here for the forum discussion at sveasoft on the topic


Zebra Routing on the linsys

Advnaced Linux routing
Setting up RIP on zebra
Zebra manual

Thursday, October 07, 2004

Setting up a remote sniffer on the linksys

How to setup kismet on linksys

How to route between WLAN and LAN on the linksys box

Make sure you have installed Sveasoft Alchemy 5.2.4

Go to Administration - Diagnostics and enter the following into the command line
brctl delif br0 eth1
ifconfig eth1 down
ifconfig eth1 up
if addr add 192.168.2.1/24 dev eth1

Click on "save startup"
Reboot linksys

This will create a new subnet for the wireless side of the router on the 192.168.2.0 network
The LAN side of the router will remain on the 192.168.1.0 network