openconnect.8.in 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. .TH OPENCONNECT 8
  2. .SH NAME
  3. openconnect \- Multi-protocol VPN client, for Cisco AnyConnect VPNs and others
  4. .SH SYNOPSIS
  5. .SY openconnect
  6. .OP \-\-config configfile
  7. .OP \-b,\-\-background
  8. .OP \-\-pid\-file pidfile
  9. .OP \-c,\-\-certificate cert
  10. .OP \-e,\-\-cert\-expire\-warning days
  11. .OP \-k,\-\-sslkey key
  12. .OP \-C,\-\-cookie cookie
  13. .OP \-\-cookie\-on\-stdin
  14. .OP \-\-compression MODE
  15. .OP \-d,\-\-deflate
  16. .OP \-D,\-\-no\-deflate
  17. .OP \-\-force\-dpd interval
  18. .OP \-\-force\-trojan interval
  19. .OP \-F,\-\-form\-entry form:opt=value
  20. .OP \-g,\-\-usergroup group
  21. .OP \-h,\-\-help
  22. .OP \-\-http\-auth methods
  23. .OP \-i,\-\-interface ifname
  24. .OP \-l,\-\-syslog
  25. .OP \-\-timestamp
  26. .OP \-\-passtos
  27. .OP \-U,\-\-setuid user
  28. .OP \-\-csd\-user user
  29. .OP \-m,\-\-mtu mtu
  30. .OP \-\-base\-mtu mtu
  31. .OP \-p,\-\-key\-password pass
  32. .OP \-P,\-\-proxy proxyurl
  33. .OP \-\-proxy\-auth methods
  34. .OP \-\-no\-proxy
  35. .OP \-\-libproxy
  36. .OP \-\-key\-password\-from\-fsid
  37. .OP \-q,\-\-quiet
  38. .OP \-Q,\-\-queue\-len len
  39. .OP \-s,\-\-script vpnc\-script
  40. .OP \-S,\-\-script\-tun
  41. .OP \-u,\-\-user name
  42. .OP \-V,\-\-version
  43. .OP \-v,\-\-verbose
  44. .OP \-x,\-\-xmlconfig config
  45. .OP \-\-authgroup group
  46. .OP \-\-authenticate
  47. .OP \-\-cookieonly
  48. .OP \-\-printcookie
  49. .OP \-\-cafile file
  50. .OP \-\-disable\-ipv6
  51. .OP \-\-dtls\-ciphers list
  52. .OP \-\-dtls12\-ciphers list
  53. .OP \-\-dtls\-local\-port port
  54. .OP \-\-dump\-http\-traffic
  55. .OP \-\-no\-system\-trust
  56. .OP \-\-pfs
  57. .OP \-\-no\-dtls
  58. .OP \-\-no\-http\-keepalive
  59. .OP \-\-no\-passwd
  60. .OP \-\-no\-xmlpost
  61. .OP \-\-non\-inter
  62. .OP \-\-passwd\-on\-stdin
  63. .OP \-\-protocol proto
  64. .OP \-\-token\-mode mode
  65. .OP \-\-token\-secret {secret\fR[\fI,counter\fR]|@\fIfile\fR}
  66. .OP \-\-reconnect\-timeout seconds
  67. .OP \-\-resolve host:ip
  68. .OP \-\-servercert sha1
  69. .OP \-\-useragent string
  70. .OP \-\-version\-string string
  71. .OP \-\-local\-hostname string
  72. .OP \-\-os string
  73. .B [\-\-server] [https://]\fIhost\fB[:\fIport\fB][/\fIgroup\fB]
  74. .YS
  75. .SH DESCRIPTION
  76. The program
  77. .B openconnect
  78. connects to VPN servers which use standard TLS/SSL, DTLS, and ESP
  79. protocols for data transport.
  80. It was originally written to support Cisco "AnyConnect" VPN servers,
  81. and has since been extended with experimental support for Juniper
  82. Network Connect
  83. .RB ( \-\-protocol=nc ),
  84. Junos Pulse VPN servers
  85. .RB ( \-\-protocol=pulse ),
  86. PAN GlobalProtect VPN servers
  87. .RB ( \-\-protocol=gp ),
  88. F5 Big-IP VPN servers
  89. .RB ( \-\-protocol=f5 ),
  90. Fortinet Fortigate VPN servers
  91. .RB ( \-\-protocol=fortinet ),
  92. and Array Networks SSL VPN servers
  93. .RB ( \-\-protocol=array ).
  94. The connection happens in two phases. First there is a simple HTTPS
  95. connection over which the user authenticates somehow \- by using a
  96. certificate, or password or SecurID, etc. Having authenticated, the
  97. user is rewarded with an authentication cookie which can be used to make the
  98. real VPN connection.
  99. The second phase uses that cookie to connect to a tunnel via HTTPS,
  100. and data packets can be passed over the resulting connection. When
  101. possible, a UDP tunnel is also configured: AnyConnect uses DTLS, while
  102. Juniper and GlobalProtect use UDP-encapsulated ESP. The UDP tunnel
  103. may be disabled with
  104. .BR \-\-no\-dtls ,
  105. but is preferred when correctly supported by the server and network
  106. for performance reasons. (TCP performs poorly and unreliably over
  107. TCP-based tunnels; see
  108. .IR http://sites.inka.de/~W1011/devel/tcp-tcp.html .)
  109. .SH OPTIONS
  110. .TP
  111. .B \-\-config=CONFIGFILE
  112. Read further options from
  113. .I CONFIGFILE
  114. before continuing to process options from the command line. The file
  115. should contain long-format options as would be accepted on the command line,
  116. but without the two leading \-\- dashes. Empty lines, or lines where the
  117. first non-space character is a # character, are ignored.
  118. Any option except the
  119. .B config
  120. option may be specified in the file.
  121. .TP
  122. .B \-b,\-\-background
  123. Continue in background after startup
  124. .TP
  125. .B \-\-pid\-file=PIDFILE
  126. Save the pid to
  127. .I PIDFILE
  128. when backgrounding
  129. .TP
  130. .B \-c,\-\-certificate=CERT [,\-\-mca-certificate=CERT]
  131. Use SSL client certificate
  132. .I CERT
  133. which may be either a file name or, if OpenConnect has been built with an appropriate
  134. version of GnuTLS, a PKCS#11 URL.
  135. The
  136. .B \-\-mca-certificate
  137. option sets the secondary certificate for multi-certificate authentication (according
  138. to Cisco's terminology, the SSL client certificate is called the "machine" certificate,
  139. and the second certificate is called the "user" certificate).
  140. .TP
  141. .B \-e,\-\-cert\-expire\-warning=DAYS
  142. Give a warning when SSL client certificate has
  143. .I DAYS
  144. left before expiry
  145. .TP
  146. .B \-k,\-\-sslkey=KEY [,\-\-mca\-key=KEY]
  147. Use SSL private key
  148. .I KEY
  149. which may be either a file name or, if OpenConnect has been built with an appropriate
  150. version of GnuTLS, a PKCS#11 URL.
  151. The
  152. .B \-\-mca\-key
  153. option sets the private key for the secondary certificate (see
  154. .BR \-\-mca\-certificate ).
  155. .TP
  156. .B \-C,\-\-cookie=COOKIE
  157. Use authentication cookie
  158. .IR COOKIE .
  159. .TP
  160. .B \-\-cookie\-on\-stdin
  161. Read cookie from standard input.
  162. .TP
  163. .B \-d,\-\-deflate
  164. Enable all compression, including stateful modes. By default, only stateless
  165. compression algorithms are enabled.
  166. .TP
  167. .B \-D,\-\-no\-deflate
  168. Disable all compression.
  169. .TP
  170. .B \-\-compression=MODE
  171. Set compression mode, where
  172. .I MODE
  173. is one of
  174. .IR "stateless" ,
  175. .IR "none" ,
  176. or
  177. .IR "all" .
  178. By default, only stateless compression algorithms which do not maintain state
  179. from one packet to the next (and which can be used on UDP transports) are
  180. enabled. By setting the mode to
  181. .I "all"
  182. stateful algorithms (currently only zlib deflate) can be enabled. Or all
  183. compression can be disabled by setting the mode to
  184. .IR "none" .
  185. .TP
  186. .B \-\-force\-dpd=INTERVAL
  187. Use
  188. .I INTERVAL
  189. as Dead Peer Detection interval (in seconds). This will cause the client to use
  190. DPD at the specified interval even if the server hasn't requested it, or at a
  191. different interval from the one requested by the server.
  192. DPD mechanisms vary by protocol and by transport (TLS or DTLS/ESP), but are all
  193. functionally similar: they enable either the VPN client or the VPN server to
  194. transmit a signal to the peer, requesting an immediate reply which can be used
  195. to confirm that the link between the two peers is still working.
  196. .TP
  197. .B \-g,\-\-usergroup=GROUP
  198. Set the URL path of the initial HTTPS connection to the server.
  199. With some protocols, this path may function as a login group or realm,
  200. hence the naming of this option. For example, the following invocations
  201. of OpenConnect are equivalent:
  202. .nf
  203. .B openconnect \-\-usergroup=loginPath vpn.server.com
  204. .B openconnect https://vpn.server.com/loginPath
  205. .fi
  206. .TP
  207. .B \-F,\-\-form\-entry=FORM:OPTION=VALUE
  208. Provide authentication form input, where
  209. .I FORM
  210. and
  211. .I OPTION
  212. are the identifiers from the form and the specific input field, and
  213. .I VALUE
  214. is the string to be filled in automatically. For example, the standard username field
  215. (also handled by the
  216. .B \-\-user
  217. option) could also be provided with this option thus:
  218. .B \-\-form\-entry
  219. .IR main:username=joebloggs .
  220. This option should
  221. .I not
  222. be used to enter passwords.
  223. .B \-\-passwd\-on\-stdin
  224. should be used for that purpose. Not only will this option expose the password value
  225. via the OpenConnect process's command line, but unlike
  226. .B \-\-passwd\-on\-stdin
  227. this option will not recognize the case of an incorrect password, and stop trying
  228. to re-enter it repeatedly.
  229. .TP
  230. .B \-h,\-\-help
  231. Display help text
  232. .TP
  233. .B \-\-http\-auth=METHODS
  234. Use only the specified methods for HTTP authentication to a server. By default,
  235. only Negotiate, NTLM and Digest authentication are enabled. Basic authentication
  236. is also supported but because it is insecure it must be explicitly enabled. The
  237. argument is a comma-separated list of methods to be enabled. Note that the order
  238. does not matter: OpenConnect will use Negotiate, NTLM, Digest and Basic
  239. authentication in that order, if each is enabled, regardless of the order
  240. specified in the METHODS string.
  241. .TP
  242. .B \-i,\-\-interface=IFNAME
  243. Use
  244. .I IFNAME
  245. for tunnel interface
  246. .TP
  247. .B \-l,\-\-syslog
  248. After tunnel is brought up, use syslog for further progress messages
  249. .TP
  250. .B \-\-timestamp
  251. Prepend a timestamp to each progress message
  252. .TP
  253. .B \-\-passtos
  254. Copy TOS / TCLASS of payload packet into DTLS and ESP packets. This is
  255. not set by default because it may leak information about the payload
  256. (for example, by differentiating voice/video traffic).
  257. .TP
  258. .B \-U,\-\-setuid=USER
  259. Drop privileges after connecting, to become user
  260. .I USER
  261. .TP
  262. .B \-\-csd\-user=USER
  263. Drop privileges during execution of trojan binary or script (CSD, TNCC, or HIP).
  264. .TP
  265. .B \-\-csd\-wrapper=SCRIPT
  266. Run
  267. .I SCRIPT
  268. instead of the trojan binary or script.
  269. .TP
  270. .B \-\-force\-trojan=INTERVAL
  271. Use
  272. .I INTERVAL
  273. as interval (in seconds) for repeat execution of Trojan binary or script, overriding default and/or
  274. server-set interval.
  275. .TP
  276. .B \-m,\-\-mtu=MTU
  277. Request
  278. .I MTU
  279. from server as the MTU of the tunnel.
  280. .TP
  281. .B \-\-base\-mtu=MTU
  282. Indicate
  283. .I MTU
  284. as the path MTU between client and server on the unencrypted network. Newer
  285. servers will automatically calculate the MTU to be used on the tunnel from
  286. this value.
  287. .TP
  288. .B \-p,\-\-key\-password=PASS [,\-\-mca\-key\-password=PASS]
  289. Provide passphrase for certificate file, or SRK (System Root Key) PIN for TPM
  290. .B \-\-mca\-key\-password
  291. provides the passphrase for the secondary certificate (see
  292. .B \-\-mca\-certificate
  293. ).
  294. .TP
  295. .B \-P,\-\-proxy=PROXYURL
  296. Use HTTP or SOCKS proxy for connection. A username and password can be provided
  297. in the given URL, and will be used for authentication. If authentication is
  298. required but no credentials are given, GSSAPI and automatic NTLM authentication
  299. using Samba's ntlm_auth helper tool may be attempted.
  300. .TP
  301. .B \-\-proxy\-auth=METHODS
  302. Use only the specified methods for HTTP authentication to a proxy. By default,
  303. only Negotiate, NTLM and Digest authentication are enabled. Basic authentication
  304. is also supported but because it is insecure it must be explicitly enabled. The
  305. argument is a comma-separated list of methods to be enabled. Note that the order
  306. does not matter: OpenConnect will use Negotiate, NTLM, Digest and Basic
  307. authentication in that order, if each is enabled, regardless of the order
  308. specified in the METHODS string.
  309. .TP
  310. .B \-\-no\-proxy
  311. Disable use of proxy
  312. .TP
  313. .B \-\-libproxy
  314. Use libproxy to configure proxy automatically (when built with libproxy support)
  315. .TP
  316. .B \-\-key\-password\-from\-fsid
  317. Passphrase for certificate file is automatically generated from the
  318. .I fsid
  319. of the file system on which it is stored. The
  320. .I fsid
  321. is obtained from the
  322. .BR statvfs (2)
  323. or
  324. .BR statfs (2)
  325. system call, depending on the operating system. On a Linux or similar system
  326. with GNU coreutils, the
  327. .I fsid
  328. used by this option should be equal to the output of the command:
  329. .EX
  330. stat \-\-file\-system \-\-printf=%i\e\en $CERTIFICATE
  331. .EE
  332. It is not the same as the 128\-bit UUID of the file system.
  333. .TP
  334. .B \-q,\-\-quiet
  335. Less output
  336. .TP
  337. .B \-Q,\-\-queue\-len=LEN
  338. Set packet queue limit to
  339. .I LEN
  340. packets. The default is 10. A high value may allow better overall bandwidth
  341. but at a cost of latency. If you run Voice over IP or other interactive
  342. traffic over the VPN, you don't want those packets to be queued behind
  343. thousands of other large packets which are part of a bulk transfer.
  344. This option sets the maximum inbound and outbound packet queue sizes
  345. in OpenConnect itself, which control how many packets will be sent and
  346. received in a single batch, as well as affecting other buffering such
  347. as the socket send buffer (SO_SNDBUF) for network connections and the
  348. OS tunnel device.
  349. Ultimately, the right size for a queue is "just enough packets that it
  350. never quite gets empty before more are pushed to it". Any higher than
  351. that is simply introducing bufferbloat and additional latency with no
  352. benefit. With the default of 10, we are able to saturate a single
  353. Gigabit Ethernet from modest hardware, which is more than enough for
  354. most VPN users.
  355. If OpenConnect is built with vhost-net support, it will only be used
  356. if the queue length is set to 16 or more. This is because vhost-net
  357. introduces a small amount of additional latency, but improves total
  358. bandwidth quite considerably for those operating at high traffic
  359. rates. Thus it makes sense to use it when the user has indicated a
  360. preference for bandwidth over latency, by increasing the queue size.
  361. .TP
  362. .B \-s,\-\-script=SCRIPT
  363. Invoke
  364. .I SCRIPT
  365. to configure the network after connection. Without this, routing and name
  366. service are unlikely to work correctly. The script is expected to be
  367. compatible with the
  368. .B vpnc\-script
  369. which is shipped with the "vpnc" VPN client. See
  370. .I https://www.infradead.org/openconnect/vpnc-script.html
  371. for more information. This version of OpenConnect is configured to
  372. use \fB@DEFAULT_VPNCSCRIPT@\fR by default.
  373. On Windows, a relative directory for the default script will be handled as
  374. starting from the directory that the openconnect executable is running from,
  375. rather than the current directory. The script will be invoked with the
  376. command-based script host \fBcscript.exe\fR.
  377. .TP
  378. .B \-S,\-\-script\-tun
  379. Pass traffic to 'script' program over a UNIX socket, instead of to a kernel
  380. tun/tap device. This allows the VPN IP traffic to be handled entirely in
  381. userspace, for example by a program which uses lwIP to provide SOCKS access
  382. into the VPN.
  383. .TP
  384. .B \-\-server=[https://]\fIHOST\fB[:\fIPORT\fB][/\fIPATH\fB]
  385. Define the VPN server as a simple
  386. .I HOST
  387. or as an URL containing the
  388. . I HOST
  389. and optionally the
  390. .I PORT
  391. number and the
  392. .IR PATH ;
  393. with some protocols, the path may function as a login group or realm,
  394. and it may equivalently be specified with
  395. .BR \-\-usergroup .
  396. As an alternative, define the VPN server as non-option command line argument.
  397. .TP
  398. .B \-u,\-\-user=NAME
  399. Set login username to
  400. .I NAME
  401. .TP
  402. .B \-V,\-\-version
  403. Report version number
  404. .TP
  405. .B \-v,\-\-verbose
  406. More output (may be specified multiple times for additional output)
  407. .TP
  408. .B \-x,\-\-xmlconfig=CONFIG
  409. XML config file
  410. .TP
  411. .B \-\-authgroup=GROUP
  412. Select GROUP from authentication dropdown or list entry.
  413. Many VPNs require a selection from a dropdown or list during the
  414. authentication process. This selection may be known as
  415. .BR authgroup
  416. (on Cisco VPNs),
  417. .BR realm
  418. (Juniper, Pulse, Fortinet),
  419. .BR domain
  420. (F5), and
  421. .BR gateway
  422. (GlobalProtect).
  423. This option attempts to automatically fill the appropriate
  424. protocol-specific field with the desired value.
  425. .TP
  426. .B \-\-authenticate
  427. Authenticate to the VPN, output the information needed to make the connection in
  428. a form which can be used to set shell environment variables, and then exit.
  429. When invoked with this option, OpenConnect will not actually create the VPN connection
  430. or configure a tunnel interface, but if successful will print something like the
  431. following to stdout:
  432. .nf
  433. .B COOKIE='3311180634@13561856@1339425499@B315A0E29D16C6FD92EE...'
  434. .B HOST='10.0.0.1'
  435. .B CONNECT_URL='https://vpnserver.example.com'
  436. .B FINGERPRINT='469bb424ec8835944d30bc77c77e8fc1d8e23a42'
  437. .B RESOLVE='vpnserver.example.com:10.0.0.1'
  438. .fi
  439. Thus, you can invoke openconnect as a non-privileged user
  440. .I (with access to the user's PKCS#11 tokens, etc.)
  441. for authentication, and then invoke openconnect separately to make the actual
  442. connection as root:
  443. .nf
  444. .B eval `openconnect --authenticate https://vpnserver.example.com`;
  445. .B [ -n \fR["$COOKIE"\fR] ] && echo \fR["$COOKIE"\fR] |
  446. .B \ \ sudo openconnect --cookie-on-stdin $CONNECT_URL --servercert $FINGERPRINT --resolve $RESOLVE
  447. .fi
  448. Earlier versions of OpenConnect produced only the
  449. .B HOST
  450. variable (containing the numeric server address), and not the
  451. .B CONNECT_URL
  452. or
  453. .B RESOLVE
  454. variables. Subsequently, we discovered that servers behind proxies may not respond
  455. correctly unless the correct DNS name is present in the connection phase, and we
  456. added support for VPN protocols where the server URL's
  457. .I path
  458. component may be significant in the connection phase, prompting the addition of
  459. .B CONNECT_URL
  460. and
  461. .BR RESOLVE ,
  462. and the recommendation to use them as described above.
  463. If you are not certain that you are invoking a newer version of OpenConnect which outputs
  464. these variables, use the following command-line (compatible with most Bourne shell derivatives)
  465. which will work with either a newer or older version:
  466. .nf
  467. .B sudo openconnect --cookie-on-stdin ${CONNECT_URL:-$HOST} --servercert $FINGERPRINT ${RESOLVE:+--resolve=$RESOLVE}
  468. .fi
  469. .TP
  470. .B \-\-cookieonly
  471. Fetch and print cookie only; don't connect (this is essentially a subset of
  472. .BR \-\-authenticate ).
  473. .TP
  474. .B \-\-printcookie
  475. Print cookie to stdout before connecting (see
  476. .B \-\-authenticate
  477. for the meaning of this cookie)
  478. .TP
  479. .B \-\-cafile=FILE
  480. Additional CA file for server verification. By default, this simply
  481. causes OpenConnect to trust additional root CA certificate(s) in
  482. addition to those trusted by the system. Use
  483. .B \-\-no\-system\-trust
  484. to prevent OpenConnect from trusting the system default certificate
  485. authorities.
  486. .TP
  487. .B \-\-no\-system\-trust
  488. Do not trust the system default certificate authorities. If this option is
  489. given, only certificate authorities given with the
  490. .B \-\-cafile
  491. option, if any, will be trusted automatically.
  492. .TP
  493. .B \-\-disable\-ipv6
  494. Do not advertise IPv6 capability to server
  495. .TP
  496. .B \-\-dtls\-ciphers=LIST
  497. Set OpenSSL ciphers to support for DTLS
  498. .TP
  499. .B \-\-dtls12\-ciphers=LIST
  500. Set OpenSSL ciphers for Cisco's DTLS v1.2
  501. .TP
  502. .B \-\-dtls\-local\-port=PORT
  503. Use
  504. .I PORT
  505. as the local port for DTLS and UDP datagrams
  506. .TP
  507. .B \-\-dump\-http\-traffic
  508. Enable verbose output of all HTTP requests and the bodies of all responses
  509. received from the server.
  510. .TP
  511. .B \-\-pfs
  512. Enforces Perfect Forward Secrecy (PFS). That ensures that if the server's
  513. long-term key is compromised, any session keys established before the compromise
  514. will be unaffected. If this option is provided and the server does not support PFS
  515. in the TLS channel the connection will fail.
  516. PFS is available in Cisco ASA releases 9.1(2) and higher; a suitable cipher
  517. suite may need to be manually enabled by the administrator using the
  518. .B ssl encryption
  519. setting.
  520. .TP
  521. .B \-\-no\-dtls
  522. Disable DTLS and ESP
  523. .TP
  524. .B \-\-no\-http\-keepalive
  525. Version 8.2.2.5 of the Cisco ASA software has a bug where it will forget
  526. the client's SSL certificate when HTTP connections are being re\-used for
  527. multiple requests. So far, this has only been seen on the initial connection,
  528. where the server gives an HTTP/1.0 redirect response with an explicit
  529. .B Connection: Keep\-Alive
  530. directive. OpenConnect as of v2.22 has an unconditional workaround for this,
  531. which is never to obey that directive after an HTTP/1.0 response.
  532. However, Cisco's support team has failed to give any competent
  533. response to the bug report and we don't know under what other
  534. circumstances their bug might manifest itself. So this option exists
  535. to disable ALL re\-use of HTTP sessions and cause a new connection to be
  536. made for each request. If your server seems not to be recognizing your
  537. certificate, try this option. If it makes a difference, please report
  538. this information to the
  539. .B openconnect\-devel@lists.infradead.org
  540. mailing list.
  541. .TP
  542. .B \-\-no\-passwd
  543. Never attempt password (or SecurID) authentication.
  544. .TP
  545. .B \-\-no\-xmlpost
  546. Do not attempt to post an XML authentication/configuration request to the
  547. server; use the old style GET method which was used by older clients and
  548. servers instead.
  549. This option is a temporary safety net, to work around potential
  550. compatibility issues with the code which falls back to the old method
  551. automatically. It causes OpenConnect to behave more like older
  552. versions (4.08 and below) did. If you find that you need to use this
  553. option, then you have found a bug in OpenConnect. Please see
  554. https://www.infradead.org/openconnect/mail.html and report this to the
  555. developers.
  556. .TP
  557. .B \-\-allow\-insecure\-crypto
  558. The ancient, broken 3DES and RC4 ciphers are insecure; we explicitly
  559. disable them by default. However, some still-in-use VPN servers can't do
  560. any better.
  561. This option enables use of these insecure ciphers, as well as the use
  562. of SHA1 for server certificate validation.
  563. .TP
  564. .B \-\-non\-inter
  565. Do not expect user input; exit if it is required.
  566. .TP
  567. .B \-\-passwd\-on\-stdin
  568. Read password from standard input
  569. .TP
  570. .B \-\-protocol=PROTO
  571. Select VPN protocol
  572. .I PROTO
  573. to be used for the connection. Supported protocols are
  574. .I anyconnect
  575. for Cisco AnyConnect (the default),
  576. .I nc
  577. for experimental support for Juniper Network Connect (also supported
  578. by most Junos Pulse servers),
  579. .I pulse
  580. for experimental support for Junos Pulse,
  581. .I gp
  582. for experimental support for PAN GlobalProtect,
  583. .I f5
  584. for experimental support for F5 Big-IP,
  585. .I fortinet
  586. for experimental support for Fortinet Fortigate, and
  587. .I array
  588. for experimental support for Array Networks SSL VPN.
  589. See
  590. .I https://www.infradead.org/openconnect/protocols.html
  591. for details on features and deficiencies of the individual
  592. protocols.
  593. OpenConnect does not yet support all of the authentication options used
  594. by Pulse, nor does it support Host Checker/TNCC with Pulse. If your
  595. Junos Pulse VPN is not yet supported with
  596. .BR \-\-protocol=pulse ,
  597. then
  598. .B \-\-protocol=nc
  599. may be a useful fallback option.
  600. .TP
  601. .B \-\-token\-mode=MODE
  602. Enable one-time password generation using the
  603. .I MODE
  604. algorithm.
  605. .B \-\-token\-mode=rsa
  606. will call libstoken to generate an RSA SecurID tokencode,
  607. .B \-\-token\-mode=totp
  608. will call liboath to generate an RFC 6238 time-based password, and
  609. .B \-\-token\-mode=hotp
  610. will call liboath to generate an RFC 4226 HMAC-based password. Yubikey
  611. tokens which generate OATH codes in hardware are supported with
  612. .B \-\-token\-mode=yubioath. \-\-token\-mode=oidc will use the provided
  613. OpenIDConnect token as an RFC 6750 bearer token.
  614. .TP
  615. .B \-\-token\-secret={ SECRET[,COUNTER] | @FILENAME }
  616. The secret to use when generating one-time passwords/verification codes.
  617. Base 32-encoded TOTP/HOTP secrets can be used by specifying "base32:" at the
  618. beginning of the secret, and for HOTP secrets the token counter can be
  619. specified following a comma.
  620. RSA SecurID secrets can be specified as an Android/iPhone URI or a raw numeric
  621. CTF string (with or without dashes).
  622. For Yubikey OATH the token secret specifies the name of the credential to be
  623. used. If not provided, the first OATH credential found on the device will be
  624. used.
  625. For OIDC the secret is the bearer token to be used.
  626. .IR FILENAME ,
  627. if specified, can contain any of the above strings. Or, it can contain a
  628. SecurID XML (SDTID) seed.
  629. If this option is omitted, and \-\-token\-mode is
  630. "rsa", libstoken will try to use the software token seed saved in
  631. .B ~/.stokenrc
  632. by the "stoken import" command.
  633. .TP
  634. .B \-\-reconnect\-timeout=SECONDS
  635. After disconnection or Dead Peer Detection, keep trying to reconnect for
  636. .IR SECONDS .
  637. The default is 300 seconds, which means that
  638. openconnect can recover a VPN connection after a temporary network outage
  639. lasting up to 300 seconds.
  640. .TP
  641. .B \-\-resolve=HOST:IP
  642. Automatically resolve the hostname
  643. .IR HOST
  644. to
  645. .IR IP
  646. instead of using the normal resolver to look it up.
  647. .TP
  648. .B \-\-servercert=HASH
  649. Accept server's SSL certificate only if it matches the provided fingerprint.
  650. This option implies
  651. .BR \-\-no\-system\-trust ,
  652. and may be specified multiple times in order to accept multiple possible
  653. fingerprints.
  654. The allowed fingerprint types are
  655. .IR SHA1 ,
  656. .IR SHA256 ,
  657. and
  658. .IR PIN-SHA256 .
  659. They are distinguished by the 'sha1:', 'sha256:' and 'pin-sha256:' prefixes to the
  660. encoded hash. The first two are custom identifiers providing hex
  661. encoding of the peer's public key, while 'pin-sha256:' is the RFC7469 key
  662. PIN, which utilizes base64 encoding. To ease certain
  663. testing use-cases, a partial match of the hash will also
  664. be accepted, if it is at least 4 characters past the prefix.
  665. .TP
  666. .B \-\-useragent=STRING
  667. Use
  668. .I STRING
  669. as 'User\-Agent:' field value in HTTP header.
  670. (e.g. \-\-useragent 'Cisco AnyConnect VPN Agent for Windows 2.2.0133')
  671. .TP
  672. .B \-\-version\-string=STRING
  673. Use
  674. .I STRING
  675. as the software version reported to the head end.
  676. (e.g. \-\-version\-string '2.2.0133')
  677. .TP
  678. .B \-\-local\-hostname=STRING
  679. Use
  680. .I STRING
  681. as 'X\-CSTP\-Hostname:' field value in HTTP header. For example \-\-local\-hostname 'mypc',
  682. will advertise the value 'mypc' as the suggested hostname to point to the provided IP address.
  683. .TP
  684. .B \-\-os=STRING
  685. OS type to report to gateway. Recognized values are:
  686. .BR linux ,
  687. .BR linux\-64 ,
  688. .BR win ,
  689. .BR mac\-intel ,
  690. .BR android ,
  691. .BR apple\-ios .
  692. Reporting a different OS type may affect the dynamic access policy (DAP)
  693. applied to the VPN session. If the gateway requires CSD, it will also cause
  694. the corresponding CSD trojan binary to be downloaded, so you may need to use
  695. .B \-\-csd\-wrapper
  696. if this code is not executable on the local machine.
  697. .SH SIGNALS
  698. In the data phase of the connection, the following signals are handled:
  699. .TP
  700. .B SIGINT / SIGTERM
  701. performs a clean shutdown by logging the session off, disconnecting from the
  702. gateway, and running the vpnc\-script to restore the network configuration.
  703. .TP
  704. .B SIGHUP
  705. disconnects from the gateway and runs the vpnc\-script, but does not log the
  706. session off; this allows for reconnection later using
  707. .BR \-\-cookie .
  708. .TP
  709. .B SIGUSR1
  710. writes progress message with detailed connection information and statistics.
  711. .TP
  712. .B SIGUSR2
  713. forces an immediate disconnection and reconnection; this can be used to
  714. quickly recover from LAN IP address changes.
  715. .TP
  716. .SH LIMITATIONS
  717. Note that although IPv6 has been tested on all platforms on which
  718. .B openconnect
  719. is known to run, it depends on a suitable
  720. .B vpnc\-script
  721. to configure the network. The standard
  722. .B vpnc\-script
  723. shipped with vpnc 0.5.3 is not capable of setting up IPv6 routes; the one from
  724. .B https://gitlab.com/openconnect/vpnc\-scripts
  725. will be required.
  726. .SH SEE ALSO
  727. .BR ocserv (8)
  728. .SH AUTHORS
  729. David Woodhouse <dwmw2@infradead.org>