Posted by: jasonk2600 | January 9, 2010

Quickie HowTo: Wireless Access in FreeBSD 8

Synopsis

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.

Configuration

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.

wlan_wep_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"

 

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

Wireless NIC with a static IP address:

wlans_ath0="wlan0"
ifconfig_wlan0="WPA inet 10.0.1.2 netmask 255.255.255.0"

 

Wireless NIC using DHCP:

wlans_ath0="wlan0"
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.

network={
  ssid="YourAPssid"
  psk="YourAPpassword"
}

 

Testing

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 10.0.1.2 netmask 0xffffff00 broadcast 10.0.1.255
  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

 

References

 

  [EoF]
Advertisements

Responses

  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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Categories

%d bloggers like this: