You are here: DesktopBSD Wiki Portal » doc » wpa_encryption

Translations of this page?:

Using WPA encryption with wireless adapters

If possible don't ever use WEP encryption. WEP encryption isn't secure enough and an attacker can break it within minutes!
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
network={
ssid="your_ssid"
proto=WPA
scan_ssid=0
key_mgmt=WPA-PSK
psk="your_rather_secret_key"
}

This is an example for WPA configuration. You have to create this file, wpa_supplicant.conf, in /etc and copy and paste the above example to it. Change ssid= to your ssid and enter for psk= your secret key. It is possible to enter the key as ASCII within quotation marks or as hex.

wpa_passphrase test your_secret_key

test is your ssid and your_secret_key is your key in ASCII. The output would be something like


network={
	ssid="test"
	#psk="your_secret_key"
	psk=49af27521180bfbe980e46778dfaa87135e85a6e218a201f4e7fa54a53c2b08b
}

If you're using the hex key, don't use any quotation marks around it.

Then you just have to add wpa to your /etc/rc.conf.

ifconfig_ath0="dhcp wpa"

Remember ifconfig_ath0 differs according to your WLan adapter (ral0, rum0 etc.).Restart the network with

/etc/rc.d/netif restart

You should have now a WPA encrypted DHCP connection via your WLan adapter.