adding some persistence to the wrt54 router

I have been having some issues with this router not allowing clients to authenticate properly. It seems to just drop connections. I’m not sure it’s fixed now — I modified the Keychain settings to permit all applications to access the router’s login details — but in the process, I worked out how to add configuration details that the web UI doesn’t explicitly permit.

NB: I have upgraded my WRT54G with the dd-wrt firmware, v.23SP2. The secret is the ability to mount cifs/samba shares. There is an option in the UI to mount them but I have never gotten it to work consistently: I suspect the smbfs module isn’t being loaded.

So I use the commands tab in the Administration page, and simply drop in the commands I want to run.

insmod smbfs
smbmount //192.168.2.25/dd-wrt /mnt -o username=dd-wrt,password=******,debug=4
if [ -f /mnt/hosts ]; then grep 192 /mnt/hosts > /etc/hosts ; fi

Prior to all this, I had to create a dd-wrt user and add it to the smbpasswd file. Any files I want to make visible to the router are copied or linked into its home directory. You could update resolv.conf the same way.

The built-in command to mount smbshares mounts it at /tmp/smbshare, but I am just putting it on /mnt. But the built-in command seems to be broken. I think the smbfs module is missing from the boot/load sequence. If it’s loaded manually, and I run the startup commands, that directory gets mounted on /tmp/smbshare.

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/mtdblock/4 320 320 0 100% /jffs
//192.168.2.25/dd-wrt 111230976 86286336 24944640 78% /mnt

Now if I could work out a way to dump the nvram out to that directory on a regular basis, rather than have to download it over http (maybe some kind of wget instruction?), that would be handy.

Now playing: Western Promise from the album “Vienna” by Ultravox

Leave a Reply

Your email address will not be published. Required fields are marked *