Posted by: jasonk2600 | January 9, 2010

Quickie HowTo: Wireless Access in FreeBSD 8


This quickie howto will describe how to configure a system running FreeBSD 8.x with a wireless NIC to connect to a WiFi Access Point (AP) using WPA-PSK security (the most common WiFi configuration).  Wireless NICs that utilize the Atheros chipset are by far the most common WiFi NICs and the follow instructions assume that the Wireless NIC has already been physically installed in the FreeBSD system.


All of the necessary drivers and utilities to use wireless access are already included as part of the basic FreeBSD installation.  The first step is to configure all the necessary drivers to load automatically at system boot.  Add the following lines to the /boot/loader.conf boot loader configuration file.



Next, modify /etc/rc.conf to configure FreeBSD to use the wireless NIC with WPA security enabled.

Wireless NIC with a static IP address:

ifconfig_wlan0="WPA inet netmask"


Wireless NIC using DHCP:

ifconfig_wlan0="WPA DHCP"


Finally, configure FreeBSD to connect to your wireless access point (identified by SSID) using the access point’s Pre-Shared Key (a.k.a. password).  Add these settings to /etc/wpa_supplicant.conf, the FreeBSD WPA configuration file.




Reboot the system for the new settings to take effect. The wireless NIC will now automatically connect to your wireless access point at system boot. To verify connectivity, login and ping another host. If there seems to be no network connectivity, check the configuration of the wireless NIC using the ifconfig utility. ifconfig should show that the wireless NIC is connected to the wireless access point using WPA.

# ifconfig -a
wlan0: flags=8843 metric 0 mtu 1500
  ether 00:11:aa:22:bb:11
  inet netmask 0xffffff00 broadcast
  media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
  status: associated
  ssid YourAPssid channel 1 (2412 Mhz 11g) bssid 00:18:dd:55:bb:22
  regdomain FCC indoor ecm authmode WPA privacy ON deftxkey UNDEF
  TKIP 2:128-bit TKIP 3:128-bit txpower 21 bmiss 7 scanvalid 450 bgscan
  bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
  wme burst roaming MANUAL






  1. Brilliant, now the only question is how do you edit the files? In freenas 7.2.x there was a option to do this via the GUI? Not anymore?!

  2. thank

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: