Julius Plenz – Blog

Using OpenWRT (again)

The old and cheap wifi router we used in our flat got buggy; it had some 20% packet loss at times, and the LAN clients were not able to make connections to each other (only WAN connections were possible).

So I dug up my old WRT54G, reset the factory settings, and used that one as access point. This worked for about one week; today, when I came home, the internet connection would not work any more.

Ping statistics from the router (delivered to the web interface) showed that the internet connection was established. However, the router would not forward internet traffic from the LAN.

An hour ago I installed OpenWRT. I had been using it some years ago and was astonished that "White Russian" is still the stable release. Anyhow, there's a web interface now which is pretty nice. (With a link "Review settings", where you'll get a shell script that will get executed once you hit "apply" – nice if you want to find out the commands!)

There was some manual work to do, I leave this for search engines in case someone else has these issues.

WPA2-PSK setup

WPA2 is not natively supported. Although the nvram keys exist, the wifi driver cannot use them properly. iwconfig will display Encryption key:off regardless of what you configure.

To make WPA2 work, install the nas package (documentation). The /etc/init.d/S41wpa script actually manages WPA2 settings (and retrieves the configuration keys from nvram):

# ipkg install nas
# /etc/init.d/S41wpa restart

The relevant nvram keys for my wireless are:

wl0_akm=psk psk2
wl0_crypto=tkip+aes
wl0_ssid=...
wl0_wpa_psk=...

PubKey Authentication with DropBear

Simple, once you know it:

$ scp ~/.ssh/id_dsa.pub root@192.168.1.1:/etc/dropbear/authorized_keys

NTP

Keep up to date!

# nvram set ntp_server=time.fu-berlin.de
# nvram commit
# ipkg install ntpclient

Interestingly, the signal strength and bandwidth throughput is better with OpenWRT than using the LinkSys firmware. :-)

posted 2011-01-14 tagged openwrt and ssh