HOWTO setup Wi-Fi Protected Access (WPA) with experimental firmware
After I had problems myself setting up WPA I decided to share my experience with it, in writing down this little HOWTO. I hope this helps a bit.
This was tested on a WRT54GS v1.0 together with an Asus WL500G Deluxe router. Please also read the OpenWrtFaq at [1] and [2].
1. Requirements
- Experimental jffs2 Firmware image (2005.05.25) from [3]. It may also work with squashfs but simpliest is jffs2 because it creates a writable partition on the flash.
- download the nas, S41wpa and hotplug files from [4]. Tip: Use wget on the router to download or transfer the files via scp.
- you must have a working WDS connection (bridged to br0) between the routers without any encryption (disable WEP)
2. Set nvram variables
Set the following nvram variables:
nvram set wl0_auth_mode=psk
nvram set wl0_mode=ap
nvram set wl0_wpa_psk=<key-passpharse>
nvram set wl0_wpa_gtk_rekey=3600
nvram set wl0_ssid=<your ssid>
nvram set wl0_wep=disabled
nvram set wl0_crypto=aes
nvram commit
reboot
Note: wl0_wpa_psk must be a ASCII string >8 and <63 chars, also don't forget to set the lan_ifname / lan_ifnames if not already done. wl0_crypto is working with aes and tkip but I _never_ get it working with aes+tkip combination.
Examples for lan_ifname and lan_ifnames (remember the interfaces may be different on your hardware):
nvram set lan_ifname=br0
nvram set lan_ifnames="vlan0 eth1"
nvram commit
reboot
3. Files
copy the following downloaded files, make links and make them executable as shown below
- cp S41wpa /etc/init.d/S41wpa ; chmod a+x /etc/init.d/S41wpa
- cp nas /usr/sbin/nas ; chmod a+x /usr/sbin/nas
- cd /usr/sbin ; ln -s nas nas4not
- cp hotplug /sbin/hotplug
4. Fire up WPA/nas
Start nas with /etc/init.d/S41wpa or just reboot. ps ax | grep nas should show a nas process up and runnung.
It takes a few secends to exchange the keys. When its up the routers should be pingable again from both sites.
You need to setup nas with this HOWTO on both routers.
That's it.
Links:
[1] http://openwrt.org/OpenWrtFaq#head-874e … c6b52993e2
[2] http://www.bingner.com/openwrt/wpa.html
[3] http://downloads.openwrt.org/experimental/
[4] http://www.bingner.com/openwrt/
(Last edited by olli_04 on 14 Jun 2005, 07:26)