51d547b34703c6611e5d357bfaf6d44fe1359747
[platform/upstream/connman.git] / doc / connman-vpn-provider.config.5.in
1 .\" connman-vpn-provider.config(5) manual page
2 .\"
3 .\" Copyright (C) 2015 Intel Corporation
4 .\"
5 .TH "connection_name.config" "5" "2015-10-15" ""
6 .SH NAME
7 connection_name.config \- ConnMan vpn connection provisioning file
8 .SH SYNOPSIS
9 .B @vpn_storagedir@/\fIconnection-name\fB.config
10 .SH DESCRIPTION
11 .P
12 \fIConnMan\fP's vpn connections are configured with so called
13 "\fBprovisioning files\fP" which reside under \fI@vpn_storagedir@/\fP.
14 The files can be named anything, as long as they contain only printable
15 ascii characers, for example letters, numbers and underscores. The file
16 must end with \fB.config\fP. Each VPN connection requires a provisioning
17 file, but multiple connections can be specified in the same file.
18 .SH "FILE FORMAT"
19 .P
20 The configuration file consists of sections (groups) of key-value pairs.
21 Lines beginning with a '#' and blank lines are considered comments.
22 Sections are started by a header line containing the section enclosed
23 in '[' and ']', and ended implicitly by the start of the next section
24 or the end of the file. Each key-value pair must be contained in a section.
25 .P
26 Description of sections and available keys follows:
27 .SS [global]
28 This section is optional, and can be used to describe the actual file. The
29 two allowed fields for this section are:
30 .TP
31 .BI Name= name
32 Name of the network.
33 .TP
34 .BI Description= description
35 Description of the network.
36 .SS [provider_*]
37 Each provisioned connection must start with a [provider_*] tag,
38 with * replaced by an unique name within the file.
39 The following fields are mandatory:
40 .TP
41 .B Type=OpenConnect \fR|\fB OpenVPN \fR|\fB VPNC \fR|\fB L2TP \fR|\fB PPTP
42 Specifies the VPN type.
43 .TP
44 .BI Host= IP
45 VPN server IP address.
46 .TP
47 .BI Domain= domain
48 Domain name for the VPN service.
49 .TP
50 The following field is optional:
51 .TP
52 .BI Networks= network / netmask / gateway [,...]
53 Networks behind the VPN. If all traffic should go through the VPN, this
54 field can be left out. The gateway can be left out. For IPv6 addresses,
55 only the prefix length is accepted as the netmask.
56 .SS OpenConnect
57 The following keys can be used for \fBopenconnect\fP(8) networks:
58 .TP
59 .BI OpenConnect.ServerCert= cert
60 SHA1 fingerprint of the VPN server's certificate.
61 .TP
62 .BI OpenConnect.CACert= cert
63 File containing additional CA certificates in addition to the system
64 trusted certificate authorities.
65 .TP
66 .BI OpenConnect.ClientCert= cert
67 Client certificate, if needed by web authentication.
68 .TP
69 .BI OpenConnect.MTU= mtu
70 Request \fImtu\fP from the server as the MTU of the tunnel.
71 .TP
72 .BI OpenConnect.Cookie= cookie
73 The resulting cookie of the authentication process. As the cookie lifetime
74 can be very limited, it does not usually make sense to add it into the
75 configuration file.
76 .TP
77 .BI OpenConnect.VPNHost= host
78 The final VPN server to use after completing the web authentication. Only
79 usable for extremely simple VPN configurations and should normally be set
80 only via the VPN Agent API.
81 .PP
82 If \fBOpenConnect.Cookie\fP, \fBOpenConnect.VPNHost\fP or
83 \fBOpenConnect.ServerCert\fP are missing, the VPN Agent will be contacted
84 to supply the information.
85 .SS OpenVPN
86 The following keys are mandatory for \fBopenvpn\fP(8) networks:
87 .TP
88 .BI OpenVPN.CACert= cert
89 Certificate authority file.
90 .TP
91 .BI OpenVPN.Cert= cert
92 Local peer's signed certificate.
93 .TP
94 .BI OpenVPN.Cert= cert
95 Local peer's signed certificate.
96 .TP
97 .BI OpenVPN.Key= key
98 Local peer's private key.
99 .TP
100 The following keys are optional for \fBopenvpn\fP(8) networks:
101 .TP
102 .BI OpenVPN.MTU= mtu
103 MTU of the tunnel.
104 .TP
105 .B OpenVPN.NSCertType=client \fR|\fB server
106 Peer certificate type, either \fBclient\fP or \fBserver\fP.
107 .TP
108 .BI OpenVPN.Protocol= protocol
109 Use \fIprotocol\fP.
110 .TP
111 .BI OpenVPN.Port= port
112 TCP/UDP port number.
113 .TP
114 .B OpenVPN.AuthUserPass=true \fR|\fB false
115 Authenticate on the server using username/password.
116 .TP
117 .BI OpenVPN.AskPass= file
118 Get certificate password from \fIfile\fP.
119 .TP
120 .B OpenVPN.AuthNoCache=true \fR|\fB false
121 Don't cache AskPass or AuthUserPass value.
122 .TP
123 .BI OpenVPN.TLSRemote= name
124 Accept connections only from a host with X509 name or common
125 name equal to \fIname\fP.
126 .TP
127 .BI OpenVPN.TLSAuth= file
128 Use \fIfile\fP for HMAC authentication.
129 .TP
130 .BI OpenVPN.TLSAuthDir= direction
131 Use \fIdirection\fP for HMAC authentication direction.
132 .TP
133 .BI OpenVPN.Cipher= cipher
134 Use \fIcipher\fP as the cipher.
135 .TP
136 .B OpenVPN.Auth=true \fR|\fB false
137 Use HMAC authentication.
138 .TP
139 .B OpenVPN.CompLZO=yes \fR|\fB no \fR|\fB adaptive
140 Use fast LZO compression.
141 .TP
142 .B OpenVPN.RemoteCertTls=client \fR|\fB server
143 Require that remote certificate is signed based on RFC3280 TLS rules.
144 .TP
145 .BI OpenVPN.ConfigFile= file
146 OpenVPN config file for extra options not supported by the OpenVPN plugin.
147 .TP
148 .BI OpenVPN.DeviceType= tun \fR|\fB tap
149 Whether the VPN should use a tun (OSI layer 3) or tap (OSI layer 2) device.
150 Defaults to tun if omitted.
151 .SS VPNC
152 The following key is mandatory for \fBvpnc\fP(8) networks:
153 .TP
154 .BI VPNC.IPSec.ID= id
155 Group username.
156 .TP
157 The following keys are optional for \fBvpnc\fP(8) networks:
158 .TP
159 .BI VPNC.IPSec.Secret= secret
160 Group password.
161 .TP
162 .BI VPNC.XAuth.Username= username
163 Username.
164 .TP
165 .BI VPNC.XAuth.Password= password
166 Password.
167 .TP
168 .BI VPNC.IKE.Authmode= mode
169 IKE authentication mode.
170 .TP
171 .BI VPNC.IKE.DHGroup= group
172 IKE DH group name.
173 .TP
174 .BI VPNC.PFS= group
175 Diffie-Hellman group for perfect forward secrecy.
176 .TP
177 .BI VPNC.Domain= domain
178 Domain name for authentication.
179 .TP
180 .BI VPNC.Vendor= vendor
181 Vendor of the IPSec gateway.
182 .TP
183 .BI VPNC.LocalPort= port
184 Local ISAKMP port number to use.
185 .TP
186 .BI VPNC.CiscoPort= port
187 Cisco UDP Encapsulation Port.
188 .TP
189 .BI VPNC.AppVersion= version
190 Application version to report.
191 .TP
192 .BI VPNC.NATTMode= mode
193 NAT-Traversal Method to use.
194 .TP
195 .BI VPNC.DPDTimeout= timeout
196 DPD idle timeout.
197 .TP
198 .B VPNC.SingleDES=true \fR|\fB false
199 Enable single DES encryption.
200 .TP
201 .B VPNC.NoEncryption=true \fR|\fB false
202 Enable usage of no encryption for data traffic.
203 .TP
204 .BI VPNC.DeviceType= tun \fR|\fB tap
205 Whether the VPN should use a tun (OSI layer 3) or tap (OSI layer 2) device.
206 Defaults to tun if omitted.
207 .SS L2TP
208 The following keys are optional for l2tp (\fBxl2tp.conf\fP(5), \fBpppd\fP(8))
209 networks:
210 .TP
211 .BI L2TP.User= user
212 L2TP username.
213 .TP
214 .BI L2TP.Password= password
215 L2TP password.
216 .TP
217 .BI L2TP.BPS= bps
218 Max bandwidth to use.
219 .TP
220 .BI L2TP.TXBPS= bps
221 Max transmit bandwidth to use.
222 .TP
223 .BI L2TP.RXBPS= bps
224 Max receive bandwidth to use.
225 .TP
226 .B L2TP.LengthBit=yes \fR|\fB no
227 Use length bit.
228 .TP
229 .B L2TP.Challenge=yes \fR|\fB no
230 Use challenge authentication.
231 .TP
232 .BI L2TP.DefaultRoute= route
233 Add \fIroute\fP to the routing tables.
234 .TP
235 .B L2TP.FlowBit=yes \fR|\fB no
236 Use seq numbers.
237 .TP
238 .BI L2TP.TunnelRWS= size
239 Window size.
240 .TP
241 .B L2TP.Exclusive=yes \fR|\fB no
242 Use only one control channel.
243 .TP
244 .B L2TP.Redial=yes \fR|\fB no
245 Redial if disconnected.
246 .TP
247 .BI L2TP.RedialTimeout= timeout
248 Redial timeout.
249 .TP
250 .BI L2TP.MaxRedials= count
251 Maximum amount of redial tries.
252 .TP
253 .B L2TP.RequirePAP=yes \fR|\fB no
254 Require PAP.
255 .TP
256 .B L2TP.RequireCHAP=yes \fR|\fB no
257 Require CHAP.
258 .TP
259 .B L2TP.ReqAuth=yes \fR|\fB no
260 Require authentication.
261 .TP
262 .B L2TP.AccessControl=yes \fR|\fB no
263 Use access control.
264 .TP
265 .BI L2TP.AuthFile= file
266 Authentication file location.
267 .TP
268 .BI L2TP.ListenAddr= address
269 Listen address.
270 .TP
271 .B L2TP.IPSecSaref=yes \fR|\fB no
272 Listen address.
273 .TP
274 .BI L2TP.Port= port
275 UDP port used.
276 .TP
277 .BI PPPD.EchoFailure= count
278 Echo failure count.
279 .TP
280 .BI PPPD.EchoFailure= count
281 Dead peer check count.
282 .TP
283 .BI PPPD.EchoInterval= interval
284 Dead peer check interval.
285 .TP
286 .BI PPPD.Debug= level
287 Debug level.
288 .TP
289 .B PPPD.RefuseEAP=true \fR|\fB false
290 Refuse EAP authentication.
291 .TP
292 .B PPPD.RefusePAP=true \fR|\fB false
293 Refuse PAP authentication.
294 .TP
295 .B PPPD.RefuseCHAP=true \fR|\fB false
296 Refuse CHAP authentication.
297 .TP
298 .B PPPD.RefuseMSCHAP=true \fR|\fB false
299 Refuse MSCHAP authentication.
300 .TP
301 .B PPPD.RefuseMSCHAP2=true \fR|\fB false
302 Refuse MSCHAPv2 authentication.
303 .TP
304 .B PPPD.NoBSDComp=true \fR|\fB false
305 Disable BSD compression.
306 .TP
307 .B PPPD.NoPcomp=true \fR|\fB false
308 Disable protocol compression.
309 .TP
310 .B PPPD.UseAccomp=true \fR|\fB false
311 Disable Access/Control compression.
312 .TP
313 .B PPPD.NoDeflate=true \fR|\fB false
314 Disable deflate compression.
315 .TP
316 .B PPPD.ReqMPPE=true \fR|\fB false
317 Require the use of MPPE.
318 .TP
319 .B PPPD.ReqMPPE40=true \fR|\fB false
320 Require the use of MPPE 40 bit.
321 .TP
322 .B PPPD.ReqMPPE128=true \fR|\fB false
323 Require the use of MPPE 128 bit.
324 .TP
325 .B PPPD.ReqMPPEStateful=true \fR|\fB false
326 Allow MPPE to use stateful mode.
327 .TP
328 .B PPPD.NoVJ=true \fR|\fB false
329 No Van Jacobson compression.
330 .SS PPTP
331 The following keys are optional for \fBpptp\fP(8) (see also \fBpppd\fP(8))
332 networks:
333 .TP
334 .BI PPTP.User= username
335 Username.
336 .TP
337 .BI PPTP.Password= password
338 Password.
339 .TP
340 .BI PPPD.EchoFailure= count
341 Echo failure count.
342 .TP
343 .BI PPPD.EchoFailure= count
344 Dead peer check count.
345 .TP
346 .BI PPPD.EchoInterval= interval
347 Dead peer check interval.
348 .TP
349 .BI PPPD.Debug= level
350 Debug level.
351 .TP
352 .B PPPD.RefuseEAP=true \fR|\fB false
353 Refuse EAP authentication.
354 .TP
355 .B PPPD.RefusePAP=true \fR|\fB false
356 Refuse PAP authentication.
357 .TP
358 .B PPPD.RefuseCHAP=true \fR|\fB false
359 Refuse CHAP authentication.
360 .TP
361 .B PPPD.RefuseMSCHAP=true \fR|\fB false
362 Refuse MSCHAP authentication.
363 .TP
364 .B PPPD.RefuseMSCHAP2=true \fR|\fB false
365 Refuse MSCHAPv2 authentication.
366 .TP
367 .B PPPD.NoBSDComp=true \fR|\fB false
368 Disable BSD compression.
369 .TP
370 .B PPPD.NoPcomp=true \fR|\fB false
371 Disable protocol compression.
372 .TP
373 .B PPPD.UseAccomp=true \fR|\fB false
374 Disable Access/Control compression.
375 .TP
376 .B PPPD.NoDeflate=true \fR|\fB false
377 Disable deflate compression.
378 .TP
379 .B PPPD.ReqMPPE=true \fR|\fB false
380 Require the use of MPPE.
381 .TP
382 .B PPPD.ReqMPPE40=true \fR|\fB false
383 Require the use of MPPE 40 bit.
384 .TP
385 .B PPPD.ReqMPPE128=true \fR|\fB false
386 Require the use of MPPE 128 bit.
387 .TP
388 .B PPPD.ReqMPPEStateful=true \fR|\fB false
389 Allow MPPE to use stateful mode.
390 .TP
391 .B PPPD.NoVJ=true \fR|\fB false
392 No Van Jacobson compression.
393
394 .SH "EXAMPLE"
395 This is a configuration file for a VPN providing L2TP, OpenVPN and
396 OpenConnect services. It could, for example, be in the file
397 .B @vpn_storagedir@/example.config\fR.
398 .PP
399 .nf
400 [global]
401 Name = Example
402 Description = Example VPN configuration
403
404 [provider_l2tp]
405 Type = L2TP
406 Name = Connection to corporate network
407 Host = 1.2.3.4
408 Domain = corporate.com
409 Networks = 10.10.30.0/24
410 L2TP.User = username
411
412 [provider_openconnect]
413 Type = OpenConnect
414 Name = Connection to corporate network using Cisco VPN
415 Host = 7.6.5.4
416 Domain = corporate.com
417 Networks = 10.10.20.0/255.255.255.0/10.20.1.5,192.168.99.1/24,2001:db8::1/64
418 OpenConnect.ServerCert = 263AFAB4CB2E6621D12E90182008AEF44AEFA031
419 OpenConnect.CACert = /etc/certs/certificate.p12
420
421 [provider_openvpn]
422 Type = OpenVPN
423 Name = Connection to corporate network using OpenVPN
424 Host = 3.2.5.6
425 Domain = my.home.network
426 OpenVPN.CACert = /etc/certs/cacert.pem
427 OpenVPN.Cert = /etc/certs/cert.pem
428 OpenVPN.Key = /etc/certs/cert.key
429 .fi
430 .SH "SEE ALSO"
431 .BR connmanctl (1),\  connman (8),\  connman-vpn (8)