FreeBSD.software
Home/Guides/How to Configure WiFi on FreeBSD: Complete Wireless Guide
tutorial·2026-04-09·11 min read

How to Configure WiFi on FreeBSD: Complete Wireless Guide

Set up WiFi on FreeBSD: supported chipsets, wpa_supplicant configuration, WPA2/WPA3, hidden networks, automatic connection, hotspot mode, and troubleshooting wireless issues.

How to Configure WiFi on FreeBSD: Complete Wireless Guide

WiFi on FreeBSD works, but it requires more manual configuration than on Linux. There is no NetworkManager. There is no GUI WiFi picker in the taskbar (unless you install one). You configure wireless networking through wpa_supplicant, rc.conf, and kernel modules. Once configured, it is stable and predictable -- the FreeBSD way.

This guide covers everything: identifying your wireless chipset, loading the correct driver, configuring WPA2 and WPA3 networks, handling multiple networks, setting up a wireless hotspot, and troubleshooting the common issues.

Supported Wireless Chipsets

FreeBSD wireless support is narrower than Linux. Before buying hardware for a FreeBSD system, check compatibility.

Well-Supported Chipsets

| Chipset | Driver | Band | Status |

|---------|--------|------|--------|

| Intel WiFi 6 AX200/AX210 | iwlwifi(4) | 2.4/5/6 GHz | Good (via LinuxKPI) |

| Intel Wireless AC 7260/8260/9260 | iwm(4) or iwlwifi(4) | 2.4/5 GHz | Good |

| Intel Wireless N 2200/4965/5100/6000 | iwn(4) | 2.4/5 GHz | Excellent |

| Atheros AR9280/AR9380/AR9462 | ath(4) | 2.4/5 GHz | Excellent |

| Atheros AR9285 | ath(4) | 2.4 GHz | Excellent |

| Ralink RT2800/RT3070/RT5370 | run(4) | 2.4/5 GHz | Good |

| Realtek RTL8188CUS/RTL8192CU | rtwn(4) | 2.4 GHz | Adequate |

| Realtek RTL8188EU | rtwn(4) | 2.4 GHz | Adequate |

Chipsets to Avoid on FreeBSD

  • Broadcom (most models): Very limited driver support. The bwn(4) driver covers some older models, but modern Broadcom WiFi (BCM43xx found in many laptops) is not well supported.
  • MediaTek MT7921/MT7922: No FreeBSD driver as of early 2026.
  • Qualcomm WCN685x: No FreeBSD driver.
  • Intel WiFi 7 BE200: Too new, not yet supported.

Identifying Your Chipset

sh
# List PCI devices (for internal cards) pciconf -lv | grep -B3 -i wireless pciconf -lv | grep -B3 -i network # List USB devices (for USB adapters) usbconfig list usbconfig dump_device_desc 0 # Replace 0 with the device number

Loading the Wireless Driver

Intel WiFi (Modern: AX200/AX210)

The iwlwifi driver uses the LinuxKPI compatibility layer:

sh
# Load the driver kldload if_iwlwifi # Make it load at boot sysrc kld_list+="if_iwlwifi" # The wireless interface will appear as wlan0 after creation # Check that the hardware was detected dmesg | grep iwlwifi

Intel WiFi (Older: AC 7260/8260/9260)

sh
# The iwm driver kldload if_iwm # Make it load at boot sysrc kld_list+="if_iwm" dmesg | grep iwm

Intel WiFi (Legacy: N series)

sh
kldload if_iwn sysrc kld_list+="if_iwn" dmesg | grep iwn

Atheros

sh
# Most Atheros chips use the ath driver kldload if_ath sysrc kld_list+="if_ath" dmesg | grep ath

Ralink/MediaTek USB

sh
kldload if_run sysrc kld_list+="if_run"

Realtek USB

sh
kldload if_rtwn_usb sysrc kld_list+="if_rtwn_usb"

Creating the Wireless Interface

FreeBSD uses a wlan(4) virtual interface on top of the physical driver:

sh
# Create the wlan0 interface from the physical device # Replace iwn0, iwm0, or ath0 with your actual device name ifconfig wlan0 create wlandev iwn0 # For Intel AX200/210 (iwlwifi): ifconfig wlan0 create wlandev iwlwifi0 # Make it persistent across reboots sysrc wlans_iwn0="wlan0" # Or for iwlwifi: sysrc wlans_iwlwifi0="wlan0"

Verify:

sh
ifconfig wlan0 # Should show the interface (may be "no carrier" until connected)

Scanning for Networks

sh
# Scan for available networks ifconfig wlan0 up scan # More detailed scan output ifconfig wlan0 list scan

This shows SSIDs, signal strength, channel, and security type. Look at the "CAPS" column for security information:

  • E = Encrypted (WPA/WPA2)
  • RSN = WPA2 (Robust Security Network)
  • WPA = WPA (older)

WPA2 Configuration

Basic WPA2-PSK Setup

Create /etc/wpa_supplicant.conf:

sh
cat > /etc/wpa_supplicant.conf << 'CONF' ctrl_interface=/var/run/wpa_supplicant eapol_version=2 ap_scan=1 fast_reauth=1 network={ ssid="YourNetworkName" psk="YourPassword" key_mgmt=WPA-PSK proto=RSN pairwise=CCMP group=CCMP } CONF # Secure the file (contains your password) chmod 600 /etc/wpa_supplicant.conf

Using a Hashed Password

Storing the plaintext password is insecure. Generate a hashed PSK:

sh
wpa_passphrase "YourNetworkName" "YourPassword"

This outputs:

shell
network={ ssid="YourNetworkName" #psk="YourPassword" psk=a1b2c3d4e5f6... (hex hash) }

Use the hex hash in your configuration and remove the plaintext comment line.

WPA2-Enterprise (802.1X)

For corporate networks using RADIUS authentication:

sh
network={ ssid="CorporateWiFi" key_mgmt=WPA-EAP eap=PEAP identity="username" password="password" phase2="auth=MSCHAPV2" ca_cert="/usr/local/etc/ssl/ca-cert.pem" }

WPA3 Configuration

WPA3 is supported on FreeBSD with compatible hardware and firmware:

sh
network={ ssid="WPA3Network" psk="YourPassword" key_mgmt=SAE ieee80211w=2 }

For WPA3-Transition mode (supports both WPA2 and WPA3 clients):

sh
network={ ssid="TransitionNetwork" psk="YourPassword" key_mgmt=SAE WPA-PSK ieee80211w=1 }

Note: WPA3 support depends on your wireless driver and firmware. Not all FreeBSD-supported WiFi chips support WPA3.

Configuring rc.conf

Make the wireless connection persistent across reboots:

sh
# /etc/rc.conf wireless entries # Create wlan0 from the physical device wlans_iwn0="wlan0" # Configure wlan0 with DHCP ifconfig_wlan0="WPA SYNCDHCP" # Alternative: static IP # ifconfig_wlan0="WPA inet 192.168.1.100 netmask 255.255.255.0" # defaultrouter="192.168.1.1"

The WPA keyword in ifconfig_wlan0 tells the system to start wpa_supplicant automatically.

Setting Country Code

Important for regulatory compliance and proper channel selection:

sh
# Set the regulatory domain (US example) sysrc create_args_wlan0="country US regdomain FCC"

This ensures the driver only uses channels and power levels allowed in your country.

Multiple Networks

Configure multiple networks with priorities:

sh
cat > /etc/wpa_supplicant.conf << 'CONF' ctrl_interface=/var/run/wpa_supplicant eapol_version=2 ap_scan=1 fast_reauth=1 # Home network (highest priority) network={ ssid="HomeWiFi" psk=a1b2c3d4e5f6... key_mgmt=WPA-PSK priority=10 } # Office network network={ ssid="OfficeWiFi" key_mgmt=WPA-EAP eap=PEAP identity="jdoe" password="office-pass" phase2="auth=MSCHAPV2" priority=5 } # Backup mobile hotspot network={ ssid="MyPhone" psk=f6e5d4c3b2a1... key_mgmt=WPA-PSK priority=1 } CONF chmod 600 /etc/wpa_supplicant.conf

wpa_supplicant will connect to the highest-priority available network.

Hidden Networks

For networks that do not broadcast their SSID:

sh
network={ ssid="HiddenNetwork" scan_ssid=1 psk="password" key_mgmt=WPA-PSK }

The scan_ssid=1 directive tells wpa_supplicant to send probe requests for this specific SSID.

Connecting Manually

For one-time connections or testing:

sh
# Start wpa_supplicant manually wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B # Request an IP address dhclient wlan0 # Check connection status ifconfig wlan0 wpa_cli status

wpa_cli Interactive Mode

sh
# Start the interactive CLI wpa_cli -i wlan0 # Scan for networks > scan > scan_results # Connect to a network > add_network > set_network 0 ssid "NetworkName" > set_network 0 psk "password" > enable_network 0 # Check status > status # Save configuration to file > save_config # Quit > quit

Wireless Hotspot (Access Point Mode)

Turn your FreeBSD machine into a WiFi access point:

Prerequisites

Not all drivers support AP mode. Check:

sh
ifconfig wlan0 list caps # Look for "HOSTAP" in the capabilities

Configuration

sh
# Create the AP interface ifconfig wlan0 create wlandev ath0 wlanmode hostap # Or in rc.conf: sysrc wlans_ath0="wlan0" sysrc create_args_wlan0="wlanmode hostap" sysrc ifconfig_wlan0="inet 192.168.10.1 netmask 255.255.255.0"

Configure hostapd:

sh
cat > /etc/hostapd.conf << 'CONF' interface=wlan0 driver=bsd ssid=FreeBSD-AP hw_mode=g channel=6 ieee80211n=1 # Security wpa=2 wpa_passphrase=YourAPPassword wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP CONF sysrc hostapd_enable="YES"

Set up DHCP for clients:

sh
pkg install isc-dhcp44-server cat > /usr/local/etc/dhcpd.conf << 'CONF' subnet 192.168.10.0 netmask 255.255.255.0 { range 192.168.10.100 192.168.10.200; option routers 192.168.10.1; option domain-name-servers 8.8.8.8, 8.8.4.4; } CONF sysrc dhcpd_enable="YES" sysrc dhcpd_ifaces="wlan0"

Enable NAT for internet sharing:

sh
# Enable IP forwarding sysrc gateway_enable="YES" sysctl net.inet.ip.forwarding=1 # Add NAT rule to pf.conf cat >> /etc/pf.conf << 'PF' nat on em0 from 192.168.10.0/24 to any -> (em0) PF # Replace em0 with your wired interface sysrc pf_enable="YES" service pf start

Start everything:

sh
service hostapd start service isc-dhcpd start

Power Management

For laptops, configure wireless power saving:

sh
# Enable power save mode ifconfig wlan0 powersave # Disable power save (better latency, higher power use) ifconfig wlan0 -powersave # Make persistent in rc.conf sysrc ifconfig_wlan0="WPA SYNCDHCP powersave"

Monitoring Wireless Connection

sh
# Current connection status wpa_cli -i wlan0 status # Signal strength and link quality ifconfig wlan0 | grep -E "ssid|signal|channel" # Real-time signal monitoring while true; do ifconfig wlan0 | grep "status\|ssid\|signal" sleep 2 done # Detailed station information ifconfig wlan0 list sta # Channel utilization ifconfig wlan0 list chan

Troubleshooting

No Wireless Interface

sh
# Check if the driver is loaded kldstat | grep -i "iwn\|iwm\|iwlwifi\|ath\|run\|rtwn" # If not loaded: kldload if_iwn # Replace with your driver # Check dmesg for errors dmesg | grep -i "wlan\|wireless\|wifi\|iwn\|iwm\|ath"

Interface Created But Cannot Scan

sh
# Make sure the interface is up ifconfig wlan0 up # Check for regulatory domain issues ifconfig wlan0 list regdomain # Set country code explicitly ifconfig wlan0 country US # Try scanning again ifconfig wlan0 scan

Connected But No Internet

sh
# Check if you got an IP address ifconfig wlan0 | grep inet # If no IP, request one manually dhclient wlan0 # Check DNS resolution host freebsd.org # If DNS fails, check resolv.conf cat /etc/resolv.conf # Try manual DNS echo "nameserver 8.8.8.8" > /etc/resolv.conf

Frequent Disconnections

sh
# Check signal strength (lower dBm = weaker signal) ifconfig wlan0 | grep signal # -50 dBm = excellent # -60 dBm = good # -70 dBm = fair # -80 dBm = poor -- disconnections expected # Disable power save (can cause disconnections) ifconfig wlan0 -powersave # Check for interference -- switch channels ifconfig wlan0 scan | sort -t: -k3 -n # Look for less congested channels # Check system logs for driver errors grep -i "wlan\|ieee80211" /var/log/messages | tail -20

Slow WiFi Speed

sh
# Check current link speed ifconfig wlan0 | grep media # Ensure 802.11n/ac is being used ifconfig wlan0 list caps | grep -i "11n\|11ac" # Check if you are on 5 GHz (faster) or 2.4 GHz ifconfig wlan0 | grep channel # Force 5 GHz preference in wpa_supplicant.conf: network={ ssid="DualBandNetwork" psk="password" freq_list=5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825 }

Firmware Missing

Some drivers require firmware files:

sh
# Check if firmware is available ls /boot/firmware/ | grep -i iwl # For Intel # Install firmware if missing pkg install wifi-firmware-iwlwifi-kmod # Example for iwlwifi # For Intel iwm: pkg install wifi-firmware-iwm-kmod

wpa_supplicant Debugging

sh
# Run wpa_supplicant in debug mode wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -d # Extra verbose wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -dd

If your built-in WiFi is not supported, these USB adapters work well on FreeBSD:

  • TP-Link Archer T2U Nano (Realtek RTL8811AU): Compact, 5 GHz support. Requires rtwn driver.
  • Ralink-based USB adapters (RT5370): Cheap, 2.4 GHz only, but rock-solid on FreeBSD with the run driver.
  • Intel AX200-based M.2 adapters: If you can install an M.2 card, Intel AX200 provides the best experience on FreeBSD via iwlwifi.

FAQ

Does WiFi work on FreeBSD?

Yes, with supported hardware. FreeBSD supports Intel, Atheros, Ralink, and some Realtek wireless chipsets. Check the supported chipsets table above before buying hardware. Intel and Atheros provide the best experience.

What is the best WiFi chipset for FreeBSD?

Intel WiFi 6 AX200 or AX210 via the iwlwifi driver. For USB adapters, Ralink RT5370-based adapters are the most reliable.

Does FreeBSD support WiFi 6E or WiFi 7?

WiFi 6 (802.11ax) is partially supported through the iwlwifi driver for Intel adapters. WiFi 6E (6 GHz band) support is limited. WiFi 7 is not yet supported. FreeBSD wireless support typically lags Linux by 1-2 years.

Can I use FreeBSD as a WiFi router?

Yes. If your wireless chipset supports AP (access point) mode, you can run hostapd to create an access point. Combine with pf for NAT and firewall rules. See the wireless hotspot section above.

Why is my WiFi slower on FreeBSD than Linux?

Several possible reasons: the FreeBSD driver may not support all the link speeds your hardware is capable of (especially 802.11ac/ax features), 802.11n aggregation may not be enabled, or you may be connected to a 2.4 GHz band instead of 5 GHz. Check your link speed with ifconfig wlan0.

How do I connect to eduroam?

eduroam uses WPA2-Enterprise with PEAP/MSCHAPv2. Configure wpa_supplicant:

sh
network={ ssid="eduroam" key_mgmt=WPA-EAP eap=PEAP identity="user@university.edu" password="your-password" phase2="auth=MSCHAPV2" anonymous_identity="anonymous@university.edu" }

How do I switch between WiFi and Ethernet automatically?

FreeBSD does not have NetworkManager, but you can use devd rules to detect cable plug/unplug events and switch interfaces:

sh
# In /etc/devd.conf or /etc/devd/network.conf notify 100 { match "system" "IFNET"; match "subsystem" "em0"; match "type" "LINK_UP"; action "service netif restart em0 && ifconfig wlan0 down"; }; notify 100 { match "system" "IFNET"; match "subsystem" "em0"; match "type" "LINK_DOWN"; action "ifconfig wlan0 up && service netif restart wlan0"; };

Restart devd after changes:

sh
service devd restart

Get more FreeBSD guides

Weekly tutorials, security advisories, and package updates. No spam.