Setting up WPA2 Wireless

Posted on 31 August 2010  •  Permalink  •  Category htpc

After first setting up Ubuntu Server on mbox, apart from ethernet I wanted to set up WiFi too, so whenever I move it somewhere in the house where there’s no wired connections it can still connect to the network and the internet. From earlier experience I know setting up WPA2 can surely be a bit of a PITA. It took me a whole-lot-o-time to figure this all out, so at least for myself to remember, here’s how I did it.

For the Zotac board’s Atheros chip to work in Linux, you will need compat-wireless. After installing that, reboot, and automatically the ath9k module will be loaded by the Ubuntu kernel. Next install wpa-supplicant. Then edit /etc/network/interfaces and add:

auto wlan0
iface wlan0
inet dhcp
wpa-ssid <your-network-ssid-goes-here>
wpa-key-mgmt WPA-PSK
wpa-psk <your-plain-text-key-goes-here>

For added security you can make this file readable for root only, since your WPA2 password is in there unencrypted. There’s also ways to put it in there in an encrypted version, but I don’t really care since I’m the only user of the little box.

That’s it. If I’d knew all this beforehand, it would’ve saved me a whole-lot-o-time for sure.