📄 readme
字号:
- 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 receivedBuilding and installing-----------------------In order to be able to build wpa_supplicant, you will first need toselect which parts of it will be included. This is done by creating abuild time configuration file, .config, in the wpa_supplicant rootdirectory. Configuration options are text lines using followingformat: CONFIG_<option>=y. Lines starting with # are consideredcomments and are ignored. See defconfig file for example configurationand list of available option.The build time configuration can be used to select only the neededfeatures and limit the binary size and requirements for externallibraries. The main configuration parts are the selection of whichdriver interfaces (e.g., hostap, madwifi, ..) and which authenticationmethods (e.g., EAP-TLS, EAP-PEAP, ..) are included.Following build time configuration options are used to control IEEE802.1X/EAPOL and EAP state machines and all EAP methods. IncludingTLS, PEAP, or TTLS will require linking wpa_supplicant with openssllibrary for TLS implementation.CONFIG_IEEE8021X_EAPOL=yCONFIG_EAP_MD5=yCONFIG_EAP_MSCHAPV2=yCONFIG_EAP_TLS=yCONFIG_EAP_PEAP=yCONFIG_EAP_TTLS=yCONFIG_EAP_GTC=yCONFIG_EAP_OTP=yCONFIG_EAP_SIM=yCONFIG_EAP_AKA=yCONFIG_EAP_PSK=yCONFIG_EAP_PAX=yCONFIG_EAP_LEAP=yFollowing option can be used to include GSM SIM/USIM interface for GSM/UMTSauthentication algorithm (for EAP-SIM/EAP-AKA). This requires pcsc-lite(http://www.linuxnet.com/) for smart card access.CONFIG_PCSC=yFollowing option can be used to replace the native Linux packet socketinterface with libpcap/libdnet.CONFIG_DNET_PCAP=yFollowing options can be added to .config to select which driverinterfaces are included. Hermes driver interface needs to be downloadedfrom Agere (see above). CONFIG_WIRELESS_EXTENSION will be usedautomatically if any of the selected drivers need it.CONFIG_WIRELESS_EXTENSION=yCONFIG_DRIVER_HOSTAP=yCONFIG_DRIVER_HERMES=yCONFIG_DRIVER_MADWIFI=yCONFIG_DRIVER_ATMEL=yCONFIG_DRIVER_WEXT=yCONFIG_DRIVER_NDISWRAPPER=yCONFIG_DRIVER_BROADCOM=yCONFIG_DRIVER_IPW=yCONFIG_DRIVER_BSD=yCONFIG_DRIVER_NDIS=yFollowing example includes all features and driver interfaces that areincluded in the wpa_supplicant package:CONFIG_DRIVER_HOSTAP=yCONFIG_DRIVER_HERMES=yCONFIG_DRIVER_MADWIFI=yCONFIG_DRIVER_ATMEL=yCONFIG_DRIVER_WEXT=yCONFIG_DRIVER_NDISWRAPPER=yCONFIG_DRIVER_BROADCOM=yCONFIG_DRIVER_IPW=yCONFIG_DRIVER_BSD=yCONFIG_DRIVER_NDIS=yCONFIG_WIRELESS_EXTENSION=yCONFIG_IEEE8021X_EAPOL=yCONFIG_EAP_MD5=yCONFIG_EAP_MSCHAPV2=yCONFIG_EAP_TLS=yCONFIG_EAP_PEAP=yCONFIG_EAP_TTLS=yCONFIG_EAP_GTC=yCONFIG_EAP_OTP=yCONFIG_EAP_SIM=yCONFIG_EAP_AKA=yCONFIG_EAP_PSK=yCONFIG_EAP_PAX=yCONFIG_EAP_LEAP=yCONFIG_PCSC=yEAP-PEAP and EAP-TTLS will automatically include configured EAPmethods (MD5, OTP, GTC, MSCHAPV2) for inner authentication selection.After you have created a configuration file, you can buildwpa_supplicant and wpa_cli with 'make' command. You may then installthe binaries to a suitable system directory, e.g., /usr/local/bin.Example commands:# build wpa_supplicant and wpa_climake# install binaries (this may need root privileges)cp wpa_cli wpa_supplicant /usr/local/binYou will need to make a configuration file, e.g.,/etc/wpa_supplicant.conf, with network configuration for the networksyou are going to use. Configuration file section below includesexplanation fo the configuration file format and includes variousexamples. Once the configuration is ready, you can test whether theconfiguration work by first running wpa_supplicant with followingcommand to start it on foreground with debugging enabled:wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -dAssuming everything goes fine, you can start using following commandto start wpa_supplicant on background without debugging:wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -BPlease note that if you included more than one driver interface in thebuild time configuration (.config), you may need to specify whichinterface to use by including -D<driver name> option on the commandline. See following section for more details on command line optionsfor wpa_supplicant.Command line options--------------------usage: wpa_supplicant [-BddehLqqvw] -i<ifname> -c<config file> [-D<driver>] \ [-N -i<ifname> -c<conf> [-D<driver>] ...]options: -B = run daemon in the background -d = increase debugging verbosity (-dd even more) -K = include keys (passwords, etc.) in debug output -t = include timestamp in debug messages -h = show this help text -L = show license (GPL and BSD) -q = decrease debugging verbosity (-qq even less) -v = show version -w = wait for interface to be added, if needed -N = start describing new interfacedrivers: hostap = Host AP driver (Intersil Prism2/2.5/3) [default] (this can also be used with Linuxant DriverLoader) hermes = Agere Systems Inc. driver (Hermes-I/Hermes-II) madwifi = MADWIFI 802.11 support (Atheros, etc.) atmel = ATMEL AT76C5XXx (USB, PCMCIA) wext = Linux wireless extensions (generic) ndiswrapper = Linux ndiswrapper broadcom = Broadcom wl.o driver ipw = Intel ipw2100/2200 driver wired = wpa_supplicant wired Ethernet driver bsd = BSD 802.11 support (Atheros, etc.) ndis = Windows NDIS driverIn most common cases, wpa_supplicant is started withwpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iwlan0This makes the process fork into background and wait for the wlan0interface if it is not available at startup time.The easiest way to debug problems, and to get debug log for bugreports, is to start wpa_supplicant on foreground with debuggingenabled:wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -dwpa_supplicant can control multiple interfaces (radios) either byrunning one process for each interface separately or by running justone process and list of options at command line. Each interface isseparated with -N argument. As an example, following command wouldstart wpa_supplicant for two interfaces:wpa_supplicant \ -c wpa1.conf -i wlan0 -D hostap -N \ -c wpa2.conf -i ath0 -D madwifiConfiguration file------------------wpa_supplicant is configured using a text file that lists all acceptednetworks and security policies, including pre-shared keys. Seeexample configuration file, wpa_supplicant.conf, for detailedinformation about the configuration format and supported fields.Changes to configuration file can be reloaded be sending SIGHUP signalto wpa_supplicant ('killall -HUP wpa_supplicant'). Similarly,reloading can be triggered with 'wpa_cli reconfigure' command.Configuration file can include one or more network blocks, e.g., onefor each used SSID. wpa_supplicant will automatically select the bestbetwork based on the order of network blocks in the configurationfile, network security level (WPA/WPA2 is prefered), and signalstrength.Example configuration files for some common configurations: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' groupctrl_interface=/var/run/wpa_supplicantctrl_interface_group=wheel## home network; allow all valid ciphersnetwork={ 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 ciphersnetwork={ 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=/var/run/wpa_supplicantctrl_interface_group=wheelnetwork={ 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=/var/run/wpa_supplicantctrl_interface_group=wheelnetwork={ 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 authenticationctrl_interface=/var/run/wpa_supplicantctrl_interface_group=wheelnetwork={ 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -