[wellylug] Linux on Linksys WRT54G
Ewen McNeill
wellylug at ewen.mcneill.gen.nz
Mon Jan 3 17:45:27 NZDT 2005
Hi,
Someone here may be interested in this so I thought I'd mention it.
My home firewall is now a Linksys WRT54G[0] running Linux 2.4.20 with
Openswan[1] for the IPSec tunnels, a GRE tunnel, ssh (dropbear) and
Shorewall[2] for the firewall rules. I'm using the OpenWRT[3] Linux
distribution and various packages for it, with a few modifications.
I have 112kB free on the flash. Yes, 112 _k_B. In fact at present I
haven't got the traffic shaping stuff set up because the net/sched
modules take up more than the free space available.[4]
I had to recompile a few things in order to get everything going, but
mostly it's just a matter of following the (right bits of) various howtos
linked off the OpenWRT site. At some stage -- in my copious spare time --
I'll write up the details of what I did to install it.
root at wrt54g:~# cat /proc/cpuinfo
system type : Broadcom BCM947XX
processor : 0
cpu model : BCM3302 V0.7
BogoMIPS : 199.47
wait instruction : no
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
VCED exceptions : not available
VCEI exceptions : not available
dcache hits : 4278189690
dcache misses : 939129087
icache hits : 4051690628
icache misses : 2076058620
instructions : 0
root at wrt54g:~# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 14598144 11710464 2887680 0 815104 5222400
Swap: 0 0 0
MemTotal: 14256 kB
MemFree: 2820 kB
MemShared: 0 kB
Buffers: 796 kB
Cached: 5100 kB
SwapCached: 0 kB
Active: 2692 kB
Inactive: 4244 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 14256 kB
LowFree: 2820 kB
SwapTotal: 0 kB
SwapFree: 0 kB
root at wrt54g:~# df -k
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 896 896 0 100% /rom
/dev/mtdblock/4 2240 2128 112 95% /
root at wrt54g:~# ps ax
PID Uid VmSize Stat Command
1 root 372 S init
2 root SW [keventd]
3 root RWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
7 root SW [mtdblockd]
16 root SWN [jffs2_gcd_mtd4]
31 root 324 S klogd
32 root 404 S syslogd syslogd -R 172.21.1.10 -L -C 32
493 root 368 S /usr/sbin/dnsmasq
498 root 372 S /usr/bin/dropbear
672 root 416 S /bin/sh /usr/lib/ipsec/_plutorun --debug none --uniqu
673 root 352 S logger -s -p daemon.error -t ipsec__plutorun
676 root 420 S /bin/sh /usr/lib/ipsec/_plutorun --debug none --uniqu
677 root 416 S /bin/sh /usr/lib/ipsec/_plutoload --wait no --post
679 root 1116 S /usr/libexec/ipsec/pluto --nofork --secretsfile /etc/
700 root 368 S /usr/sbin/crond
733 root 148 S _pluto_adns
897 root 592 R /usr/bin/dropbear
959 root 520 S -sh
993 root 352 R ps ax
Ewen
PS: If anyone is planning on repeating this I suggest looking at the
Linksys WRT54GS (about $25 more these days) which has twice as much flash
(8MB flash in total). AFAICT it's supported by OpenWRT and is otherwise
compatible.
[0] A wireless (802.11G) router appliance (no moving parts) from Linksys
with a 200MHz MIPS (mipsel) CPU, 16MB RAM and 4MB flash, which comes
with an embedded Linux distribution. After some persuasion Linksys made
_most_ of the source code available; there are some hardware drivers
which are binary only, alas -- hence Linux 2.4.20.
[1] http://www.openswan.net/
[2] http://www.shorewall.net/
[3] http://www.openwrt.org/
[4] I can have either tcpdump or the traffic shaping stuff installed; and
tcpdump is more useful when setting things up.
More information about the wellylug
mailing list