byghis

openvpn --help

Jul 15th, 2011
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.10 KB | None | 0 0
  1. edward@jaku:/etc/openvpn$ openvpn --help
  2. OpenVPN 2.1.0 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jul 20 2010
  3.  
  4. General Options:
  5. --config file : Read configuration options from file.
  6. --help : Show options.
  7. --version : Show copyright and version information.
  8.  
  9. Tunnel Options:
  10. --local host : Local host name or ip address. Implies --bind.
  11. --remote host [port] : Remote host name or ip address.
  12. --remote-random : If multiple --remote options specified, choose one randomly.
  13. --remote-random-hostname : Add a random string to remote DNS name.
  14. --mode m : Major mode, m = 'p2p' (default, point-to-point) or 'server'.
  15. --proto p : Use protocol p for communicating with peer.
  16. p = udp (default), tcp-server, or tcp-client
  17. p = udp6, tcp6-server, or tcp6-client (ipv6)
  18. --connect-retry n : For --proto tcp-client, number of seconds to wait
  19. between connection retries (default=5).
  20. --connect-timeout n : For --proto tcp-client, connection timeout (in seconds).
  21. --connect-retry-max n : Maximum connection attempt retries, default infinite.
  22. --auto-proxy : Try to sense proxy settings (or lack thereof) automatically.
  23. --http-proxy s p [up] [auth] : Connect to remote host
  24. through an HTTP proxy at address s and port p.
  25. If proxy authentication is required,
  26. up is a file containing username/password on 2 lines, or
  27. 'stdin' to prompt from console. Add auth='ntlm' if
  28. the proxy requires NTLM authentication.
  29. --http-proxy s p 'auto': Like the above directive, but automatically determine
  30. auth method and query for username/password if needed.
  31. --http-proxy-retry : Retry indefinitely on HTTP proxy errors.
  32. --http-proxy-timeout n : Proxy timeout in seconds, default=5.
  33. --http-proxy-option type [parm] : Set extended HTTP proxy options.
  34. Repeat to set multiple options.
  35. VERSION version (default=1.0)
  36. AGENT user-agent
  37. --socks-proxy s [p]: Connect to remote host through a Socks5 proxy at address
  38. s and port p (default port = 1080).
  39. --socks-proxy-retry : Retry indefinitely on Socks proxy errors.
  40. --resolv-retry n: If hostname resolve fails for --remote, retry
  41. resolve for n seconds before failing (disabled by default).
  42. Set n="infinite" to retry indefinitely.
  43. --float : Allow remote to change its IP address/port, such as through
  44. DHCP (this is the default if --remote is not used).
  45. --ipchange cmd : Execute shell command cmd on remote ip address initial
  46. setting or change -- execute as: cmd ip-address port#
  47. --port port : TCP/UDP port # for both local and remote.
  48. --lport port : TCP/UDP port # for local (default=1194). Implies --bind.
  49. --rport port : TCP/UDP port # for remote (default=1194).
  50. --bind : Bind to local address and port. (This is the default unless
  51. --proto tcp-client or --http-proxy or --socks-proxy is used).
  52. --nobind : Do not bind to local address and port.
  53. --dev tunX|tapX : tun/tap device (X can be omitted for dynamic device.
  54. --dev-type dt : Which device type are we using? (dt = tun or tap) Use
  55. this option only if the tun/tap device used with --dev
  56. does not begin with "tun" or "tap".
  57. --dev-node node : Explicitly set the device node rather than using
  58. /dev/net/tun, /dev/tun, /dev/tap, etc.
  59. --lladdr hw : Set the link layer address of the tap device.
  60. --topology t : Set --dev tun topology: 'net30', 'p2p', or 'subnet'.
  61. --tun-ipv6 : Build tun link capable of forwarding IPv6 traffic.
  62. --ifconfig l rn : TUN: configure device to use IP address l as a local
  63. endpoint and rn as a remote endpoint. l & rn should be
  64. swapped on the other peer. l & rn must be private
  65. addresses outside of the subnets used by either peer.
  66. TAP: configure device to use IP address l as a local
  67. endpoint and rn as a subnet mask.
  68. --ifconfig-noexec : Don't actually execute ifconfig/netsh command, instead
  69. pass --ifconfig parms by environment to scripts.
  70. --ifconfig-nowarn : Don't warn if the --ifconfig option on this side of the
  71. connection doesn't match the remote side.
  72. --route network [netmask] [gateway] [metric] :
  73. Add route to routing table after connection
  74. is established. Multiple routes can be specified.
  75. netmask default: 255.255.255.255
  76. gateway default: taken from --route-gateway or --ifconfig
  77. Specify default by leaving blank or setting to "nil".
  78. --max-routes n : Specify the maximum number of routes that may be defined
  79. or pulled from a server.
  80. --route-gateway gw|'dhcp' : Specify a default gateway for use with --route.
  81. --route-metric m : Specify a default metric for use with --route.
  82. --route-delay n [w] : Delay n seconds after connection initiation before
  83. adding routes (may be 0). If not specified, routes will
  84. be added immediately after tun/tap open. On Windows, wait
  85. up to w seconds for TUN/TAP adapter to come up.
  86. --route-up cmd : Execute shell cmd after routes are added.
  87. --route-noexec : Don't add routes automatically. Instead pass routes to
  88. --route-up script using environmental variables.
  89. --route-nopull : When used with --client or --pull, accept options pushed
  90. by server EXCEPT for routes.
  91. --allow-pull-fqdn : Allow client to pull DNS names from server for
  92. --ifconfig, --route, and --route-gateway.
  93. --redirect-gateway [flags]: Automatically execute routing
  94. commands to redirect all outgoing IP traffic through the
  95. VPN. Add 'local' flag if both OpenVPN servers are directly
  96. connected via a common subnet, such as with WiFi.
  97. Add 'def1' flag to set default route using using 0.0.0.0/1
  98. and 128.0.0.0/1 rather than 0.0.0.0/0. Add 'bypass-dhcp'
  99. flag to add a direct route to DHCP server, bypassing tunnel.
  100. Add 'bypass-dns' flag to similarly bypass tunnel for DNS.
  101. --redirect-private [flags]: Like --redirect-gateway, but omit actually changing
  102. the default gateway. Useful when pushing private subnets.
  103. --setenv name value : Set a custom environmental variable to pass to script.
  104. --setenv FORWARD_COMPATIBLE 1 : Relax config file syntax checking to allow
  105. directives for future OpenVPN versions to be ignored.
  106. --script-security level mode : mode='execve' (default) or 'system', level=
  107. 0 -- strictly no calling of external programs
  108. 1 -- (default) only call built-ins such as ifconfig
  109. 2 -- allow calling of built-ins and scripts
  110. 3 -- allow password to be passed to scripts via env
  111. --shaper n : Restrict output to peer to n bytes per second.
  112. --keepalive n m : Helper option for setting timeouts in server mode. Send
  113. ping once every n seconds, restart if ping not received
  114. for m seconds.
  115. --inactive n [bytes] : Exit after n seconds of activity on tun/tap device
  116. produces a combined in/out byte count < bytes.
  117. --ping-exit n : Exit if n seconds pass without reception of remote ping.
  118. --ping-restart n: Restart if n seconds pass without reception of remote ping.
  119. --ping-timer-rem: Run the --ping-exit/--ping-restart timer only if we have a
  120. remote address.
  121. --ping n : Ping remote once every n seconds over TCP/UDP port.
  122. --multihome : Configure a multi-homed UDP server.
  123. --fast-io : (experimental) Optimize TUN/TAP/UDP writes.
  124. --remap-usr1 s : On SIGUSR1 signals, remap signal (s='SIGHUP' or 'SIGTERM').
  125. --persist-tun : Keep tun/tap device open across SIGUSR1 or --ping-restart.
  126. --persist-remote-ip : Keep remote IP address across SIGUSR1 or --ping-restart.
  127. --persist-local-ip : Keep local IP address across SIGUSR1 or --ping-restart.
  128. --persist-key : Don't re-read key files across SIGUSR1 or --ping-restart.
  129. --passtos : TOS passthrough (applies to IPv4 only).
  130. --tun-mtu n : Take the tun/tap device MTU to be n and derive the
  131. TCP/UDP MTU from it (default=1500).
  132. --tun-mtu-extra n : Assume that tun/tap device might return as many
  133. as n bytes more than the tun-mtu size on read
  134. (default TUN=0 TAP=32).
  135. --link-mtu n : Take the TCP/UDP device MTU to be n and derive the tun MTU
  136. from it.
  137. --mtu-disc type : Should we do Path MTU discovery on TCP/UDP channel?
  138. 'no' -- Never send DF (Don't Fragment) frames
  139. 'maybe' -- Use per-route hints
  140. 'yes' -- Always DF (Don't Fragment)
  141. --mtu-test : Empirically measure and report MTU.
  142. --fragment max : Enable internal datagram fragmentation so that no UDP
  143. datagrams are sent which are larger than max bytes.
  144. Adds 4 bytes of overhead per datagram.
  145. --mssfix [n] : Set upper bound on TCP MSS, default = tun-mtu size
  146. or --fragment max value, whichever is lower.
  147. --sndbuf size : Set the TCP/UDP send buffer size.
  148. --rcvbuf size : Set the TCP/UDP receive buffer size.
  149. --txqueuelen n : Set the tun/tap TX queue length to n (Linux only).
  150. --mlock : Disable Paging -- ensures key material and tunnel
  151. data will never be written to disk.
  152. --up cmd : Shell cmd to execute after successful tun device open.
  153. Execute as: cmd tun/tap-dev tun-mtu link-mtu \
  154. ifconfig-local-ip ifconfig-remote-ip
  155. (pre --user or --group UID/GID change)
  156. --up-delay : Delay tun/tap open and possible --up script execution
  157. until after TCP/UDP connection establishment with peer.
  158. --down cmd : Shell cmd to run after tun device close.
  159. (post --user/--group UID/GID change and/or --chroot)
  160. (script parameters are same as --up option)
  161. --down-pre : Call --down cmd/script before TUN/TAP close.
  162. --up-restart : Run up/down scripts for all restarts including those
  163. caused by --ping-restart or SIGUSR1
  164. --user user : Set UID to user after initialization.
  165. --group group : Set GID to group after initialization.
  166. --chroot dir : Chroot to this directory after initialization.
  167. --cd dir : Change to this directory before initialization.
  168. --daemon [name] : Become a daemon after initialization.
  169. The optional 'name' parameter will be passed
  170. as the program name to the system logger.
  171. --syslog [name] : Output to syslog, but do not become a daemon.
  172. See --daemon above for a description of the 'name' parm.
  173. --inetd [name] ['wait'|'nowait'] : Run as an inetd or xinetd server.
  174. See --daemon above for a description of the 'name' parm.
  175. --log file : Output log to file which is created/truncated on open.
  176. --log-append file : Append log to file, or create file if nonexistent.
  177. --suppress-timestamps : Don't log timestamps to stdout/stderr.
  178. --writepid file : Write main process ID to file.
  179. --nice n : Change process priority (>0 = lower, <0 = higher).
  180. --echo [parms ...] : Echo parameters to log output.
  181. --verb n : Set output verbosity to n (default=1):
  182. (Level 3 is recommended if you want a good summary
  183. of what's happening without being swamped by output).
  184. : 0 -- no output except fatal errors
  185. : 1 -- startup info + connection initiated messages +
  186. non-fatal encryption & net errors
  187. : 2,3 -- show TLS negotiations & route info
  188. : 4 -- show parameters
  189. : 5 -- show 'RrWw' chars on console for each packet sent
  190. and received from TCP/UDP (caps) or tun/tap (lc)
  191. : 6 to 11 -- debug messages of increasing verbosity
  192. --mute n : Log at most n consecutive messages in the same category.
  193. --status file n : Write operational status to file every n seconds.
  194. --status-version [n] : Choose the status file format version number.
  195. Currently, n can be 1, 2, or 3 (default=1).
  196. --disable-occ : Disable options consistency check between peers.
  197. --gremlin mask : Special stress testing mode (for debugging only).
  198. --comp-lzo : Use fast LZO compression -- may add up to 1 byte per
  199. packet for uncompressible data.
  200. --comp-noadapt : Don't use adaptive compression when --comp-lzo
  201. is specified.
  202. --management ip port [pass] : Enable a TCP server on ip:port to handle
  203. management functions. pass is a password file
  204. or 'stdin' to prompt from console.
  205. To listen on a unix domain socket, specific the pathname
  206. in place of ip and use 'unix' as the port number.
  207. --management-client : Management interface will connect as a TCP client to
  208. ip/port rather than listen as a TCP server.
  209. --management-query-passwords : Query management channel for private key
  210. and auth-user-pass passwords.
  211. --management-hold : Start OpenVPN in a hibernating state, until a client
  212. of the management interface explicitly starts it.
  213. --management-signal : Issue SIGUSR1 when management disconnect event occurs.
  214. --management-forget-disconnect : Forget passwords when management disconnect
  215. event occurs.
  216. --management-log-cache n : Cache n lines of log file history for usage
  217. by the management channel.
  218. --management-client-user u : When management interface is a unix socket, only
  219. allow connections from user u.
  220. --management-client-group g : When management interface is a unix socket, only
  221. allow connections from group g.
  222. --management-client-auth : gives management interface client the responsibility
  223. to authenticate clients after their client certificate
  224. has been verified.
  225. --management-client-pf : management interface clients must specify a packet
  226. filter file for each connecting client.
  227. --plugin m [str]: Load plug-in module m passing str as an argument
  228. to its initialization function.
  229.  
  230. Multi-Client Server options (when --mode server is used):
  231. --server network netmask : Helper option to easily configure server mode.
  232. --server-bridge [IP netmask pool-start-IP pool-end-IP] : Helper option to
  233. easily configure ethernet bridging server mode.
  234. --push "option" : Push a config file option back to the peer for remote
  235. execution. Peer must specify --pull in its config file.
  236. --push-reset : Don't inherit global push list for specific
  237. client instance.
  238. --ifconfig-pool start-IP end-IP [netmask] : Set aside a pool of subnets
  239. to be dynamically allocated to connecting clients.
  240. --ifconfig-pool-linear : Use individual addresses rather than /30 subnets
  241. in tun mode. Not compatible with Windows clients.
  242. --ifconfig-pool-persist file [seconds] : Persist/unpersist ifconfig-pool
  243. data to file, at seconds intervals (default=600).
  244. If seconds=0, file will be treated as read-only.
  245. --ifconfig-push local remote-netmask : Push an ifconfig option to remote,
  246. overrides --ifconfig-pool dynamic allocation.
  247. Only valid in a client-specific config file.
  248. --iroute network [netmask] : Route subnet to client.
  249. Sets up internal routes only.
  250. Only valid in a client-specific config file.
  251. --disable : Client is disabled.
  252. Only valid in a client-specific config file.
  253. --client-cert-not-required : Don't require client certificate, client
  254. will authenticate using username/password.
  255. --username-as-common-name : For auth-user-pass authentication, use
  256. the authenticated username as the common name,
  257. rather than the common name from the client cert.
  258. --auth-user-pass-verify cmd method: Query client for username/password and
  259. run script cmd to verify. If method='via-env', pass
  260. user/pass via environment, if method='via-file', pass
  261. user/pass via temporary file.
  262. --opt-verify : Clients that connect with options that are incompatible
  263. with those of the server will be disconnected.
  264. --auth-user-pass-optional : Allow connections by clients that don't
  265. specify a username/password.
  266. --no-name-remapping : Allow Common Name and X509 Subject to include
  267. any printable character.
  268. --client-to-client : Internally route client-to-client traffic.
  269. --duplicate-cn : Allow multiple clients with the same common name to
  270. concurrently connect.
  271. --client-connect cmd : Run script cmd on client connection.
  272. --client-disconnect cmd : Run script cmd on client disconnection.
  273. --client-config-dir dir : Directory for custom client config files.
  274. --ccd-exclusive : Refuse connection unless custom client config is found.
  275. --tmp-dir dir : Temporary directory, used for --client-connect return file.
  276. --hash-size r v : Set the size of the real address hash table to r and the
  277. virtual address table to v.
  278. --bcast-buffers n : Allocate n broadcast buffers.
  279. --tcp-queue-limit n : Maximum number of queued TCP output packets.
  280. --tcp-nodelay : Macro that sets TCP_NODELAY socket flag on the server
  281. as well as pushes it to connecting clients.
  282. --learn-address cmd : Run script cmd to validate client virtual addresses.
  283. --connect-freq n s : Allow a maximum of n new connections per s seconds.
  284. --max-clients n : Allow a maximum of n simultaneously connected clients.
  285. --max-routes-per-client n : Allow a maximum of n internal routes per client.
  286. --port-share host port : When run in TCP mode, proxy incoming HTTPS sessions
  287. to a web server at host:port.
  288.  
  289. Client options (when connecting to a multi-client server):
  290. --client : Helper option to easily configure client mode.
  291. --auth-user-pass [up] : Authenticate with server using username/password.
  292. up is a file containing username/password on 2 lines,
  293. or omit to prompt from console.
  294. --pull : Accept certain config file options from the peer as if they
  295. were part of the local config file. Must be specified
  296. when connecting to a '--mode server' remote host.
  297. --auth-retry t : How to handle auth failures. Set t to
  298. none (default), interact, or nointeract.
  299. --server-poll-timeout n : when polling possible remote servers to connect to
  300. in a round-robin fashion, spend no more than n seconds
  301. waiting for a response before trying the next server.
  302. --explicit-exit-notify [n] : On exit/restart, send exit signal to
  303. server/remote. n = # of retries, default=1.
  304.  
  305. Data Channel Encryption Options (must be compatible between peers):
  306. (These options are meaningful for both Static Key & TLS-mode)
  307. --secret f [d] : Enable Static Key encryption mode (non-TLS).
  308. Use shared secret file f, generate with --genkey.
  309. The optional d parameter controls key directionality.
  310. If d is specified, use separate keys for each
  311. direction, set d=0 on one side of the connection,
  312. and d=1 on the other side.
  313. --auth alg : Authenticate packets with HMAC using message
  314. digest algorithm alg (default=SHA1).
  315. (usually adds 16 or 20 bytes per packet)
  316. Set alg=none to disable authentication.
  317. --cipher alg : Encrypt packets with cipher algorithm alg
  318. (default=BF-CBC).
  319. Set alg=none to disable encryption.
  320. --prng alg [nsl] : For PRNG, use digest algorithm alg, and
  321. nonce_secret_len=nsl. Set alg=none to disable PRNG.
  322. --keysize n : Size of cipher key in bits (optional).
  323. If unspecified, defaults to cipher-specific default.
  324. --engine [name] : Enable OpenSSL hardware crypto engine functionality.
  325. --no-replay : Disable replay protection.
  326. --mute-replay-warnings : Silence the output of replay warnings to log file.
  327. --replay-window n [t] : Use a replay protection sliding window of size n
  328. and a time window of t seconds.
  329. Default n=64 t=15
  330. --no-iv : Disable cipher IV -- only allowed with CBC mode ciphers.
  331. --replay-persist file : Persist replay-protection state across sessions
  332. using file.
  333. --test-crypto : Run a self-test of crypto features enabled.
  334. For debugging only.
  335.  
  336. TLS Key Negotiation Options:
  337. (These options are meaningful only for TLS-mode)
  338. --tls-server : Enable TLS and assume server role during TLS handshake.
  339. --tls-client : Enable TLS and assume client role during TLS handshake.
  340. --key-method m : Data channel key exchange method. m should be a method
  341. number, such as 1 (default), 2, etc.
  342. --ca file : Certificate authority file in .pem format containing
  343. root certificate.
  344. --capath dir : A directory of trusted certificates (CAs and CRLs).
  345. --dh file : File containing Diffie Hellman parameters
  346. in .pem format (for --tls-server only).
  347. Use "openssl dhparam -out dh1024.pem 1024" to generate.
  348. --cert file : Local certificate in .pem format -- must be signed
  349. by a Certificate Authority in --ca file.
  350. --key file : Local private key in .pem format.
  351. --pkcs12 file : PKCS#12 file containing local private key, local certificate
  352. and optionally the root CA certificate.
  353. --tls-cipher l : A list l of allowable TLS ciphers separated by : (optional).
  354. : Use --show-tls to see a list of supported TLS ciphers.
  355. --tls-timeout n : Packet retransmit timeout on TLS control channel
  356. if no ACK from remote within n seconds (default=2).
  357. --reneg-bytes n : Renegotiate data chan. key after n bytes sent and recvd.
  358. --reneg-pkts n : Renegotiate data chan. key after n packets sent and recvd.
  359. --reneg-sec n : Renegotiate data chan. key after n seconds (default=3600).
  360. --hand-window n : Data channel key exchange must finalize within n seconds
  361. of handshake initiation by any peer (default=60).
  362. --tran-window n : Transition window -- old key can live this many seconds
  363. after new key renegotiation begins (default=3600).
  364. --single-session: Allow only one session (reset state on restart).
  365. --tls-exit : Exit on TLS negotiation failure.
  366. --tls-auth f [d]: Add an additional layer of authentication on top of the TLS
  367. control channel to protect against DoS attacks.
  368. f (required) is a shared-secret passphrase file.
  369. The optional d parameter controls key directionality,
  370. see --secret option for more info.
  371. --askpass [file]: Get PEM password from controlling tty before we daemonize.
  372. --auth-nocache : Don't cache --askpass or --auth-user-pass passwords.
  373. --crl-verify crl: Check peer certificate against a CRL.
  374. --tls-verify cmd: Execute shell command cmd to verify the X509 name of a
  375. pending TLS connection that has otherwise passed all other
  376. tests of certification. cmd should return 0 to allow
  377. TLS handshake to proceed, or 1 to fail. (cmd is
  378. executed as 'cmd certificate_depth X509_NAME_oneline')
  379. --tls-remote x509name: Accept connections only from a host with X509 name
  380. x509name. The remote host must also pass all other tests
  381. of verification.
  382. --ns-cert-type t: Require that peer certificate was signed with an explicit
  383. nsCertType designation t = 'client' | 'server'.
  384. --remote-cert-ku v ... : Require that the peer certificate was signed with
  385. explicit key usage, you can specify more than one value.
  386. value should be given in hex format.
  387. --remote-cert-eku oid : Require that the peer certificate was signed with
  388. explicit extended key usage. Extended key usage can be encoded
  389. as an object identifier or OpenSSL string representation.
  390. --remote-cert-tls t: Require that peer certificate was signed with explicit
  391. key usage and extended key usage based on RFC3280 TLS rules.
  392. t = 'client' | 'server'.
  393.  
  394. PKCS#11 Options:
  395. --pkcs11-providers provider ... : PKCS#11 provider to load.
  396. --pkcs11-protected-authentication [0|1] ... : Use PKCS#11 protected authentication
  397. path. Set for each provider.
  398. --pkcs11-private-mode hex ... : PKCS#11 private key mode mask.
  399. 0 : Try to determind automatically (default).
  400. 1 : Use Sign.
  401. 2 : Use SignRecover.
  402. 4 : Use Decrypt.
  403. 8 : Use Unwrap.
  404. --pkcs11-cert-private [0|1] ... : Set if login should be performed before
  405. certificate can be accessed. Set for each provider.
  406. --pkcs11-pin-cache seconds : Number of seconds to cache PIN. The default is -1
  407. cache until token is removed.
  408. --pkcs11-id-management : Acquire identity from management interface.
  409. --pkcs11-id serialized-id 'id' : Identity to use, get using standalone --show-pkcs11-ids
  410.  
  411. SSL Library information:
  412. --show-ciphers : Show cipher algorithms to use with --cipher option.
  413. --show-digests : Show message digest algorithms to use with --auth option.
  414. --show-engines : Show hardware crypto accelerator engines (if available).
  415. --show-tls : Show all TLS ciphers (TLS used only as a control channel).
  416.  
  417. Generate a random key (only for non-TLS static key encryption mode):
  418. --genkey : Generate a random key to be used as a shared secret,
  419. for use with the --secret option.
  420. --secret file : Write key to file.
  421.  
  422. Tun/tap config mode (available with linux 2.4+):
  423. --mktun : Create a persistent tunnel.
  424. --rmtun : Remove a persistent tunnel.
  425. --dev tunX|tapX : tun/tap device
  426. --dev-type dt : Device type. See tunnel options above for details.
  427. --user user : User to set privilege to.
  428. --group group : Group to set privilege to.
  429.  
  430. PKCS#11 standalone options:
  431. --show-pkcs11-ids provider [cert_private] : Show PKCS#11 available ids.
  432. --verb option can be added *BEFORE* this.
  433. edward@jaku:/etc/openvpn$
Advertisement
Add Comment
Please, Sign In to add comment