Getting WPA working with FreeBSD

I recently purchased a Dell C400 to play with various x86 Operating Systems. After mucking around with numerous Operating Systemts (Windows XP, OpenBSD, Ubuntu, OpenSolaris, Solaris 10 GA), I decided to convert my laptop to FreeBSD 6.0. Since I like to wander around my apartment with my laptop, I needed to get 802.11 wireless networking with WPA security working. After reading through the FreeBSD ifconfig and wpa_supplicant documentation, I learned that I needed to create a wpa_supplicant configuration file. After testing out a few configurations, I finally settled on the following configuration:

$ cat /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
    ssid="SSID_OF_BASE_STATION"
    bssid=01:02:03:04:05:06
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=TKIP
    group=TKIP
    scan_ssid=1
    psk="THIS IS THE WPA PASSWORD YOU USE TO ACCESS YOUR NETWORK"
}

Once the configuration file was in place, I manually started wpa_supplicant with the “-B” (daemonize), “-c config file,” and “-i wireless interface” options:

$ wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf

Once the daemon was working, I added a line to /etc/rc.conf to start wpa_supplicant when the system booted:

$ grep wpa_supplicant /etc/rc.conf

wpa_supplicant_enable=”YES”

Everything is working now, and I am typing this from my wireless enabled FreeBSD laptop. Nice!

3 thoughts on “Getting WPA working with FreeBSD”

  1. Hi, I’m using again my FreeBSD and i was trying to configure my wpa-wireless network. Configuring wpa_supplicant.conf, i get connected, but the network is too slow, am i forgetting something?

    Thanks,
    Christian

  2. Exellent example. I almost have it working… may I ask what is your ifconfig line in your rc.conf file?
    My wireless card is on ral0

    Thanks if you can help.

Leave a Reply

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