openconnect.8.in 25 KB

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