WPA_SUPPLICANT(8)
๐ธ NAME ๐ธ
wpa_supplicant โ Wi-Fi Protected Access client and IEEE 802.1X supplicant ๐
(Yes bestie, this is the wpa_supplicant(8) manual page. Buckle up, it's a long one, but we're getting through it together.)
โจ SYNOPSIS โจ
wpa_supplicant [ -BddfhKLqqsTtuvW ] [ -iifname ] [ -cconfig file ] [ -Ddriver ] [ -PPID_file ] [ -foutput file ] [ -Iadditional config file ]
๐ฆ OVERVIEW ๐ฆ
okay so here's the whole situation. Wireless networks do not require physical access to the network equipment in the same way that wired networks do. Which sounds convenient until you realize it means literally anyone in range can passively monitor the network and scoop up all transmitted frames. And unauthorized use? Also way easier. Sometimes it happens without the user even knowing, because the wireless LAN adapter may have been configured to just automatically join any available network. Not the vibe. ๐
Link-layer encryption can give wireless networks a layer of security. The original wireless LAN standard, IEEE 802.11</>, shipped with a simple encryption mechanism, WEP</>. But that turned out to be flawed in many areas, and networks protected with WEP cannot be considered secure. IEEE 802.1X authentication plus frequently changed dynamic WEP keys can improve things, but even that inherits security issues from using WEP for encryption. Then Wi-Fi Protected Access</> and the IEEE 802.11i</> amendment to the wireless LAN standard showed up and introduced a much improved mechanism for securing wireless networks. IEEE 802.11i enabled networks using CCMP</> โ that's an encryption mechanism based on the strong cryptographic algorithm AES</> โ can finally be called secure and used for applications that require efficient protection against unauthorized access. slay. ๐
wpa_supplicant is an implementation of the WPA Supplicant component, i.e., the part that runs in the client stations. It implements WPA key negotiation with a WPA Authenticator and EAP authentication with Authentication Server. On top of that, it controls the roaming and IEEE 802.11 authentication/association of the wireless LAN driver. Multi-tasking icon behavior. ๐
wpa_supplicant is designed to be a "daemon" program โ it runs in the background and acts as the backend component controlling the wireless connection. It supports separate frontend programs, and an example text-based frontend, wpa_cli, is included with wpa_supplicant.
Before wpa_supplicant can do its work, the network interface must be available. That means the physical device must be present and enabled, and the driver for the device must be loaded. The daemon will exit immediately if the device is not already available. no cap.
After wpa_supplicant has configured the network device, higher level configuration of the device โ like DHCP โ may proceed. There are a variety of ways to integrate wpa_supplicant into a machine's networking scripts, a few of which are described in sections below.
Here's the step-by-step for associating with an AP using WPA, in order:
wpa_supplicantrequests the kernel driver to scan neighboring BSSes (Basic Service Set)wpa_supplicantselects a BSS based on its configurationwpa_supplicantrequests the kernel driver to associate with the chosen BSS- If WPA-EAP: integrated IEEE 802.1X Supplicant completes EAP authentication with the authentication server (proxied by the Authenticator in the AP)
- If WPA-EAP: master key is received from the IEEE 802.1X Supplicant
- If WPA-PSK:
wpa_supplicantuses PSK as the master session key wpa_supplicantcompletes WPA 4-Way Handshake and Group Key Handshake with the Authenticator (AP)wpa_supplicantconfigures encryption keys for unicast and broadcast- normal data packets can be transmitted and received ๐
๐ SUPPORTED FEATURES ๐
Supported WPA/IEEE 802.11i features, the whole roster:
- WPA-PSK ("WPA-Personal")
- WPA with EAP (e.g., with RADIUS authentication server) ("WPA-Enterprise")
The following authentication methods are supported with an integrated IEEE 802.1X Supplicant:
EAP-TLSEAP-PEAP/MSCHAPv2(both PEAPv0 and PEAPv1)EAP-PEAP/TLS(both PEAPv0 and PEAPv1)EAP-PEAP/GTC(both PEAPv0 and PEAPv1)EAP-PEAP/OTP(both PEAPv0 and PEAPv1)EAP-PEAP/MD5-Challenge(both PEAPv0 and PEAPv1)EAP-TTLS/EAP-MD5-ChallengeEAP-TTLS/EAP-GTCEAP-TTLS/EAP-OTPEAP-TTLS/EAP-MSCHAPv2EAP-TTLS/EAP-TLSEAP-TTLS/MSCHAPv2EAP-TTLS/MSCHAPEAP-TTLS/PAPEAP-TTLS/CHAPEAP-SIMEAP-AKAEAP-PSKEAP-PAXLEAP(note: requires special support from the driver for IEEE 802.11 authentication)- (following methods are supported, but since they do not generate keying material, they cannot be used with WPA or IEEE 802.1X WEP keying)
EAP-MD5-ChallengeEAP-MSCHAPv2EAP-GTCEAP-OTP
- key management for
CCMP,TKIP,WEP104,WEP40 - RSN/WPA2 (IEEE 802.11i)
- pre-authentication
- PMKSA caching
๐ AVAILABLE DRIVERS ๐
Here's the summary of available driver backends. Support for each of the driver backends is chosen at wpa_supplicant compile time. Wanna know which supported driver backends you can actually use with the -D option on your system? Check the help output of wpa_supplicant:
wpa_supplicant -h
Now the lineup:
nl80211โ Uses the modern Linuxnl80211/cfg80211netlink-based interface (most new drivers).wextโ Uses the legacy Linux wireless extensions ioctl-based interface (older hardware/drivers).wiredโwpa_supplicantwired Ethernet drivermacsec_linuxโ MACsec Ethernet driver for Linuxroboswitchโwpa_supplicantBroadcom switch drivernoneโ no driver (RADIUS server/WPS ER only)bsdโ BSD 802.11 support (Atheros, etc.).ndisโ Windows NDIS driver.
๐ COMMAND LINE OPTIONS ๐
Most command line options have global scope. Some are given per interface, and are only valid if at least one -i option is specified โ otherwise they're ignored. Option groups for different interfaces must be separated by the -N option. iykyk. โจ
-b br_ifnameโ Optional bridge interface name. (Per interface)-Bโ Run daemon in the background.-c filenameโ Path to configuration file. (Per interface)-C ctrl_interfaceโ Path toctrl_interfacesocket (Per interface. Only used if-cis not).-i ifnameโ Interface to listen on. Multiple instances of this option can be present, one per interface, separated by-Noption (see below).-I filenameโ Path to additional configuration file.-dโ Increase debugging verbosity (-ddeven more).-D driverโ Driver to use (can be multiple drivers:nl80211,wext). (Per interface, see the available options below.)-e entropy fileโ File forwpa_supplicantto use to maintain its internal entropy store in over restarts.-f output fileโ Log output to specified file instead of stdout. (This is only available ifwpa_supplicantwas built with theCONFIG_DEBUG_FILEoption.)-g global ctrl_interfaceโ Path to globalctrl_interfacesocket. If specified, interface definitions may be omitted.-Kโ Include keys (passwords, etc.) in debug output. ๐-hโ Help. Show a usage message.-Lโ Show license (BSD).-o override driverโ Override the driver parameter for new interfaces.-O override ctrl_interfaceโ Override thectrl_interfaceparameter for new interfaces.-pโ Driver parameters. (Per interface)-P PID_fileโ Path to PID file.-qโ Decrease debugging verbosity (-qqeven less).-sโ Log output to syslog instead of stdout. (This is only available ifwpa_supplicantwas built with theCONFIG_DEBUG_SYSLOGoption.)-Tโ Log output to Linux tracing in addition to any other destinations. (This is only available ifwpa_supplicantwas built with theCONFIG_DEBUG_LINUX_TRACINGoption.)-tโ Include timestamp in debug messages.-uโ Enable DBus control interface. If enabled, interface definitions may be omitted. (This is only available ifwpa_supplicantwas built with theCONFIG_CTRL_IFACE_DBUS_NEWoption.)-vโ Show version.-Wโ Wait for a control interface monitor before starting.-Nโ Start describing new interface.
๐ EXAMPLES ๐
In most common cases, wpa_supplicant is started with:
wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
This makes the process fork into the background. set it and forget it, basically.
The easiest way to debug problems, and to get a debug log for bug reports, is to start wpa_supplicant in the foreground with debugging enabled:
wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
If the specific driver wrapper is not known beforehand, it is possible to specify multiple comma separated driver wrappers on the command line. wpa_supplicant will use the first driver wrapper that is able to initialize the interface.
wpa_supplicant -Dnl80211,wext -c/etc/wpa_supplicant.conf -iwlan0
wpa_supplicant can control multiple interfaces (radios) either by running one process for each interface separately, or by running just one process with a list of options at the command line. Each interface is separated with the -N argument. As an example, the following command would start wpa_supplicant for two interfaces:
wpa_supplicant \
-c wpa1.conf -i wlan0 -D nl80211 -N \
-c wpa2.conf -i ath0 -D wext
๐ง OS REQUIREMENTS ๐ง
Current hardware/software requirements, bestie:
- Linux kernel 2.6.30 or higher with
nl80211/cfg80211support - Linux kernel 2.4.x or higher with Linux Wireless Extensions v15 or newer
- FreeBSD 6-CURRENT
- Microsoft Windows with WinPcap (at least WinXP, may work with other versions)
๐ still with me? good. there's more coming in part 2 โ don't go anywhere.
๐ SUPPORTED DRIVERS ๐
okay bestie, hereโs the tea on what drivers wpa_supplicant can actually hang with. no gatekeeping, fr fr:
- Linux nl80211/cfg80211 โ this is the preferred driver for Linux. periodt.
- Linux wireless extensions โ in theory, any driver that supports Linux wireless extensions can be used with IEEE 802.1X (i.e., not WPA) when using
ap_scan=0option in configuration file. lowkey specific, but okay. - Wired Ethernet drivers โ use
ap_scan=0. - BSD net80211 layer (e.g., Atheros driver) โ at the moment, this is for FreeBSD 6-CURRENT branch. vintage vibe.
- Windows NDIS โ the current Windows port requires WinPcap (
http://winpcap.polito.it/). SeeREADME-Windows.txtfor more information.
ngl, wpa_supplicant was designed to be portable for different drivers and operating systems. Hopefully, support for more wlan cards and OSes will be added in the future. See developer.txt for more information about the design of wpa_supplicant and porting to other drivers. One main goal is to add full WPA/WPA2 support to Linux wireless extensions to allow new drivers to be supported without having to implement new driver-specific interface code in wpa_supplicant. iconic ambition, honestly.
โจ ARCHITECTURE โจ
The wpa_supplicant system consists of the following components, and yes, they all have main character energy:
wpa_supplicant.confโ the configuration file describing all networks that the user wants the computer to connect to.wpa_supplicantโ the program that directly interacts with the network interface.wpa_cliโ the client program that provides a high-level interface to the functionality of the daemon.wpa_passphraseโ a utility needed to constructwpa_supplicant.conffiles that include encrypted passwords.
๐ QUICK START ๐
First, make a configuration file, e.g. /etc/wpa_supplicant.conf, that describes the networks you are interested in. See wpa_supplicant.conf(5) for details. do not skip this part, bestie, itโs giving essential.
Once the configuration is ready, you can test whether the configuration works by running wpa_supplicant with following command to start it on foreground with debugging enabled:
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d
Assuming everything goes fine, you can start using following command to start wpa_supplicant on background without debugging:
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
Please note that if you included more than one driver interface in the build time configuration (.config), you may need to specify which interface to use by including -D<driver name> option on the command line. iykyk.
๐ INTERFACE TO PCMCIA-CS/CARDMRG ๐
For example, the following small changes to pcmcia-cs scripts can be used to enable WPA support:
Add MODE="Managed" and WPA="y" to the network scheme in /etc/pcmcia/wireless.opts.
Add the following block to the end of start action handler in /etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
/usr/local/bin/wpa_supplicant -B -c/etc/wpa_supplicant.conf -i$DEVICE
fi
Add the following block to the end of stop action handler (may need to be separated from other actions) in /etc/pcmcia/wireless:
if [ "$WPA" = "y" -a -x /usr/local/bin/wpa_supplicant ]; then
killall wpa_supplicant
fi
This will make cardmgr start wpa_supplicant when the card is plugged in. slay, plug and play but make it WPA.
๐ SEE ALSO ๐
wpa_background(8) wpa_supplicant.conf(5) wpa_cli(8) wpa_passphrase(8)
๐ LEGAL ๐
wpa_supplicant is copyright (c) 2003-2022, Jouni Malinen <j@w1.fi> and contributors. All Rights Reserved.
This program is licensed under the BSD license (the one with advertisement clause removed).
okay bestie, thatโs the whole page ๐
this one came from the WPA_SUPPLICANT(8) source and was last updated on 1 February 2023. stay encrypted, stay iconic, and donโt forget to read the config file before you vibe check your Wi-Fi ๐ฆโจ
๐ฆ where this page comes from
- alpine 3.22: wpa_supplicant-doc 2.11-r2 ยท BSD-3-Clause
- alpine 3.23: wpa_supplicant-doc 2.11-r3 ยท BSD-3-Clause
- alpine 3.24: wpa_supplicant-doc 2.11-r4 ยท BSD-3-Clause
- arch rolling: wpa_supplicant 2:2.12-1 ยท BSD-3-Clause
- nixos 26.05: wpa_supplicant 2.12
- nixpkgs unstable: wpa_supplicant 2.12
- opensuse-leap 16.0: wpa_supplicant 2.11-160000.5.1 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: wpa_supplicant 2.11-160000.5.1 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: wpa_supplicant 2.11-160000.5.1 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: wpa_supplicant 2.11-160000.5.1 ยท BSD-3-Clause AND GPL-2.0-or-later
- ubuntu questing: wpasupplicant 2:2.11-0ubuntu4
- ubuntu resolute: wpasupplicant 2:2.11-0ubuntu5 ยท BSD-3-Clause
- ubuntu stonking: wpasupplicant 2:2.11-2ubuntu2 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms