1IWD.NETWORK(5) Linux Connectivity IWD.NETWORK(5)
2
3
4
6 iwd.network - Network configuration for wireless daemon
7
9 Network configuration files .open, .psk and .8021x
10
12 iwd stores information on known networks, and reads information on
13 pre-provisioned networks, from small text configuration files. Those
14 files live in the state directory specified by the environment variable
15 $STATE_DIRECTORY, which is normally provided by systemd. In the
16 absence of such an environment variable it defaults to $LIBDIR/iwd,
17 which normally is set to /var/lib/iwd. You can create, modify or
18 remove those files. iwd monitors the directory for changes and will
19 update its state accordingly. iwd will also modify these files in the
20 course of network connections or as a result of D-Bus API invocations.
21
23 The syntax is similar to that of GNOME keyfile syntax (which is based
24 on the format defined in the Desktop Entry Specification, see
25 http://freedesktop.org/Standards/desktop-entry-spec). The recognized
26 groups as well as keys and values in each group are documented here.
27 Defaults are written in bold.
28
29 For completeness we include the description of the file syntax here.
30 This is the syntax that the ell library's l_settings class implements.
31 The syntax is based on lines and lines are delimited by newline charac‐
32 ters.
33
34 Empty lines are ignored and whitespace at the beginning of a line is
35 ignored. Comment lines have # as their first non-whitespace character.
36
37 Key-value lines contain a setting key, an equal sign and the value of
38 the setting. Whitespace preceding the key, the equal sign or the
39 value, is ignored. The key must be a continuous string of alphanumeric
40 and underscore characters and minus signs only. The value starts at
41 the first non-whitespace character after the first equal sign on the
42 line and ends at the end of the line and must be correctly
43 UTF-8-encoded. A boolean value can be true or false but 0 or 1 are also
44 allowed. Integer values are written in base 10. String values,
45 including file paths and hexstrings, are written as is except for five
46 characters that may be backslash-escaped: space, \t, \r, \n and back‐
47 slash itself. The latter three must be escaped. A space character
48 must be escaped if it is the first character in the value string and is
49 written as \s.
50
51 Settings are interpreted depending on the group they are in. A group
52 starts with a group header line and contains all settings until the
53 next group's header line. A group header line contains a [ character
54 followed by the group name and a ] character. Whitespace is allowed
55 before the [ and after the ]. A group name consists of printable char‐
56 acters other than [ and ].
57
58 If a group name starts with the @ sign, that group's content is handled
59 by a parser extension instead and does not cause the previous
60 non-extension group to end. The initial @ sign must be followed by a
61 non-empty extension name, another @ sign and a group name as defined
62 above. The extension name consists of printable characters other than
63 @. No whitespace is allowed after the group header in this case. The
64 extension payload syntax and length are determined by the extension
65 name. Normal parsing rules defined in this section resume at the end
66 of the payload and any settings after the end of the payload are han‐
67 dled as part of the previous non-extension group.
68
69 Currently the only extension supported is named pem and allows embed‐
70 ding the contents of a single RFC7468 PEM-formatted payload or a
71 sequence of multiple PEM payloads. The payload should start with the
72 -----BEGIN string on a line following the group header line and end
73 with an -----END line as specified in the RFC. Newline characters
74 before, between and after PEM payloads are included in the extension
75 payload. No other extra characters are allowed.
76
78 File names are based on the network's SSID and security type: Open,
79 PSK-protected or 802.1x. The name consist of the encoding of the SSID
80 followed by .open, .psk or .8021x. The SSID appears verbatim in the
81 name if it contains only alphanumeric characters, spaces, underscores
82 or minus signs. Otherwise it is encoded as an equal sign followed by
83 the lower-case hex encoding of the name.
84
86 The settings below are split into several sections and grouped into
87 broad categories. Each category has a group associated with it which
88 is given at the beginning of each sub-section. Recognized keys and
89 valid values are listed following the group definition.
90
91 General Settings
92 The group [Settings] contains general settings.
93
94 ┌───────────────────────┬────────────────────────────┐
95 │AutoConnect │ Values: true, false │
96 │ │ │
97 │ │ Whether the network can be │
98 │ │ connected to automatically │
99 ├───────────────────────┼────────────────────────────┤
100 │Hidden │ Values: true, false │
101 │ │ │
102 │ │ Whether the network is │
103 │ │ hidden, i.e. its SSID must │
104 │ │ be included in an active │
105 │ │ scan request │
106 ├───────────────────────┼────────────────────────────┤
107 │AlwaysRandomizeAddress │ Values: true, false │
108 │ │ │
109 │ │ If enabled, the MAC │
110 │ │ address will be fully ran‐ │
111 │ │ domized on each connec‐ │
112 │ │ tion. This option is only │
113 │ │ used if [General].Address‐ │
114 │ │ Randomization is set to │
115 │ │ 'network'. See iwd.config. │
116 │ │ This setting should not be │
117 │ │ used with [Set‐ │
118 │ │ tings].AddressOverride, if │
119 │ │ both are set AddressOver‐ │
120 │ │ ride will be used. │
121 └───────────────────────┴────────────────────────────┘
122
123
124
125
126
127
128
129
130
131
132
133 │AddressOverride │ MAC address string │
134 │ │ │
135 │ │ Override the MAC address │
136 │ │ used for connecting to │
137 │ │ this network. This option │
138 │ │ is only used if [Gen‐ │
139 │ │ eral].AddressRandomization │
140 │ │ is set to 'network'. See │
141 │ │ iwd.config. This setting │
142 │ │ should not be used with │
143 │ │ [Settings].AlwaysRandom‐ │
144 │ │ izeAddress, if both are │
145 │ │ set AddressOverride will │
146 │ │ be used. │
147 └───────────────────────┴────────────────────────────┘
148
149 Network Authentication Settings
150 The group [Security] contains settings for Wi-Fi security and authenti‐
151 cation configuration.
152
153 ┌───────────────────────────┬────────────────────────────────────────────┐
154 │Passphrase │ 8..63 character string │
155 │ │ │
156 │ │ Passphrase to be used when │
157 │ │ connecting to WPA-Personal │
158 │ │ networks. Required when │
159 │ │ connecting to WPA3-Per‐ │
160 │ │ sonal (SAE) networks. │
161 │ │ Also required if the Pre‐ │
162 │ │ SharedKey is not provided. │
163 │ │ If not provided in set‐ │
164 │ │ tings, the agent will be │
165 │ │ asked for the passphrase │
166 │ │ at connection time. │
167 ├───────────────────────────┼────────────────────────────────────────────┤
168 │PreSharedKey │ 64 character hex string │
169 │ │ │
170 │ │ Processed passphrase for │
171 │ │ this network in the form │
172 │ │ of a hex-encoded 32 byte │
173 │ │ pre-shared key. Must be │
174 │ │ provided if Passphrase is │
175 │ │ omitted. │
176 ├───────────────────────────┼────────────────────────────────────────────┤
177 │EAP-Method │ one of the following meth‐ │
178 │ │ ods: │
179 │ │ │
180 │ │ AKA, AKA', MSCHAPV2, PEAP, │
181 │ │ PWD, SIM, TLS, TTLS. │
182 │ │ │
183 │ │ The following additional │
184 │ │ methods are allowed as │
185 │ │ TTLS/PEAP inner methods: │
186 │ │ │
187 │ │ GTC, MD5. │
188 └───────────────────────────┴────────────────────────────────────────────┘
189
190
191
192
193
194
195
196
197
198
199 │EAP-Identity │ string │
200 │ │ │
201 │ │ Identity string transmit‐ │
202 │ │ ted in plaintext. Depend‐ │
203 │ │ ing on the EAP method, │
204 │ │ this value can be optional │
205 │ │ or mandatory. GTC, MD5, │
206 │ │ MSCHAPV2, PWD require an │
207 │ │ identity, so if not pro‐ │
208 │ │ vided, the agent will be │
209 │ │ asked for it at connection │
210 │ │ time. TLS based methods │
211 │ │ (PEAP, TLS, TTLS) might │
212 │ │ still require an EAP-Iden‐ │
213 │ │ tity to be set, depending │
214 │ │ on the RADIUS server con‐ │
215 │ │ figuration. │
216 ├───────────────────────────┼────────────────────────────────────────────┤
217 │EAP-Password │ string │
218 │ │ │
219 │ │ Password to be provided │
220 │ │ for WPA-Enterprise authen‐ │
221 │ │ tication. If not pro‐ │
222 │ │ vided, the agent will be │
223 │ │ asked for the password at │
224 │ │ connection time. Required │
225 │ │ by: GTC, MD5, MSCHAPV2, │
226 │ │ PWD. │
227 ├───────────────────────────┼────────────────────────────────────────────┤
228 │EAP-Password-Hash │ hex string │
229 │ │ │
230 │ │ Some EAP methods can │
231 │ │ accept a pre-hashed ver‐ │
232 │ │ sion of the password. For │
233 │ │ MSCHAPV2, a MD4 hash of │
234 │ │ the password can be given │
235 │ │ here. │
236 ├───────────────────────────┼────────────────────────────────────────────┤
237 │EAP-TLS-CACert, │ absolute file path or │
238 │EAP-TTLS-CACert, │ embedded pem │
239 │EAP-PEAP-CACert │ │
240 │ │ Path to a PEM-formatted │
241 │ │ X.509 root certificate │
242 │ │ list to use for trust ver‐ │
243 │ │ ification of the authenti‐ │
244 │ │ cator. The authentica‐ │
245 │ │ tor's server's certificate │
246 │ │ chain must be verified by │
247 │ │ at least one CA in the │
248 │ │ list for the authentica‐ │
249 │ │ tion to succeed. If omit‐ │
250 │ │ ted, then authenticator's │
251 │ │ certificate chain will not │
252 │ │ be verified (not recom‐ │
253 │ │ mended.) │
254 ├───────────────────────────┼────────────────────────────────────────────┤
255 │EAP-TLS-ClientCert │ absolute file path or │
256 │ │ embedded pem │
257 │ │ │
258 │ │ Path to the client X.509 │
259 │ │ certificate or certificate │
260 │ │ chain to send on server │
261 │ │ request. │
262 └───────────────────────────┴────────────────────────────────────────────┘
263
264
265 │EAP-TLS-ClientKey │ absolute file path or │
266 │ │ embedded pem │
267 │ │ │
268 │ │ Path to the client private │
269 │ │ key corresponding to the │
270 │ │ public key provided in │
271 │ │ EAP-TLS-ClientCert. The │
272 │ │ recommended format is │
273 │ │ PKCS#8 PEM. │
274 ├───────────────────────────┼────────────────────────────────────────────┤
275 │EAP-TLS-ClientKeyBundle │ absolute file path │
276 │ │ │
277 │ │ As an alternative to │
278 │ │ EAP-TLS-ClientCert and │
279 │ │ EAP-TLS-ClientKey IWD can │
280 │ │ load both the certificate │
281 │ │ and the private key from a │
282 │ │ container file pointed by │
283 │ │ this setting. The recom‐ │
284 │ │ mended format is PKCS#12 │
285 │ │ when this is used. │
286 ├───────────────────────────┼────────────────────────────────────────────┤
287 │EAP-TLS- │ string │
288 │ClientKeyPassphrase │ │
289 │ │ Decryption key for the │
290 │ │ client key files. This │
291 │ │ should be used if the cer‐ │
292 │ │ tificate or the private │
293 │ │ key in the files mentioned │
294 │ │ above is encrypted. When │
295 │ │ not given, the agent is │
296 │ │ asked for the passphrase │
297 │ │ at connection time. │
298 ├───────────────────────────┼────────────────────────────────────────────┤
299 │EAP-TLS-ServerDomainMask, │ string │
300 │EAP-TTLS-ServerDomainMask, │ │
301 │EAP-PEAP-ServerDomainMask │ A mask for the domain │
302 │ │ names contained in the │
303 │ │ server's certificate. At │
304 │ │ least one of the domain │
305 │ │ names present in the cer‐ │
306 │ │ tificate's Subject Alter‐ │
307 │ │ native Name extension's │
308 │ │ DNS Name fields or the │
309 │ │ Common Name has to match │
310 │ │ at least one mask, or │
311 │ │ authentication will fail. │
312 │ │ Multiple masks can be │
313 │ │ given separated by semi‐ │
314 │ │ colons. The masks are │
315 │ │ split into segments at the │
316 │ │ dots. Each segment has to │
317 │ │ match its corresponding │
318 │ │ label in the domain name. │
319 │ │ An asterisk segment in the │
320 │ │ mask matches any label. │
321 │ │ An asterisk segment at the │
322 │ │ beginning of the mask │
323 │ │ matches one or more con‐ │
324 │ │ secutive labels from the │
325 │ │ beginning of the domain │
326 │ │ string. │
327 └───────────────────────────┴────────────────────────────────────────────┘
328
329
330
331 │EAP-TTLS-Phase2-Method │ The following values are allowed: │
332 │ │ Tunneled-CHAP, │
333 │ │ Tunneled-MSCHAP, │
334 │ │ Tunneled-MSCHAPv2, │
335 │ │ Tunneled-PAP or │
336 │ │ a valid EAP method name (see EAP-Method) │
337 │ │ │
338 │ │ │
339 │ │ Phase 2 authentication │
340 │ │ method for EAP-TTLS. Can │
341 │ │ be either one of the │
342 │ │ TTLS-specific non-EAP │
343 │ │ methods (Tunneled-*), or │
344 │ │ any EAP method documented │
345 │ │ here. The following two │
346 │ │ settings are used if any │
347 │ │ of the non-EAP methods is │
348 │ │ used. │
349 ├───────────────────────────┼────────────────────────────────────────────┤
350 │EAP-TTLS-Phase2-Identity │ The secure identity/username string for │
351 │ │ the TTLS non-EAP Phase 2 methods. If not │
352 │ │ provided iwd will request a username at │
353 │ │ connection time. │
354 ├───────────────────────────┼────────────────────────────────────────────┤
355 │EAP-TTLS-Phase2-Password │ Password string for the TTLS non-EAP Phase │
356 │ │ 2 methods. If not provided IWD will │
357 │ │ request a passphrase at connection time. │
358 ├───────────────────────────┼────────────────────────────────────────────┤
359 │EAP-TTLS-Phase2-* │ Any settings to be used for the inner EAP │
360 │ │ method if one was specified as │
361 │ │ EAP-TTLS-Phase2-Method, rather than a │
362 │ │ TTLS-specific method. The prefix │
363 │ │ EAP-TTLS-Phase2- replaces the EAP- prefix │
364 │ │ in the setting keys and their usage is │
365 │ │ unchanged. Since the inner method's nego‐ │
366 │ │ tiation is encrypted, a secure identity │
367 │ │ string can be provided. │
368 ├───────────────────────────┼────────────────────────────────────────────┤
369 │EAP-PEAP-Phase2-* │ Any settings to be used for the inner EAP │
370 │ │ method with EAP-PEAP as the outer method. │
371 │ │ The prefix EAP-PEAP-Phase2- replaces the │
372 │ │ EAP- prefix in the setting keys and their │
373 │ │ usage is unchanged. Since the inner │
374 │ │ method's negotiation is encrypted, a │
375 │ │ secure identity string can be provided. │
376 └───────────────────────────┴────────────────────────────────────────────┘
377
378 Network Configuration Settings
379 The group [IPv4] contains settings for Internet Protocol version 4
380 (IPv4) network configuration with the static addresses.
381
382 ┌───────────┬────────────────────────────┐
383 │Address │ IPv4 address string │
384 │ │ │
385 │ │ The IPv4 address to │
386 │ │ assign. This field is │
387 │ │ required for the static │
388 │ │ configuration. │
389 └───────────┴────────────────────────────┘
390
391
392
393
394
395
396
397 │Gateway │ IPv4 address string │
398 │ │ │
399 │ │ The IPv4 address of the │
400 │ │ gateway (router). This │
401 │ │ field is required for the │
402 │ │ static configuration. │
403 ├───────────┼────────────────────────────┤
404 │DNS │ IPv4 address string list, │
405 │ │ space delimited │
406 │ │ │
407 │ │ The IPv4 address(es) of │
408 │ │ the Domain Name System │
409 │ │ (DNS). This field is │
410 │ │ optional. DNS setting can │
411 │ │ be used to override the │
412 │ │ DNS entries received from │
413 │ │ the DHCP server. │
414 ├───────────┼────────────────────────────┤
415 │Netmask │ IPv4 address string │
416 │ │ │
417 │ │ The IPv4 address of the │
418 │ │ subnet. This field is │
419 │ │ optional. 255.255.255.0 is │
420 │ │ used as default Netmask. │
421 ├───────────┼────────────────────────────┤
422 │Broadcast │ IPv4 address string │
423 │ │ │
424 │ │ The IPv4 address to be │
425 │ │ used for the broadcast. │
426 │ │ This field is optional. │
427 ├───────────┼────────────────────────────┤
428 │DomainName │ string │
429 │ │ │
430 │ │ The DomainName is the name │
431 │ │ of the local Internet │
432 │ │ domain. This field is │
433 │ │ optional. DomainName set‐ │
434 │ │ ting can be used to over‐ │
435 │ │ ride the DomainName value │
436 │ │ obtained from the DHCP │
437 │ │ server. │
438 └───────────┴────────────────────────────┘
439
440 The group [IPv6] contains settings for Internet Protocol version 6
441 (IPv6) network configuration.
442
443 ┌───────────┬────────────────────────────┐
444 │Enabled │ Boolean │
445 │ │ │
446 │ │ Whether IPv6 is enabled │
447 │ │ for this network. If not │
448 │ │ provided, then the global │
449 │ │ default provided by [Net‐ │
450 │ │ work].EnableIPv6 setting │
451 │ │ will be used. If IPv6 is │
452 │ │ disabled, then the 'dis‐ │
453 │ │ able_ipv6' setting in │
454 │ │ sysfs will be set to 1 and │
455 │ │ no IPv6 addresses or │
456 │ │ routes will be created for │
457 │ │ this network. │
458 └───────────┴────────────────────────────┘
459
460
461
462
463 │Address │ IPv6 address string │
464 │ │ │
465 │ │ The IPv6 address to │
466 │ │ assign. This field is │
467 │ │ required for the static │
468 │ │ configuration. The recog‐ │
469 │ │ nized format is according │
470 │ │ to inet_pton followed by │
471 │ │ '/' and prefix length. If │
472 │ │ prefix length is omitted, │
473 │ │ then 128 is assumed. │
474 ├───────────┼────────────────────────────┤
475 │Gateway │ IPv6 address string │
476 │ │ │
477 │ │ The IPv6 address of the │
478 │ │ gateway (router). This │
479 │ │ field is required for the │
480 │ │ static configuration. │
481 ├───────────┼────────────────────────────┤
482 │DNS │ IPv6 address string list, │
483 │ │ space delimited │
484 │ │ │
485 │ │ The IPv6 address(es) of │
486 │ │ the Domain Name System │
487 │ │ (DNS). This field is │
488 │ │ optional. DNS setting can │
489 │ │ be used to override the │
490 │ │ DNS entries received from │
491 │ │ the DHCPv6 server or via │
492 │ │ Router Advertisements. │
493 ├───────────┼────────────────────────────┤
494 │DomainName │ string │
495 │ │ │
496 │ │ The DomainName is the name │
497 │ │ of the local Internet │
498 │ │ domain. This field is │
499 │ │ optional. DomainName set‐ │
500 │ │ ting can be used to over‐ │
501 │ │ ride the DomainName value │
502 │ │ obtained from the DHCPv6 │
503 │ │ server or via Router │
504 │ │ Advertisements. │
505 └───────────┴────────────────────────────┘
506
507 Embedded PEMs
508 Rather than including an absolute path to a PEM file (for certificates
509 and keys), the PEM itself can be included inside the settings file and
510 referenced directly. This allows IEEE 802.1x network provisioning using
511 a single file without any references to certificates or keys on the
512 system.
513
514 An embedded PEM can appear anywhere in the settings file using the fol‐
515 lowing format (in this example the PEM is named 'my_ca_cert'):
516
517 [@pem@my_ca_cert]
518 ----- BEGIN CERTIFICATE -----
519 <PEM data>
520 ----- END CERTIFICATE -----
521
522 After this special group tag it's as simple as pasting in a PEM file
523 including the BEGIN/END tags. Now 'my_ca_cert' can be used to reference
524 the certificate elsewhere in the settings file by prefixing the value
525 with 'embed:'
526
527 EAP-TLS-CACert=embed:my_ca_cert
528
529 This is not limited to CA Certificates either. Client certificates,
530 client keys (encrypted or not), and certificate chains can be included.
531
533 The following are some examples of common configurations
534
535 Open Network (Hidden)
536 [Settings]
537 Hidden=true
538
539 Pre-Shared Key (PSK)
540 [Security]
541 Passphrase=secret123
542
543 PWD
544 [Security]
545 EAP-Method=PWD
546 EAP-Identity=user@domain.com
547 EAP-Password=secret123
548
549 TLS
550 [Security]
551 EAP-Method=TLS
552 EAP-TLS-ClientCert=/certs/client-cert.pem
553 EAP-TLS-ClientKey=/certs/client-key.pem
554 EAP-TLS-CACert=/certs/ca-cert.pem
555 EAP-TLS-ServerDomainMask=*.domain.com
556
557 TTLS + PAP
558 [Security]
559 EAP-Method=TTLS
560 EAP-Identity=open@identity.com
561 EAP-TTLS-CACert=/certs/ca-cert.pem
562 EAP-TTLS-Phase2-Method=Tunneled-PAP
563 EAP-TTLS-Phase2-Identity=username
564 EAP-TTLS-Phase2-Password=password
565 EAP-TTLS-ServerDomainMask=*.domain.com
566
567 PEAP + MSCHAPv2
568 [Security]
569 EAP-Method=PEAP
570 EAP-Identity=open@identity.com
571 EAP-PEAP-CACert=/certs/ca-cert.pem
572 EAP-PEAP-Phase2-Method=MSCHAPV2
573 EAP-PEAP-Phase2-Identity=username
574 EAP-PEAP-Phase2-Password=password
575 EAP-PEAP-ServerDomainMask=*.domain.com
576
578 iwd(8), iwd.config(5)
579
581 Marcel Holtmann <marcel@holtmann.org>, Denis Kenzior
582 <denkenz@gmail.com>, Andrew Zaborowski <andrew.zaborowski@intel.com>,
583 Tim Kourt <tim.a.kourt@linux.intel.com>, James Prestwood <prest‐
584 woj@gmail.com>
585
587 2013-2019 Intel Corporation
588
589
590
591
592iwd 22 September 2019 IWD.NETWORK(5)