summaryrefslogtreecommitdiff
path: root/doc/config-format.txt
blob: 584220f0bf0e93eb0857be8db78b74e65cde1d4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Connman configuration file format
*********************************

Connman uses configuration files to provision existing services. Connman will
be looking for its configuration files at STORAGEDIR which by default points
to /var/lib/connman/. Configuration file names must not include other
characters than letters or numbers and must have a .config suffix.
Those configuration files are text files with a simple key-value pair format,
organized into sections. Values do not comprise leading or trailing whitespace.
We typically have one file per provisioned network.

If the config file is removed, then Connman tries to remove the
provisioned services. If an individual service inside a config is removed,
then the corresponding provisioned service is removed. If a service section
is changed, then the corresponding service is removed and immediately
re-provisioned.


Global section [global]
=======================

These files can have an optional global section describing the actual file.
The two allowed fields for this section are:
- Name: Name of the network.
- Description: Description of the network.


Service sections [service_*]
============================

Each provisioned service must start with the [service_*] tag. Replace * with
an identifier unique to the config file.

Allowed fields:
- Type: Service type. We currently only support wifi and ethernet.
- IPv4: The IPv4 address, netmask and gateway. Format of the entry
  is network/netmask/gateway. The mask length can be used instead
  of netmask. The gateway can be omitted if necessary.
  The IPv4 field can also contain the string "off" or "dhcp".
  If the setting is "off", then no IPv4 address is set to the interface.
  If the setting is "dhcp", then DHCPv4 address resolution is activated.
  Example: 192.168.1.2/24/192.168.1.1
           192.168.200.100/255.255.255.0/192.168.200.1
           10.0.0.2/24
- IPv6: The IPv6 address, prefix length and gateway. Format of the entry
  is network/prefixlen/gateway. For IPv6 addresses only prefix length is
  accepted. The gateway can be omitted if necessary.
  The IPv6 field can also contain the string "off" or "auto".
  If the setting is "off", then no IPv6 address is set to the interface.
  If the setting is "auto", then SLAAC or DHCPv6 is used.
  Example: 2001:db8::2/64/2001:db8::1
           2001:db8::1:2:3:4/64
- IPv6.Privacy: IPv6 privacy option. Value can be either "disabled",
  "enabled" or "preferred" (or the misspelled "prefered"). See use_tempaddr
  variable description in Linux kernel Documentation/networking/ip-sysctl.txt
  file.
- MAC: MAC address of the interface where this setting should be applied.
  The MAC address is optional and if it is missing, then the first found
  interface is used. The byte values must have prefix 0 added,
  the bytes must be separated by ":" char and its length must be
  exactly 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 = 17 characters.
- Nameservers: Comma separated list of nameservers
- SearchDomains: Comma separated list of DNS search domains
- Timeservers: Comma separated list of timeservers
- Domain: Domain name to be used
- mDNS: Boolean value (true or false). True means that mDNS is enabled.
  mDNS domains can be resolved and hostname is registered. False means
  that all mDNS functionality for this service is disabled. Note that
  not all DNS backends support mDNS: currently systemd-resolved is
  the only DNS backend with mDNS.

If IPv4 address is missing then DHCP is used. If IPv6 address is missing,
then SLAAC or DHCPv6 is used.

The following options are valid if Type is "wifi"
- Name: A string representation of an 802.11 SSID. If the SSID field is
  present, the Name field is ignored.
- SSID: A hexadecimal representation of an 802.11 SSID. Use this format to
  encode special characters including starting or ending spaces. If the SSID
  field is omitted, the Name field is used instead.
- EAP: EAP type. We currently only support tls, ttls or peap.
- CACertFile: File path to CA certificate file (PEM/DER).
- ClientCertFile: File path to client certificate file (PEM/DER).
- PrivateKeyFile: File path to client private key file (PEM/DER/PFX).
- PrivateKeyPassphrase: Password/passphrase for private key file.
- PrivateKeyPassphraseType: We only support the fsid passphrase type for now.
  This is for private keys generated by using their own filesystem UUID as the
  passphrase. The PrivateKeyPassphrase field is ignored when this field is set
  to fsid.
- Identity: Identity string for EAP.
- AnonymousIdentity: Anonymous Identity string for EAP.
- SubjectMatch: Substring to be matched against the subject of the
  authentication server certificate for EAP.
- AltSubjectMatch: Semicolon separated string of entries to be matched against
  the alternative subject name of the authentication server certificate for EAP.
- DomainSuffixMatch: Constraint for server domain name. If set, this FQDN is
  used as a suffix match requirement for the authentication server certificate
  for EAP.
- DomainMatch: This FQDN is used as a full match requirement for the
  authentication server certificate for EAP.
- Phase2: Phase2 (inner authentication with TLS tunnel) authentication method.
  Prefix the value with "EAP-" to indicate the usage of an EAP-based inner
  authentication method (should only be used with EAP = TTLS).
- Passphrase: RSN/WPA/WPA2 Passphrase
- Security: The security type of the network. Possible values are 'psk'
  (WPA/WPA2 PSK), 'ieee8021x' (WPA EAP), 'none' and 'wep'. When not set, the
  default value is 'ieee8021x' if an EAP type is configured, 'psk' if a
  passphrase is present and 'none' otherwise.
- Hidden: If set to true, then this AP is hidden. If missing or set to false,
  then AP is not hidden.


Examples
========

This is a configuration file for a network providing EAP-TLS, EAP-TTLS and
EAP-PEAP services. The respective SSIDs are tls_ssid, ttls_ssid and peap_ssid
and the file name is example.config.

Please note that the SSID entry is for hexadecimal encoded SSID (e.g. "SSID =
746c735f73736964"). If your SSID does not contain any exotic character then
you should use the Name entry instead (e.g. "Name = tls_ssid").

example@example:[~]$ cat /var/lib/connman/example.config
[global]
Name = Example
Description = Example network configuration

[service_tls]
Type = wifi
SSID = 746c735f73736964
EAP = tls
CACertFile = /home/user/.certs/ca.pem
ClientCertFile = /home/user/devlp/.certs/client.pem
PrivateKeyFile = /home/user/.certs/client.fsid.pem
PrivateKeyPassphraseType = fsid
Identity = user

[service_ttls]
Type = wifi
Name = ttls_ssid
EAP = ttls
CACertFile = /home/user/.cert/ca.pem
Phase2 = MSCHAPV2
Identity = user

[service_peap]
Type = wifi
Name = peap_ssid
EAP = peap
CACertFile = /home/user/.cert/ca.pem
Phase2 = MSCHAPV2
Identity = user

[service_home_ethernet]
Type = ethernet
IPv4 = 192.168.1.42/255.255.255.0/192.168.1.1
IPv6 = 2001:db8::42/64/2001:db8::1
MAC = 01:02:03:04:05:06
Nameservers = 10.2.3.4,192.168.1.99
SearchDomains = my.home,isp.net
Timeservers = 10.172.2.1,ntp.my.isp.net
Domain = my.home

[service_home_wifi]
Type = wifi
Name = my_home_wifi
Passphrase = secret
IPv4 = 192.168.2.2/255.255.255.0/192.168.2.1
MAC = 06:05:04:03:02:01