wpa_supplicant.conf.sgml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  2. <refentry>
  3. <refmeta>
  4. <refentrytitle>wpa_supplicant.conf</refentrytitle>
  5. <manvolnum>5</manvolnum>
  6. </refmeta>
  7. <refnamediv>
  8. <refname>wpa_supplicant.conf</refname>
  9. <refpurpose>configuration file for wpa_supplicant</refpurpose>
  10. </refnamediv>
  11. <refsect1>
  12. <title>Overview</title>
  13. <para><command>wpa_supplicant</command> is configured using a text
  14. file that lists all accepted networks and security policies,
  15. including pre-shared keys. See the example configuration file,
  16. probably in <command>/usr/share/doc/wpa_supplicant/</command>, for
  17. detailed information about the configuration format and supported
  18. fields.</para>
  19. <para>All file paths in this configuration file should use full
  20. (absolute, not relative to working directory) path in order to allow
  21. working directory to be changed. This can happen if wpa_supplicant is
  22. run in the background.</para>
  23. <para>Changes to configuration file can be reloaded be sending
  24. SIGHUP signal to <command>wpa_supplicant</command> ('killall -HUP
  25. wpa_supplicant'). Similarly, reloading can be triggered with
  26. the <emphasis>wpa_cli reconfigure</emphasis> command.</para>
  27. <para>Configuration file can include one or more network blocks,
  28. e.g., one for each used SSID. wpa_supplicant will automatically
  29. select the best network based on the order of network blocks in
  30. the configuration file, network security level (WPA/WPA2 is
  31. preferred), and signal strength.</para>
  32. </refsect1>
  33. <refsect1>
  34. <title>Quick Examples</title>
  35. <orderedlist>
  36. <listitem>
  37. <para>WPA-Personal (PSK) as home network and WPA-Enterprise with
  38. EAP-TLS as work network.</para>
  39. <blockquote><programlisting>
  40. # allow frontend (e.g., wpa_cli) to be used by all users in 'wheel' group
  41. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  42. #
  43. # home network; allow all valid ciphers
  44. network={
  45. ssid="home"
  46. scan_ssid=1
  47. key_mgmt=WPA-PSK
  48. psk="very secret passphrase"
  49. }
  50. #
  51. # work network; use EAP-TLS with WPA; allow only CCMP and TKIP ciphers
  52. network={
  53. ssid="work"
  54. scan_ssid=1
  55. key_mgmt=WPA-EAP
  56. pairwise=CCMP TKIP
  57. group=CCMP TKIP
  58. eap=TLS
  59. identity="user@example.com"
  60. ca_cert="/etc/cert/ca.pem"
  61. client_cert="/etc/cert/user.pem"
  62. private_key="/etc/cert/user.prv"
  63. private_key_passwd="password"
  64. }
  65. </programlisting></blockquote>
  66. </listitem>
  67. <listitem>
  68. <para>WPA-RADIUS/EAP-PEAP/MSCHAPv2 with RADIUS servers that
  69. use old peaplabel (e.g., Funk Odyssey and SBR, Meetinghouse
  70. Aegis, Interlink RAD-Series)</para>
  71. <blockquote><programlisting>
  72. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  73. network={
  74. ssid="example"
  75. scan_ssid=1
  76. key_mgmt=WPA-EAP
  77. eap=PEAP
  78. identity="user@example.com"
  79. password="foobar"
  80. ca_cert="/etc/cert/ca.pem"
  81. phase1="peaplabel=0"
  82. phase2="auth=MSCHAPV2"
  83. }
  84. </programlisting></blockquote>
  85. </listitem>
  86. <listitem>
  87. <para>EAP-TTLS/EAP-MD5-Challenge configuration with anonymous
  88. identity for the unencrypted use. Real identity is sent only
  89. within an encrypted TLS tunnel.</para>
  90. <blockquote><programlisting>
  91. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  92. network={
  93. ssid="example"
  94. scan_ssid=1
  95. key_mgmt=WPA-EAP
  96. eap=TTLS
  97. identity="user@example.com"
  98. anonymous_identity="anonymous@example.com"
  99. password="foobar"
  100. ca_cert="/etc/cert/ca.pem"
  101. phase2="auth=MD5"
  102. }
  103. </programlisting></blockquote>
  104. </listitem>
  105. <listitem>
  106. <para>IEEE 802.1X (i.e., no WPA) with dynamic WEP keys
  107. (require both unicast and broadcast); use EAP-TLS for
  108. authentication</para>
  109. <blockquote><programlisting>
  110. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  111. network={
  112. ssid="1x-test"
  113. scan_ssid=1
  114. key_mgmt=IEEE8021X
  115. eap=TLS
  116. identity="user@example.com"
  117. ca_cert="/etc/cert/ca.pem"
  118. client_cert="/etc/cert/user.pem"
  119. private_key="/etc/cert/user.prv"
  120. private_key_passwd="password"
  121. eapol_flags=3
  122. }
  123. </programlisting></blockquote>
  124. </listitem>
  125. <listitem>
  126. <para>Catch all example that allows more or less all
  127. configuration modes. The configuration options are used based
  128. on what security policy is used in the selected SSID. This is
  129. mostly for testing and is not recommended for normal
  130. use.</para>
  131. <blockquote><programlisting>
  132. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  133. network={
  134. ssid="example"
  135. scan_ssid=1
  136. key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
  137. pairwise=CCMP TKIP
  138. group=CCMP TKIP WEP104 WEP40
  139. psk="very secret passphrase"
  140. eap=TTLS PEAP TLS
  141. identity="user@example.com"
  142. password="foobar"
  143. ca_cert="/etc/cert/ca.pem"
  144. client_cert="/etc/cert/user.pem"
  145. private_key="/etc/cert/user.prv"
  146. private_key_passwd="password"
  147. phase1="peaplabel=0"
  148. ca_cert2="/etc/cert/ca2.pem"
  149. client_cert2="/etc/cer/user.pem"
  150. private_key2="/etc/cer/user.prv"
  151. private_key2_passwd="password"
  152. }
  153. </programlisting></blockquote>
  154. </listitem>
  155. <listitem>
  156. <para>Authentication for wired Ethernet. This can be used with
  157. <emphasis>wired</emphasis> or <emphasis>roboswitch</emphasis> interface
  158. (-Dwired or -Droboswitch on command line).</para>
  159. <blockquote><programlisting>
  160. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
  161. ap_scan=0
  162. network={
  163. key_mgmt=IEEE8021X
  164. eap=MD5
  165. identity="user"
  166. password="password"
  167. eapol_flags=0
  168. }
  169. </programlisting></blockquote>
  170. </listitem>
  171. </orderedlist>
  172. </refsect1>
  173. <refsect1>
  174. <title>Certificates</title>
  175. <para>Some EAP authentication methods require use of
  176. certificates. EAP-TLS uses both server side and client
  177. certificates whereas EAP-PEAP and EAP-TTLS only require the server
  178. side certificate. When client certificate is used, a matching
  179. private key file has to also be included in configuration. If the
  180. private key uses a passphrase, this has to be configured in
  181. wpa_supplicant.conf ("private_key_passwd").</para>
  182. <para>wpa_supplicant supports X.509 certificates in PEM and DER
  183. formats. User certificate and private key can be included in the
  184. same file.</para>
  185. <para>If the user certificate and private key is received in
  186. PKCS#12/PFX format, they need to be converted to suitable PEM/DER
  187. format for wpa_supplicant. This can be done, e.g., with following
  188. commands:</para>
  189. <blockquote><programlisting>
  190. # convert client certificate and private key to PEM format
  191. openssl pkcs12 -in example.pfx -out user.pem -clcerts
  192. # convert CA certificate (if included in PFX file) to PEM format
  193. openssl pkcs12 -in example.pfx -out ca.pem -cacerts -nokeys
  194. </programlisting></blockquote>
  195. </refsect1>
  196. <refsect1>
  197. <title>See Also</title>
  198. <para>
  199. <citerefentry>
  200. <refentrytitle>wpa_supplicant</refentrytitle>
  201. <manvolnum>8</manvolnum>
  202. </citerefentry>
  203. <citerefentry>
  204. <refentrytitle>openssl</refentrytitle>
  205. <manvolnum>1</manvolnum>
  206. </citerefentry>
  207. </para>
  208. </refsect1>
  209. </refentry>