azarus' page

OpenBSD WiFi 802.1x WPA-EAP setup

Date: 2018-02-09

As I take my laptop which has OpenBSD installed to school sometimes, I'd like to connect to the provided WiFi access point. Now, since they employ WPA 802.1x encrption with a WPA-EAP authentication scheme, that needs some manual setting up. In my experience, this applies to most WiFi connections that need a username and password.

Note, I'll assume you have athn0 as a WiFi interface, adapt this to your driver if it's different.

Step 1: Prerequsites

Install wpa_supplicant:

# pkg_add wpa_supplicant

Step 2: Discover the AP

To see the list of available APs, do:

# ifconfig athn0 scan

Step 3: Connect to the AP

To connect, you do:

# ifconfig athn0 nwid [SSID] wpa wpaakms 802.1x up

Step 4: Configure wpa_supplicant

Append this to your `/etc/wpa_supplicant.conf`:

network={
	ssid="[SSID]"
	key_mgmt=WPA_EAP
	eap=PEAP
	identity="[yourusername]"
	password="[yourpassword]"
}

Step 5: Authenticate to the AP

Now, you can run this:

# wpa_supplicant -i athn0 -c /etc/wpa_supplicant.conf

Step 6: Get a DHCP lease

And for good measure, ask for a DHCP lease:

# dhclient athn0

Now you should be connected! Give yourself a pat on the back. 😊