Header Ads Widget

[MAN] wpa_supplicant

Content-type: text/html; charset=UTF-8 Man page of WPA_SUPPLICANT.CONF

WPA_SUPPLICANT.CONF

Section: (5)
Updated: 01 March 2021
Index Return to Main Contents

 

NAME

wpa_supplicant.conf - configuration file for wpa_supplicant  

OVERVIEW

wpa_supplicant is configured using a text file that lists all accepted networks and security policies, including pre-shared keys. See the example configuration file, probably in /usr/share/doc/wpa_supplicant/, for detailed information about the configuration format and supported fields.

All file paths in this configuration file should use full (absolute, not relative to working directory) path in order to allow working directory to be changed. This can happen if wpa_supplicant is run in the background.

Changes to configuration file can be reloaded be sending SIGHUP signal to wpa_supplicant ('killall -HUP wpa_supplicant'). Similarly, reloading can be triggered with the wpa_cli reconfigure command.

Configuration file can include one or more network blocks, e.g., one for each used SSID. wpa_supplicant will automatically select the best network based on the order of network blocks in the configuration file, network security level (WPA/WPA2 is preferred), and signal strength.  

QUICK EXAMPLES

1.
WPA-Personal (PSK) as home network and WPA-Enterprise with EAP-TLS as work network.

# allow frontend (e.g., wpa_cli) to be used by all users in 'wheel' group
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
#
# home network; allow all valid ciphers
network={
        ssid="home"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="very secret passphrase"
}
#
# work network; use EAP-TLS with WPA; allow only CCMP and TKIP ciphers
network={
        ssid="work"
        scan_ssid=1
        key_mgmt=WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        eap=TLS
        identity="user@example.com"
        ca_cert="/etc/cert/ca.pem"
        client_cert="/etc/cert/user.pem"
        private_key="/etc/cert/user.prv"
        private_key_passwd="password"
}
2.
WPA-RADIUS/EAP-PEAP/MSCHAPv2 with RADIUS servers that use old peaplabel (e.g., Funk Odyssey and SBR, Meetinghouse Aegis, Interlink RAD-Series)

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
        ssid="example"
        scan_ssid=1
        key_mgmt=WPA-EAP
        eap=PEAP
        identity="user@example.com"
        password="foobar"
        ca_cert="/etc/cert/ca.pem"
        phase1="peaplabel=0"
        phase2="auth=MSCHAPV2"
}
3.
EAP-TTLS/EAP-MD5-Challenge configuration with anonymous identity for the unencrypted use. Real identity is sent only within an encrypted TLS tunnel.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
        ssid="example"
        scan_ssid=1
        key_mgmt=WPA-EAP
        eap=TTLS
        identity="user@example.com"
        anonymous_identity="anonymous@example.com"
        password="foobar"
        ca_cert="/etc/cert/ca.pem"
        phase2="auth=MD5"
}
4.
IEEE 802.1X (i.e., no WPA) with dynamic WEP keys (require both unicast and broadcast); use EAP-TLS for authentication

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
        ssid="1x-test"
        scan_ssid=1
        key_mgmt=IEEE8021X
        eap=TLS
        identity="user@example.com"
        ca_cert="/etc/cert/ca.pem"
        client_cert="/etc/cert/user.pem"
        private_key="/etc/cert/user.prv"
        private_key_passwd="password"
        eapol_flags=3
}
5.
Catch all example that allows more or less all configuration modes. The configuration options are used based on what security policy is used in the selected SSID. This is mostly for testing and is not recommended for normal use.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
        ssid="example"
        scan_ssid=1
        key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
        pairwise=CCMP TKIP
        group=CCMP TKIP WEP104 WEP40
        psk="very secret passphrase"
        eap=TTLS PEAP TLS
        identity="user@example.com"
        password="foobar"
        ca_cert="/etc/cert/ca.pem"
        client_cert="/etc/cert/user.pem"
        private_key="/etc/cert/user.prv"
        private_key_passwd="password"
        phase1="peaplabel=0"
        ca_cert2="/etc/cert/ca2.pem"
        client_cert2="/etc/cer/user.pem"
        private_key2="/etc/cer/user.prv"
        private_key2_passwd="password"
}
6.
Authentication for wired Ethernet. This can be used with wired or roboswitch interface (-Dwired or -Droboswitch on command line).

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
ap_scan=0
network={
        key_mgmt=IEEE8021X
        eap=MD5
        identity="user"
        password="password"
        eapol_flags=0
}
 

CERTIFICATES

Some EAP authentication methods require use of certificates. EAP-TLS uses both server side and client certificates whereas EAP-PEAP and EAP-TTLS only require the server side certificate. When client certificate is used, a matching private key file has to also be included in configuration. If the private key uses a passphrase, this has to be configured in wpa_supplicant.conf ("private_key_passwd").

wpa_supplicant supports X.509 certificates in PEM and DER formats. User certificate and private key can be included in the same file.

If the user certificate and private key is received in PKCS#12/PFX format, they need to be converted to suitable PEM/DER format for wpa_supplicant. This can be done, e.g., with following commands:

# convert client certificate and private key to PEM format
openssl pkcs12 -in example.pfx -out user.pem -clcerts
# convert CA certificate (if included in PFX file) to PEM format
openssl pkcs12 -in example.pfx -out ca.pem -cacerts -nokeys
 

SEE ALSO

wpa_supplicant(8) openssl(1)


 

Index

NAME
OVERVIEW
QUICK EXAMPLES
CERTIFICATES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:45:54 GMT, September 16, 2022 Content-type: text/html; charset=UTF-8 Man page of WPA_SUPPLICANT

WPA_SUPPLICANT

Section: (8)
Updated: 01 March 2021
Index Return to Main Contents

 

NAME

wpa_supplicant - Wi-Fi Protected Access client and IEEE 802.1X supplicant  

SYNOPSIS

wpa_supplicant [ -BddfhKLqqsTtuvW ] [ -iifname ] [ -cconfig file ] [ -Ddriver ] [ -PPID_file ] [ -foutput file ]

 

OVERVIEW

Wireless networks do not require physical access to the network equipment in the same way as wired networks. This makes it easier for unauthorized users to passively monitor a network and capture all transmitted frames. In addition, unauthorized use of the network is much easier. In many cases, this can happen even without user's explicit knowledge since the wireless LAN adapter may have been configured to automatically join any available network.

Link-layer encryption can be used to provide a layer of security for wireless networks. The original wireless LAN standard, IEEE 802.11, included a simple encryption mechanism, WEP. However, that proved to be flawed in many areas and network protected with WEP cannot be consider secure. IEEE 802.1X authentication and frequently changed dynamic WEP keys can be used to improve the network security, but even that has inherited security issues due to the use of WEP for encryption. Wi-Fi Protected Access and IEEE 802.11i amendment to the wireless LAN standard introduce a much improvement mechanism for securing wireless networks. IEEE 802.11i enabled networks that are using CCMP (encryption mechanism based on strong cryptographic algorithm AES) can finally be called secure used for applications which require efficient protection against unauthorized access.

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. In addition, it controls the roaming and IEEE 802.11 authentication/association of the wireless LAN driver.

wpa_supplicant is designed to be a "daemon" program that runs in the background and acts as the backend component controlling the wireless connection. wpa_supplicant 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 that 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.

After wpa_supplicant has configured the network device, higher level configuration such as 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.

The following steps are used when associating with an AP using WPA:

wpa_supplicant requests the kernel driver to scan neighboring BSSes
wpa_supplicant selects a BSS based on its configuration
wpa_supplicant requests 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_supplicant uses PSK as the master session key
wpa_supplicant completes WPA 4-Way Handshake and Group Key Handshake with the Authenticator (AP)
wpa_supplicant configures encryption keys for unicast and broadcast
normal data packets can be transmitted and received
 

SUPPORTED FEATURES

Supported WPA/IEEE 802.11i features:

WPA-PSK ("WPA-Personal")
WPA with EAP (e.g., with RADIUS authentication server) ("WPA-Enterprise") Following authentication methods are supported with an integrate IEEE 802.1X Supplicant:
EAP-TLS
EAP-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-Challenge
EAP-TTLS/EAP-GTC
EAP-TTLS/EAP-OTP
EAP-TTLS/EAP-MSCHAPv2
EAP-TTLS/EAP-TLS
EAP-TTLS/MSCHAPv2
EAP-TTLS/MSCHAP
EAP-TTLS/PAP
EAP-TTLS/CHAP
EAP-SIM
EAP-AKA
EAP-PSK
EAP-PAX
LEAP (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-Challenge
EAP-MSCHAPv2
EAP-GTC
EAP-OTP
key management for CCMP, TKIP, WEP104, WEP40
RSN/WPA2 (IEEE 802.11i)
pre-authentication
PMKSA caching
 

AVAILABLE DRIVERS

A summary of available driver backends is below. Support for each of the driver backends is chosen at wpa_supplicant compile time. For a list of supported driver backends that may be used with the -D option on your system, refer to the help output of wpa_supplicant (wpa_supplicant -h).

wext
Linux wireless extensions (generic).
wired
wpa_supplicant wired Ethernet driver
roboswitch
wpa_supplicant Broadcom switch driver
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 -N option.

-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 to ctrl_interface socket (Per interface. Only used if -c is not).
-i ifname
Interface to listen on. Multiple instances of this option can be present, one per interface, separated by -N option (see below).
-d
Increase debugging verbosity (-dd even more).
-D driver
Driver to use (can be multiple drivers: nl80211,wext). (Per interface, see the available options below.)
-e entropy file
File for wpa_supplicant to 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 if wpa_supplicant was built with the CONFIG_DEBUG_FILE option.)
-g global ctrl_interface
Path to global ctrl_interface socket. 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 the ctrl_interface parameter for new interfaces.
-p
Driver parameters. (Per interface)
-P PID_file
Path to PID file.
-q
Decrease debugging verbosity (-qq even less).
-s
Log output to syslog instead of stdout. (This is only available if wpa_supplicant was built with the CONFIG_DEBUG_SYSLOG option.)
-T
Log output to Linux tracing in addition to any other destinations. (This is only available if wpa_supplicant was built with the CONFIG_DEBUG_LINUX_TRACING option.)
-t
Include timestamp in debug messages.
-u
Enable DBus control interface. If enabled, interface definitions may be omitted. (This is only available if wpa_supplicant was built with the CONFIG_DBUS option.)
-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 background.

The easiest way to debug problems, and to get debug log for bug reports, is to start wpa_supplicant on 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 and list of options at command line. Each interface is separated with -N argument. As an example, 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:

Linux kernel 2.4.x or 2.6.x with Linux Wireless Extensions v15 or newer
FreeBSD 6-CURRENT
Microsoft Windows with WinPcap (at least WinXP, may work with other versions)
 

SUPPORTED DRIVERS

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=0 option in configuration file.
Wired Ethernet drivers
Use ap_scan=0.
BSD net80211 layer (e.g., Atheros driver)
At the moment, this is for FreeBSD 6-CURRENT branch.
Windows NDIS
The current Windows port requires WinPcap (http://winpcap.polito.it/). See README-Windows.txt for more information.

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.  

ARCHITECTURE

The wpa_supplicant system consists of the following components:

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 construct wpa_supplicant.conf files 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.

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.  

INTERFACE TO PCMCIA-CS/CARDMRG

For example, 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.  

SEE ALSO

wpa_background(8) wpa_supplicant.conf(5) wpa_cli(8) wpa_passphrase(8)  

LEGAL

wpa_supplicant is copyright (c) 2003-2016, Jouni Malinen <j@w1.fi> and contributors. All Rights Reserved.

This program is licensed under the BSD license (the one with advertisement clause removed).


 

Index

NAME
SYNOPSIS
OVERVIEW
SUPPORTED FEATURES
AVAILABLE DRIVERS
COMMAND LINE OPTIONS
EXAMPLES
OS REQUIREMENTS
SUPPORTED DRIVERS
ARCHITECTURE
QUICK START
INTERFACE TO PCMCIA-CS/CARDMRG
SEE ALSO
LEGAL

This document was created by man2html, using the manual pages.
Time: 04:46:01 GMT, September 16, 2022

댓글 쓰기

0 댓글