I needed to connect to my college's Eduroam WIFI network, but doing this on *BSD boxes from the command line proved to be quite the task.
I am sure there will be other solutions to this problem which require different tools, but the tools I used are as follows:
I would suggest if you're not bothered by using GUI tools, to find a graphical WIFI manager to connect to Eduroam networks, since this will prove to be a million times easier than my command line method.
/etc/wpa_supplicant.conf
.
network={
ssid="eduroam"
identity="my_username@my_domain.com"
anonymous_identity="anonymous@my_domain.com"
password="myStrongPassword123"
scan_ssid=0
disabled=0
auth_alg=OPEN
key_mgmt=WPA-EAP
proto=WPA RSN
pairwise=CCMP TKIP
eap=TTLS
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
my_username
and my_domain.com
to your username
and your institutions domain.
OpenBSD handles wireless networks a little differently than other operating systems like Linux or FreeBSD, it uses ifconfig to connect, ifconfig works differently on OpenBSD than it does on other operating systems.
The first step is to find your wireless interface by using the
ifconfig
command, ifconfig will spit out a bunch of seemingly
random information, but you want to look for something like "wlan0" or
"iwn0", it's more than likely you will not have more than one wireless
card in your computer so it shouldn't be too tricky figuring out which
one is which, for all of my examples I am going to refer to my wireless
interface as iwn0. If in doubt, trial and error.
After identifying
your network interface, we need to create a file in /etc called
/etc/hostname.iwn0
of course change the iwn0 at the end of the file
name to your specific wireless interface. In this file we want to add
these lines
join somenetwork wpakey PASSWORD
join eduroam wpa wpaakms 802.1x
inet autoconf
"somenetwork" in this file is the networks that you want to connect
to normally, like your home network, we do not need to go through
another tool like wpa_supplicant for simple networks on OpenBSD.
Now we must create a file in /etc called
/etc/wpa_supplicant.conf
.
NOTE: this file might already exist so be careful with it.In this
file we must define the Eduroam network with some special parameters:
network={
ssid="eduroam"
identity="my_username@my_domain.com"
anonymous_identity="anonymous@my_domain.com"
password="myStrongPassword123"
scan_ssid=0
disabled=0
auth_alg=OPEN
key_mgmt=WPA-EAP
proto=WPA RSN
pairwise=CCMP TKIP
eap=TTLS
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
Since Eduroam networks are not like your typical home network,
Now we must start wpa_supplicant at boot time with some specific flags.
wpa_supplicant -i iwn0 -D openbsd -c /etc/wpa_supplicant.conf -B