openwrt on Linksys WRT54G v2.0 03.27.2007 09:36
Printer Friendly

For a looong time I had a WRT54G. For those who don't know, this is a Linksys router with a linux based firmware. And the folks in Linksys were nice enough to give the source code for the firmware (not like some other vendors!) and the community came up with two major alternatives: openwrt and dd-wrt.

I played with openwrt so I won't cover dd-wrt. Maybe another blog entry... :P

Instead of describing stuff, I prepared my installation and configuration notes as a bash command line utility, so that next time I install the openwrt, I can copy paste my stuff to a shell and customize it the same way.

Some of the things will not work for you if you copy paste it, because I deleted some private stuff. ; )

Openwrt imports your Linksys configurations from the original linksys firmware installation. That is automatic, so it's not covered here! Rest of the things are below.

# Documentation: http://wiki.openwrt.org/

# Installation:
# Downloaded newest whiterussian version from: http://downloads.openwrt.org/whiterussian/newest/default/
# Filename: openwrt-wrt54g-squashfs.bin
# Pushed from the web interface of Linksys default router firmware.

# Changed the root password for the first telnet connection.
passwd
# rebooted, once it reboots it disables the telnet and enables the ssh. But for some reason the telnet was still there (did not enable to login) I had to go and disable from /etc/init.d/
mv /etc/init.d/S50telnet /etc/init.d/s50telnet


# It ported every config that I had. Except the wireless LAN didnot work.
# I had to install: nas - 3.90.37-17 - Proprietary Broadcom WPA Authenticator/Supplicant
ipkg install nas


# I wanted to log my routers activity remotely. So I configured syslog to log it remotely. Of course, I first set up remote logging on my central log server. (not covered here)
# Change the IP 1.2.3.4 to your remote logging IP
nvram set log_ipaddr=1.2.3.4
nvram commit


# Default iptables rules do not allow to LOG the traffic. So I needed to install the module for that: iptables-mod-extra - 1.3.3-2 - Other extra Iptables (IPv4) extensions
ipkg install iptables-mod-extra


# I really didn't like the idea that the web config was running plain text on port 80, So I disabled it.
mv /etc/init.d/S50httpd /etc/init.d/s50httpd


# I configured some firewall rules in /etc/firewall.user
### copy start ###
echo " --- Go configure your own firewall! ---"
### copy end ###


# The date of the box was couple of thousand hours late, so I needed an ntp client. I installed: ntpclient - 2003_194-2 - NTP client for setting system time from NTP servers.
# And configured to run at the boot.

ipkg install ntpclient
######## copy start #######
cat > /etc/init.d/S60ntpclient <
#!/bin/sh
/usr/sbin/ntpclient -c 1 -s -h pool.ntp.org &
EOF
######## copy end #######

Back to Eblog

Latest two blog entries:
Weird Java Time problem
Lotus Notes Sametime with Pidgin (or gaim)


Make a comment!
Comments will be approved first to prevent suckers to misuse/abuse my comments section. So, there is a delay!
No html tags are allowed. Text is your friend ;)
I will never use your email for bad purposes, so, chill.. ;)

Date: 05.16.2008 22:44
Name:
Email:
URL:
Subject:
Comment:
Please type the number you see in this picture to the box below.


Comments:
steve <email-hidden> - 08.12.2007 12:18
space
I wanted to add the QOS scripts and subsequent packages and ran out of space. /dev/mtdblock/4 2.2M(size) 2.1M(used).

I assume ipkg downloads the packages onto the jfss partition? Is there a way to download the packages onto /tmp for installation?

Emre Saglam <email-hidden> - 08.13.2007 14:31
Re: space
You can download the package manually to /tmp and run ipkg pointing to that file. This should solve your problem. : )