Browse code

doc/man: convert openvpn.8 to split-up .rst files

To avoid keeping around a full-size openvpn.rst file which is never
needed but will take space in the repo forever, patches 01...04
of the big documentation overhaul projects were squashed togehter,
keeping the individual commit logs and URL references below.

Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is a combination of 4 commits.
* This is the 1st commit message:

doc/man: Add an .rst formatted version of the man page

This is the first step to move away from a manually editing g/nroff
encoded man page.

Some modifications was needed to ensure formatting was consistent and
rendered reasonably okay in GitHub and that the generated man page
(using rst2man) is looking as a proper man page. Unsupported options
has also been moved into its own section. HTML rendering directly
using rst2html has also been used to validate the conversion.

The rst2man and rst2html utilities comes from the python-docutils
project: https://docutils.sourceforge.io/

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-2-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063370/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #2:

doc/man: Replace old man page with generated man page

The doc/openvpn.8 and doc/openvpn.8.html files are now being removed
from the git tree, as it will be generated from the doc/openvpn.8.rst
file using python-docutils.

An additional dist-hook is added so these files are generated
automatically when source tarballs are generated for releases. This
means users compiling directly from the source tarball will not need
python-docutils installed.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-3-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063373/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #3:

doc/man: Split up and reorganize main man page

The openvpn.8.rst file is quite long and hard to edit, as it covers
several hundred options. Some options were even documented multiple
places. The example has also received some attention, cleaning up
old and outdated infomration.

In this commit the main man page is split up into multiple sections
and options are sorted into each of the corresponding section.
Inside each category, each option is for now sorted alphabetically.
The main openvpn.8.rst file is currently kept unchanged and will be
handled in the next commit.

Many language improvements contributed by Richard Bonhomme has also
been incorproated.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-4-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063376/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #4:

doc/man: Complete openvpn.8.rst splitting

This rebuilds the openvpn.8.rst content by using the text which was
split out in the previous commit by using RST ..include statements.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-5-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063377/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

David Sommerseth authored on 2020/07/17 07:53:31
Showing 30 changed files
... ...
@@ -49,6 +49,7 @@ version.sh
49 49
 msvc-env-local.bat
50 50
 config-msvc-local.h
51 51
 config-msvc-version.h
52
+doc/openvpn.8
52 53
 doc/openvpn.8.html
53 54
 /doc/doxygen/html/
54 55
 /doc/doxygen/latex/
... ...
@@ -227,7 +227,6 @@ ENVIRONMENT for ./configure:
227 227
   ROUTE       full path to route utility
228 228
   IPROUTE     full path to ip utility
229 229
   NETSTAT     path to netstat utility
230
-  MAN2HTML    path to man2html utility
231 230
   GIT         path to git utility
232 231
   SYSTEMD_ASK_PASSWORD
233 232
               path to systemd-ask-password utility
... ...
@@ -235,6 +234,8 @@ ENVIRONMENT for ./configure:
235 235
               Path of systemd unit directory [default=LIBDIR/systemd/system]
236 236
   TMPFILES_DIR
237 237
               Path of tmpfiles directory [default=LIBDIR/tmpfiles.d]
238
+  RST2MAN     Path to rst2man utility
239
+  RST2HTML    Path to rst2html utility
238 240
 
239 241
 ENVIRONMENT variables adjusting parameters related to dependencies
240 242
 
... ...
@@ -354,7 +354,6 @@ AC_ARG_VAR([IFCONFIG], [full path to ipconfig utility])
354 354
 AC_ARG_VAR([ROUTE], [full path to route utility])
355 355
 AC_ARG_VAR([IPROUTE], [full path to ip utility])
356 356
 AC_ARG_VAR([NETSTAT], [path to netstat utility]) # tests
357
-AC_ARG_VAR([MAN2HTML], [path to man2html utility])
358 357
 AC_ARG_VAR([GIT], [path to git utility])
359 358
 AC_ARG_VAR([SYSTEMD_ASK_PASSWORD], [path to systemd-ask-password utility])
360 359
 AC_ARG_VAR([SYSTEMD_UNIT_DIR], [Path of systemd unit directory @<:@default=LIBDIR/systemd/system@:>@])
... ...
@@ -364,13 +363,21 @@ AC_PATH_PROGS([ROUTE], [route],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin])
364 364
 AC_PATH_PROGS([IPROUTE], [ip],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin])
365 365
 AC_PATH_PROGS([SYSTEMD_ASK_PASSWORD], [systemd-ask-password],, [$PATH:/usr/local/bin:/usr/bin:/bin])
366 366
 AC_CHECK_PROGS([NETSTAT], [netstat], [netstat], [$PATH:/usr/local/sbin:/usr/sbin:/sbin:/etc]) # tests
367
-AC_CHECK_PROGS([MAN2HTML], [man2html])
368 367
 AC_CHECK_PROGS([GIT], [git]) # optional
369 368
 AC_DEFINE_UNQUOTED([IFCONFIG_PATH], ["$IFCONFIG"], [Path to ifconfig tool])
370 369
 AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool])
371 370
 AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool])
372 371
 AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"], [Path to systemd-ask-password tool])
373 372
 
373
+#
374
+#  man page generation - based on python-docutils
375
+#
376
+AC_ARG_VAR([RST2MAN], [path to rst2man utility])
377
+AC_ARG_VAR([RST2HTML], [path to rst2html utility])
378
+AC_CHECK_PROGS([RST2MAN], [rst2man])
379
+AC_CHECK_PROGS([RST2HTML], [rst2html])
380
+AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"])
381
+
374 382
 # Set -std=c99 unless user already specified a -std=
375 383
 case "${CFLAGS}" in
376 384
   *-std=*) ;;
... ...
@@ -1315,10 +1322,6 @@ if test "${enable_werror}" = "yes"; then
1315 1315
 	CFLAGS="${CFLAGS} -Werror"
1316 1316
 fi
1317 1317
 
1318
-if test "${WIN32}" = "yes"; then
1319
-	test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32])
1320
-fi
1321
-
1322 1318
 if test "${enable_plugin_auth_pam}" = "yes"; then
1323 1319
 	PLUGIN_AUTH_PAM_CFLAGS="${LIBPAM_CFLAGS}"
1324 1320
 	if test "${enable_pam_dlopen}" = "yes"; then
... ...
@@ -5,29 +5,69 @@
5 5
 #             packet encryption, packet authentication, and
6 6
 #             packet compression.
7 7
 #
8
-#  Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
8
+#  Copyright (C) 2002-2020 OpenVPN Inc <sales@openvpn.net>
9 9
 #  Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
10 10
 #
11 11
 
12 12
 MAINTAINERCLEANFILES = \
13 13
 	$(srcdir)/Makefile.in
14 14
 
15
-CLEANFILES = openvpn.8.html
16
-
17 15
 SUBDIRS = doxygen
18 16
 
19 17
 dist_doc_DATA = \
20
-	management-notes.txt
18
+	management-notes.txt openvpn.8.rst \
19
+	man-sections/advanced-options.rst \
20
+	man-sections/client-options.rst \
21
+	man-sections/connection-profiles.rst \
22
+	man-sections/encryption-options.rst \
23
+	man-sections/examples.rst \
24
+	man-sections/generic-options.rst \
25
+	man-sections/inline-files.rst \
26
+	man-sections/link-options.rst \
27
+	man-sections/log-options.rst \
28
+	man-sections/management-options.rst \
29
+	man-sections/network-config.rst \
30
+	man-sections/pkcs11-options.rst \
31
+	man-sections/plugin-options.rst \
32
+	man-sections/protocol-options.rst \
33
+	man-sections/proxy-options.rst \
34
+	man-sections/signals.rst \
35
+	man-sections/script-options.rst \
36
+	man-sections/server-options.rst \
37
+	man-sections/tls-options.rst \
38
+	man-sections/unsupported-options.rst \
39
+	man-sections/vpn-network-options.rst \
40
+	man-sections/windows-options.rst
21 41
 
22 42
 dist_noinst_DATA = \
23 43
 	README.plugins interactive-service-notes.rst
24 44
 
25
-if WIN32
45
+openvpn.8 :
46
+if HAVE_PYDOCUTILS
47
+	$(RST2MAN) $(srcdir)/$@.rst > $@
48
+else
49
+	@echo "Missing python-docutils - skipping man page generation"
50
+endif
51
+
52
+openvpn.8.html:
53
+if HAVE_PYDOCUTILS
54
+	$(RST2HTML) $(srcdir)/openvpn.8.rst > $@
55
+else
56
+	@echo "Missing python-docutils - skipping man/html page generation"
57
+endif
58
+
59
+if HAVE_PYDOCUTILS
26 60
 dist_noinst_DATA += openvpn.8
27
-nodist_html_DATA = openvpn.8.html
28
-openvpn.8.html: $(srcdir)/openvpn.8
29
-	$(MAN2HTML) < $(srcdir)/openvpn.8 > openvpn.8.html
61
+dist_html_DATA = openvpn.8.html
62
+
63
+# Failsafe - do not delete these files unless we can recreate them
64
+CLEANFILES = \
65
+	 openvpn.8 openvpn.8.html
66
+
67
+if WIN32
30 68
 else
31 69
 dist_man_MANS = openvpn.8
32 70
 endif
71
+endif
33 72
 
73
+dist-hook : openvpn.8 openvpn.8.html
34 74
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+
1
+man page documentation
2
+======================
3
+
4
+The man page content maintained in the openvpn.8.rst file and proper man and
5
+the html version of the man page are generated using python-docutils.  Both
6
+the man page and html file are generated during 'make dist' or 'make distcheck'
7
+and should be distributed inside the tarball by default.
8
+
9
+Users compiling OpenVPN from the tarball should not need to regenerate the
10
+man/html files unless the source file needs to be modified.
11
+
12
+Further information:
13
+
14
+* Python docutils project:
15
+  https://docutils.sourceforge.io/
16
+
17
+* Quickstart on .rst
18
+  https://docutils.sourceforge.io/docs/user/rst/quickstart.html
19
+
20
+* reStructuredText Markup Specifictaion (.rst)
21
+  https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
0 22
new file mode 100644
... ...
@@ -0,0 +1,106 @@
0
+Standalone Debug Options
1
+------------------------
2
+
3
+--show-gateway args
4
+  (Standalone) Show current IPv4 and IPv6 default gateway and interface
5
+  towards the gateway (if the protocol in question is enabled).
6
+
7
+  Valid syntax:
8
+  ::
9
+
10
+     --show-gateway
11
+     --show-gateway IPv6-target
12
+
13
+  If an IPv6 target address is passed as argument, the IPv6 route for this
14
+  host is reported.
15
+
16
+
17
+Advanced Expert Options
18
+-----------------------
19
+These are options only required when special tweaking is needed, often
20
+used when debugging or testing out special usage scenarios.
21
+
22
+--hash-size args
23
+  Set the size of the real address hash table to ``r`` and the virtual
24
+  address table to ``v``.
25
+
26
+  Valid syntax:
27
+  ::
28
+
29
+     hash-size r v
30
+
31
+  By default, both tables are sized at 256 buckets.
32
+
33
+--bcast-buffers n
34
+  Allocate ``n`` buffers for broadcast datagrams (default :code:`256`).
35
+
36
+--persist-local-ip
37
+  Preserve initially resolved local IP address and port number across
38
+  ``SIGUSR1`` or ``--ping-restart`` restarts.
39
+
40
+--persist-remote-ip
41
+  Preserve most recently authenticated remote IP address and port number
42
+  across :code:`SIGUSR1` or ``--ping-restart`` restarts.
43
+
44
+--prng args
45
+  *(Advanced)* Change the PRNG (Pseudo-random number generator) parameters
46
+
47
+  Valid syntaxes:
48
+  ::
49
+
50
+     prng alg
51
+     prng alg nsl
52
+
53
+  Changes the PRNG to use digest algorithm **alg** (default :code:`sha1`),
54
+  and set ``nsl`` (default :code:`16`) to the size in bytes of the nonce
55
+  secret length (between 16 and 64).
56
+
57
+  Set ``alg`` to :code:`none` to disable the PRNG and use the OpenSSL
58
+  RAND\_bytes function instead for all of OpenVPN's pseudo-random number
59
+  needs.
60
+
61
+--rcvbuf size
62
+  Set the TCP/UDP socket receive buffer size. Defaults to operating system
63
+  default.
64
+
65
+--shaper n
66
+  Limit bandwidth of outgoing tunnel data to ``n`` bytes per second on the
67
+  TCP/UDP port. Note that this will only work if mode is set to
68
+  :code:`p2p`.  If you want to limit the bandwidth in both directions, use
69
+  this option on both peers.
70
+
71
+  OpenVPN uses the following algorithm to implement traffic shaping: Given
72
+  a shaper rate of ``n`` bytes per second, after a datagram write of ``b``
73
+  bytes is queued on the TCP/UDP port, wait a minimum of ``(b / n)``
74
+  seconds before queuing the next write.
75
+
76
+  It should be noted that OpenVPN supports multiple tunnels between the
77
+  same two peers, allowing you to construct full-speed and reduced
78
+  bandwidth tunnels at the same time, routing low-priority data such as
79
+  off-site backups over the reduced bandwidth tunnel, and other data over
80
+  the full-speed tunnel.
81
+
82
+  Also note that for low bandwidth tunnels (under 1000 bytes per second),
83
+  you should probably use lower MTU values as well (see above), otherwise
84
+  the packet latency will grow so large as to trigger timeouts in the TLS
85
+  layer and TCP connections running over the tunnel.
86
+
87
+  OpenVPN allows ``n`` to be between 100 bytes/sec and 100 Mbytes/sec.
88
+
89
+--sndbuf size
90
+  Set the TCP/UDP socket send buffer size. Defaults to operating system
91
+  default.
92
+
93
+--tcp-queue-limit n
94
+  Maximum number of output packets queued before TCP (default :code:`64`).
95
+
96
+  When OpenVPN is tunneling data from a TUN/TAP device to a remote client
97
+  over a TCP connection, it is possible that the TUN/TAP device might
98
+  produce data at a faster rate than the TCP connection can support. When
99
+  the number of output packets queued before sending to the TCP socket
100
+  reaches this limit for a given client connection, OpenVPN will start to
101
+  drop outgoing packets directed at this client.
102
+
103
+--txqueuelen n
104
+  *(Linux only)* Set the TX queue length on the TUN/TAP interface.
105
+  Currently defaults to 100.
0 106
new file mode 100644
... ...
@@ -0,0 +1,353 @@
0
+Client Options
1
+--------------
2
+The client options are used when connecting to an OpenVPN server configured
3
+to use ``--server``, ``--server-bridge``, or ``--mode server`` in its
4
+configuration.
5
+
6
+--allow-pull-fqdn
7
+  Allow client to pull DNS names from server (rather than being limited to
8
+  IP address) for ``--ifconfig``, ``--route``, and ``--route-gateway``.
9
+
10
+--allow-recursive-routing
11
+  When this option is set, OpenVPN will not drop incoming tun packets with
12
+  same destination as host.
13
+
14
+--auth-token token
15
+  This is not an option to be used directly in any configuration files,
16
+  but rather push this option from a ``--client-connect`` script or a
17
+  ``--plugin`` which hooks into the :code:`OPENVPN_PLUGIN_CLIENT_CONNECT`
18
+  or :code:`OPENVPN_PLUGIN_CLIENT_CONNECT_V2` calls. This option provides a
19
+  possibility to replace the clients password with an authentication token
20
+  during the lifetime of the OpenVPN client.
21
+
22
+  Whenever the connection is renegotiated and the
23
+  ``--auth-user-pass-verify`` script or ``--plugin`` making use of the
24
+  :code:`OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY` hook is triggered, it will
25
+  pass over this token as the password instead of the password the user
26
+  provided. The authentication token can only be reset by a full reconnect
27
+  where the server can push new options to the client. The password the
28
+  user entered is never preserved once an authentication token has been
29
+  set. If the OpenVPN server side rejects the authentication token then
30
+  the client will receive an :code:`AUTH_FAILED` and disconnect.
31
+
32
+  The purpose of this is to enable two factor authentication methods, such
33
+  as HOTP or TOTP, to be used without needing to retrieve a new OTP code
34
+  each time the connection is renegotiated. Another use case is to cache
35
+  authentication data on the client without needing to have the users
36
+  password cached in memory during the life time of the session.
37
+
38
+  To make use of this feature, the ``--client-connect`` script or
39
+  ``--plugin`` needs to put
40
+  ::
41
+
42
+     push "auth-token UNIQUE_TOKEN_VALUE"
43
+
44
+  into the file/buffer for dynamic configuration data. This will then make
45
+  the OpenVPN server to push this value to the client, which replaces the
46
+  local password with the ``UNIQUE_TOKEN_VALUE``.
47
+
48
+  Newer clients (2.4.7+) will fall back to the original password method
49
+  after a failed auth. Older clients will keep using the token value and
50
+  react according to ``--auth-retry``
51
+
52
+--auth-user-pass
53
+  Authenticate with server using username/password.
54
+
55
+  Valid syntaxes:
56
+  ::
57
+
58
+      auth-user-pass
59
+      auth-user-pass up
60
+
61
+  If ``up`` is present, it must be a file containing username/password on 2
62
+  lines. If the password line is missing, OpenVPN will prompt for one.
63
+
64
+  If ``up`` is omitted, username/password will be prompted from the
65
+  console.
66
+
67
+  The server configuration must specify an ``--auth-user-pass-verify``
68
+  script to verify the username/password provided by the client.
69
+
70
+--auth-retry type
71
+  Controls how OpenVPN responds to username/password verification errors
72
+  such as the client-side response to an :code:`AUTH_FAILED` message from
73
+  the server or verification failure of the private key password.
74
+
75
+  Normally used to prevent auth errors from being fatal on the client
76
+  side, and to permit username/password requeries in case of error.
77
+
78
+  An :code:`AUTH_FAILED` message is generated by the server if the client
79
+  fails ``--auth-user-pass`` authentication, or if the server-side
80
+  ``--client-connect`` script returns an error status when the client
81
+  tries to connect.
82
+
83
+  ``type`` can be one of:
84
+
85
+  :code:`none`
86
+      Client will exit with a fatal error (this is the default).
87
+
88
+  :code:`nointeract`
89
+      Client will retry the connection without requerying
90
+      for an ``--auth-user-pass`` username/password. Use this option for
91
+      unattended clients.
92
+
93
+  :code:`interact`
94
+      Client will requery for an ``--auth-user-pass``
95
+      username/password and/or private key password before attempting a
96
+      reconnection.
97
+
98
+  Note that while this option cannot be pushed, it can be controlled from
99
+  the management interface.
100
+
101
+--client
102
+  A helper directive designed to simplify the configuration of OpenVPN's
103
+  client mode. This directive is equivalent to:
104
+  ::
105
+
106
+       pull
107
+       tls-client
108
+
109
+--client-nat args
110
+  This pushable client option sets up a stateless one-to-one NAT rule on
111
+  packet addresses (not ports), and is useful in cases where routes or
112
+  ifconfig settings pushed to the client would create an IP numbering
113
+  conflict.
114
+
115
+  Examples:
116
+  ::
117
+
118
+      client-nat snat 192.168.0.0/255.255.0.0
119
+      client-nat dnat 10.64.0.0/255.255.0.0
120
+
121
+  ``network/netmask`` (for example :code:`192.168.0.0/255.255.0.0`) defines
122
+  the local view of a resource from the client perspective, while
123
+  ``alias/netmask`` (for example :code:`10.64.0.0/255.255.0.0`) defines the
124
+  remote view from the server perspective.
125
+
126
+  Use :code:`snat` (source NAT) for resources owned by the client and
127
+  :code:`dnat` (destination NAT) for remote resources.
128
+
129
+  Set ``--verb 6`` for debugging info showing the transformation of
130
+  src/dest addresses in packets.
131
+
132
+--connect-retry n
133
+  Wait ``n`` seconds between connection attempts (default :code:`5`).
134
+  Repeated reconnection attempts are slowed down after 5 retries per
135
+  remote by doubling the wait time after each unsuccessful attempt. An
136
+  optional argument ``max`` specifies the maximum value of wait time in
137
+  seconds at which it gets capped (default :code:`300`).
138
+
139
+--connect-retry-max n
140
+  ``n`` specifies the number of times each ``--remote`` or
141
+  ``<connection>`` entry is tried. Specifying ``n`` as :code:`1` would try
142
+  each entry exactly once. A successful connection resets the counter.
143
+  (default *unlimited*).
144
+
145
+--connect-timeout n
146
+  See ``--server-poll-timeout``.
147
+
148
+--explicit-exit-notify n
149
+  In UDP client mode or point-to-point mode, send server/peer an exit
150
+  notification if tunnel is restarted or OpenVPN process is exited. In
151
+  client mode, on exit/restart, this option will tell the server to
152
+  immediately close its client instance object rather than waiting for a
153
+  timeout.
154
+
155
+  The **n** parameter (default :code:`1` if not present) controls the
156
+  maximum number of attempts that the client will try to resend the exit
157
+  notification message.
158
+
159
+  In UDP server mode, send :code:`RESTART` control channel command to
160
+  connected clients. The ``n`` parameter (default :code:`1` if not present)
161
+  controls client behavior. With ``n`` = :code:`1` client will attempt to
162
+  reconnect to the same server, with ``n`` = :code:`2` client will advance
163
+  to the next server.
164
+
165
+  OpenVPN will not send any exit notifications unless this option is
166
+  enabled.
167
+
168
+--inactive args
169
+  Causes OpenVPN to exit after ``n`` seconds of inactivity on the TUN/TAP
170
+  device. The time length of inactivity is measured since the last
171
+  incoming or outgoing tunnel packet. The default value is 0 seconds,
172
+  which disables this feature.
173
+
174
+  Valid syntaxes:
175
+  ::
176
+
177
+       inactive n
178
+       inactive n bytes
179
+
180
+  If the optional ``bytes`` parameter is included, exit if less than
181
+  ``bytes`` of combined in/out traffic are produced on the tun/tap device
182
+  in ``n`` seconds.
183
+
184
+  In any case, OpenVPN's internal ping packets (which are just keepalives)
185
+  and TLS control packets are not considered "activity", nor are they
186
+  counted as traffic, as they are used internally by OpenVPN and are not
187
+  an indication of actual user activity.
188
+
189
+--proto-force p
190
+  When iterating through connection profiles, only consider profiles using
191
+  protocol ``p`` (:code:`tcp` \| :code:`udp`).
192
+
193
+--pull
194
+  This option must be used on a client which is connecting to a
195
+  multi-client server. It indicates to OpenVPN that it should accept
196
+  options pushed by the server, provided they are part of the legal set of
197
+  pushable options (note that the ``--pull`` option is implied by
198
+  ``--client`` ).
199
+
200
+  In particular, ``--pull`` allows the server to push routes to the
201
+  client, so you should not use ``--pull`` or ``--client`` in situations
202
+  where you don't trust the server to have control over the client's
203
+  routing table.
204
+
205
+--pull-filter args
206
+  Filter options on the client pushed by the server to the client.
207
+
208
+  Valid syntaxes:
209
+  ::
210
+
211
+     pull-filter accept text
212
+     pull-filter ignore text
213
+     pull-filter reject text
214
+
215
+  Filter options received from the server if the option starts with
216
+  :code:`text`.  The action flag :code:`accept` allows the option,
217
+  :code:`ignore` removes it and :code:`reject` flags an error and triggers
218
+  a :code:`SIGUSR1` restart. The filters may be specified multiple times,
219
+  and each filter is applied in the order it is specified. The filtering of
220
+  each option stops as soon as a match is found. Unmatched options are accepted
221
+  by default.
222
+
223
+  Prefix comparison is used to match :code:`text` against the received option so
224
+  that
225
+  ::
226
+
227
+      pull-filter ignore "route"
228
+
229
+  would remove all pushed options starting with ``route`` which would
230
+  include, for example, ``route-gateway``. Enclose *text* in quotes to
231
+  embed spaces.
232
+
233
+  ::
234
+
235
+      pull-filter accept "route 192.168.1."
236
+      pull-filter ignore "route "
237
+
238
+  would remove all routes that do not start with ``192.168.1``.
239
+
240
+  *Note* that :code:`reject` may result in a repeated cycle of failure and
241
+  reconnect, unless multiple remotes are specified and connection to the
242
+  next remote succeeds. To silently ignore an option pushed by the server,
243
+  use :code:`ignore`.
244
+
245
+--remote args
246
+  Remote host name or IP address.  It supports two additional optional
247
+  arguments: ``port`` and ``proto``.  On the client, multiple ``--remote``
248
+  options may be specified for redundancy, each referring to a different
249
+  OpenVPN server. Specifying multiple ``--remote`` options for this
250
+  purpose is a special case of the more general connection-profile
251
+  feature. See the ``<connection>`` documentation below.
252
+
253
+  The OpenVPN client will try to connect to a server at ``host:port`` in
254
+  the order specified by the list of ``--remote`` options.
255
+
256
+  Examples:
257
+  ::
258
+
259
+     remote server.example.net
260
+     remote server.example.net 1194
261
+     remote server.example.net tcp
262
+
263
+  ``proto`` indicates the protocol to use when connecting with the remote,
264
+  and may be :code:`tcp` or :code:`udp`.
265
+
266
+  For forcing IPv4 or IPv6 connection suffix tcp or udp with 4/6 like
267
+  udp4/udp6/tcp4/tcp6.
268
+
269
+  The client will move on to the next host in the list, in the event of
270
+  connection failure. Note that at any given time, the OpenVPN client will
271
+  at most be connected to one server.
272
+
273
+  Note that since UDP is connectionless, connection failure is defined by
274
+  the ``--ping`` and ``--ping-restart`` options.
275
+
276
+  Note the following corner case: If you use multiple ``--remote``
277
+  options, AND you are dropping root privileges on the client with
278
+  ``--user`` and/or ``--group`` AND the client is running a non-Windows
279
+  OS, if the client needs to switch to a different server, and that server
280
+  pushes back different TUN/TAP or route settings, the client may lack the
281
+  necessary privileges to close and reopen the TUN/TAP interface. This
282
+  could cause the client to exit with a fatal error.
283
+
284
+  If ``--remote`` is unspecified, OpenVPN will listen for packets from any
285
+  IP address, but will not act on those packets unless they pass all
286
+  authentication tests. This requirement for authentication is binding on
287
+  all potential peers, even those from known and supposedly trusted IP
288
+  addresses (it is very easy to forge a source IP address on a UDP
289
+  packet).
290
+
291
+  When used in TCP mode, ``--remote`` will act as a filter, rejecting
292
+  connections from any host which does not match ``host``.
293
+
294
+  If ``host`` is a DNS name which resolves to multiple IP addresses,
295
+  OpenVPN will try them in the order that the system getaddrinfo()
296
+  presents them, so priorization and DNS randomization is done by the
297
+  system library. Unless an IP version is forced by the protocol
298
+  specification (4/6 suffix), OpenVPN will try both IPv4 and IPv6
299
+  addresses, in the order getaddrinfo() returns them.
300
+
301
+--remote-random
302
+  When multiple ``--remote`` address/ports are specified, or if connection
303
+  profiles are being used, initially randomize the order of the list as a
304
+  kind of basic load-balancing measure.
305
+
306
+--remote-random-hostname
307
+  Prepend a random string (6 bytes, 12 hex characters) to hostname to
308
+  prevent DNS caching. For example, "foo.bar.gov" would be modified to
309
+  "<random-chars>.foo.bar.gov".
310
+
311
+--resolv-retry n
312
+  If hostname resolve fails for ``--remote``, retry resolve for ``n``
313
+  seconds before failing.
314
+
315
+  Set ``n`` to "infinite" to retry indefinitely.
316
+
317
+  By default, ``--resolv-retry infinite`` is enabled. You can disable by
318
+  setting n=0.
319
+
320
+--single-session
321
+  After initially connecting to a remote peer, disallow any new
322
+  connections. Using this option means that a remote peer cannot connect,
323
+  disconnect, and then reconnect.
324
+
325
+  If the daemon is reset by a signal or ``--ping-restart``, it will allow
326
+  one new connection.
327
+
328
+  ``--single-session`` can be used with ``--ping-exit`` or ``--inactive``
329
+  to create a single dynamic session that will exit when finished.
330
+
331
+--server-poll-timeout n
332
+  When connecting to a remote server do not wait for more than ``n``
333
+  seconds for a response before trying the next server. The default value
334
+  is 120s. This timeout includes proxy and TCP connect timeouts.
335
+
336
+--static-challenge args
337
+  Enable static challenge/response protocol
338
+
339
+  Valid syntax:
340
+  ::
341
+
342
+     static-challenge text echo
343
+
344
+  The ``text`` challenge text is presented to the user which describes what
345
+  information is requested.  The ``echo`` flag indicates if the user's
346
+  input should be echoed on the screen.  Valid ``echo`` values are
347
+  :code:`0` or :code:`1`.
348
+
349
+  See management-notes.txt in the OpenVPN distribution for a description of
350
+  the OpenVPN challenge/response protocol.
351
+
352
+.. include:: proxy-options.rst
0 353
new file mode 100644
... ...
@@ -0,0 +1,75 @@
0
+CONNECTION PROFILES
1
+===================
2
+
3
+Client configuration files may contain multiple remote servers which
4
+it will attempt to connect against.  But there are some configuration
5
+options which are related to specific ``--remote`` options.  For these
6
+use cases, connection profiles are the solution.
7
+
8
+By enacpulating the ``--remote`` option and related options within
9
+``<connection>`` and ``</connection>``, these options are handled as a
10
+group.
11
+
12
+An OpenVPN client will try each connection profile sequentially until it
13
+achieves a successful connection.
14
+
15
+``--remote-random`` can be used to initially "scramble" the connection
16
+list.
17
+
18
+Here is an example of connection profile usage:
19
+::
20
+
21
+   client
22
+   dev tun
23
+
24
+   <connection>
25
+   remote 198.19.34.56 1194 udp
26
+   </connection>
27
+
28
+   <connection>
29
+   remote 198.19.34.56 443 tcp
30
+   </connection>
31
+
32
+   <connection>
33
+   remote 198.19.34.56 443 tcp
34
+   http-proxy 192.168.0.8 8080
35
+   </connection>
36
+
37
+   <connection>
38
+   remote 198.19.36.99 443 tcp
39
+   http-proxy 192.168.0.8 8080
40
+   </connection>
41
+
42
+   persist-key
43
+   persist-tun
44
+   pkcs12 client.p12
45
+   remote-cert-tls server
46
+   verb 3
47
+
48
+First we try to connect to a server at 198.19.34.56:1194 using UDP. If
49
+that fails, we then try to connect to 198.19.34.56:443 using TCP. If
50
+that also fails, then try connecting through an HTTP proxy at
51
+192.168.0.8:8080 to 198.19.34.56:443 using TCP. Finally, try to connect
52
+through the same proxy to a server at 198.19.36.99:443 using TCP.
53
+
54
+The following OpenVPN options may be used inside of a ``<connection>``
55
+block:
56
+
57
+``bind``, ``connect-retry``, ``connect-retry-max``, ``connect-timeout``,
58
+``explicit-exit-notify``, ``float``, ``fragment``, ``http-proxy``,
59
+``http-proxy-option``, ``key-direction``, ``link-mtu``, ``local``,
60
+``lport``, ``mssfix``, ``mtu-disc``, ``nobind``, ``port``, ``proto``,
61
+``remote``, ``rport``, ``socks-proxy``, ``tls-auth``, ``tls-crypt``,
62
+``tun-mtu and``, ``tun-mtu-extra``.
63
+
64
+A defaulting mechanism exists for specifying options to apply to all
65
+``<connection>`` profiles. If any of the above options (with the
66
+exception of ``remote`` ) appear outside of a ``<connection>`` block,
67
+but in a configuration file which has one or more ``<connection>``
68
+blocks, the option setting will be used as a default for
69
+``<connection>`` blocks which follow it in the configuration file.
70
+
71
+For example, suppose the ``nobind`` option were placed in the sample
72
+configuration file above, near the top of the file, before the first
73
+``<connection>`` block. The effect would be as if ``nobind`` were
74
+declared in all ``<connection>`` blocks below it.
0 75
new file mode 100644
... ...
@@ -0,0 +1,135 @@
0
+Encryption Options
1
+==================
2
+
3
+SSL Library information
4
+-----------------------
5
+
6
+--show-ciphers
7
+  (Standalone) Show all cipher algorithms to use with the ``--cipher``
8
+  option.
9
+
10
+--show-digests
11
+  (Standalone) Show all message digest algorithms to use with the
12
+  ``--auth`` option.
13
+
14
+--show-tls
15
+  (Standalone) Show all TLS ciphers supported by the crypto library.
16
+  OpenVPN uses TLS to secure the control channel, over which the keys that
17
+  are used to protect the actual VPN traffic are exchanged. The TLS
18
+  ciphers will be sorted from highest preference (most secure) to lowest.
19
+
20
+  Be aware that whether a cipher suite in this list can actually work
21
+  depends on the specific setup of both peers (e.g. both peers must
22
+  support the cipher, and an ECDSA cipher suite will not work if you are
23
+  using an RSA certificate, etc.).
24
+
25
+--show-engines
26
+  (Standalone) Show currently available hardware-based crypto acceleration
27
+  engines supported by the OpenSSL library.
28
+
29
+--show-curves
30
+  (Standalone) Show all available elliptic curves to use with the
31
+  ``--ecdh-curve`` option.
32
+
33
+Generating key material
34
+-----------------------
35
+
36
+--genkey args
37
+  (Standalone) Generate a key to be used of the type keytype. if keyfile
38
+  is left out or empty the key will be output on stdout. See the following
39
+  sections for the different keytypes.
40
+
41
+  Valid syntax:
42
+  ::
43
+
44
+     --genkey keytype keyfile
45
+
46
+  Valid keytype arguments are:
47
+
48
+  :code:`secret`                Standard OpenVPN shared secret keys
49
+
50
+  :code:`tls-crypt`             Alias for :code:`secret`
51
+
52
+  :code:`tls-auth`              Alias for :code:`secret`
53
+
54
+  :code:`auth-token`            Key used for ``--auth-gen-token-key``
55
+
56
+  :code:`tls-crypt-v2-server`   TLS Crypt v2 server key
57
+
58
+  :code:`tls-crypt-v2-client`   TLS Crypt v2 client key
59
+
60
+
61
+  Examples:
62
+  ::
63
+
64
+     $ openvpn --genkey secret shared.key
65
+     $ openvpn --genkey tls-crypt shared.key
66
+     $ openvpn --genkey tls-auth shared.key
67
+     $ openvpn --genkey tls-crypt-v2-server v2crypt-server.key
68
+     $ openvpn --tls-crypt-v2 v2crypt-server.key --genkey tls-crypt-v2-client v2crypt-client-1.key
69
+
70
+  * Generating *Shared Secret Keys*
71
+    Generate a shared secret, for use with the ``--secret``, ``--tls-auth``
72
+    or ``--tls-crypt`` options.
73
+
74
+    Syntax:
75
+    ::
76
+
77
+       $ openvpn --genkey secret|tls-crypt|tls-auth keyfile
78
+
79
+    The key is saved in ``keyfile``. All three variants (``--secret``,
80
+    ``tls-crypt`` and ``tls-auth``) generate the same type of key. The
81
+    aliases are added for convenience.
82
+
83
+    If using this for ``--secret``, this file must be shared with the peer
84
+    over a pre-existing secure channel such as ``scp``\(1).
85
+
86
+  * Generating *TLS Crypt v2 Server key*
87
+    Generate a ``--tls-crypt-v2`` key to be used by an OpenVPN server.
88
+    The key is stored in ``keyfile``.
89
+
90
+    Syntax:
91
+    ::
92
+
93
+       --genkey tls-crypt-v2-server keyfile
94
+
95
+  * Generating *TLS Crypt v2 Client key*
96
+    Generate a --tls-crypt-v2 key to be used by OpenVPN clients.  The
97
+    key is stored in ``keyfile``.
98
+
99
+    Syntax
100
+    ::
101
+
102
+       --genkey tls-crypt-v2-client keyfile [metadata]
103
+
104
+    If supplied, include the supplied ``metadata`` in the wrapped client
105
+    key. This metadata must be supplied in base64-encoded form. The
106
+    metadata must be at most 735 bytes long (980 bytes in base64).
107
+
108
+    If no metadata is supplied, OpenVPN will use a 64-bit unix timestamp
109
+    representing the current time in UTC, encoded in network order, as
110
+    metadata for the generated key.
111
+
112
+    A tls-crypt-v2 client key is wrapped using a server key. To generate a
113
+    client key, the user must therefore supply the server key using the
114
+    ``--tls-crypt-v2`` option.
115
+
116
+    Servers can use ``--tls-crypt-v2-verify`` to specify a metadata
117
+    verification command.
118
+
119
+  * Generate *Authentication Token key*
120
+    Generate a new secret that can be used with **--auth-gen-token-secret**
121
+
122
+    Syntax:
123
+    ::
124
+
125
+       --genkey auth-token [keyfile]
126
+
127
+    *Note:*
128
+       This file should be kept secret to the server as anyone that has
129
+       access to this file will be able to generate auth tokens that the
130
+       OpenVPN server will accept as valid.
131
+
132
+.. include:: renegotiation.rst
133
+.. include:: tls-options.rst
134
+.. include:: pkcs11-options.rst
0 135
new file mode 100644
... ...
@@ -0,0 +1,240 @@
0
+EXAMPLES
1
+========
2
+
3
+Prior to running these examples, you should have OpenVPN installed on
4
+two machines with network connectivity between them. If you have not yet
5
+installed OpenVPN, consult the INSTALL file included in the OpenVPN
6
+distribution.
7
+
8
+
9
+Firewall Setup:
10
+---------------
11
+
12
+If firewalls exist between the two machines, they should be set to
13
+forward the port OpenVPN is configured to use, in both directions.
14
+The default for OpenVPN is 1194/udp.  If you do not have control
15
+over the firewalls between the two machines, you may still be able to
16
+use OpenVPN by adding ``--ping 15`` to each of the ``openvpn`` commands
17
+used below in the examples (this will cause each peer to send out a UDP
18
+ping to its remote peer once every 15 seconds which will cause many
19
+stateful firewalls to forward packets in both directions without an
20
+explicit firewall rule).
21
+
22
+Please see your operating system guides for how to configure the firewall
23
+on your systems.
24
+
25
+
26
+VPN Address Setup:
27
+------------------
28
+
29
+For purposes of our example, our two machines will be called
30
+``bob.example.com`` and ``alice.example.com``. If you are constructing a
31
+VPN over the internet, then replace ``bob.example.com`` and
32
+``alice.example.com`` with the internet hostname or IP address that each
33
+machine will use to contact the other over the internet.
34
+
35
+Now we will choose the tunnel endpoints. Tunnel endpoints are private IP
36
+addresses that only have meaning in the context of the VPN. Each machine
37
+will use the tunnel endpoint of the other machine to access it over the
38
+VPN. In our example, the tunnel endpoint for bob.example.com will be
39
+10.4.0.1 and for alice.example.com, 10.4.0.2.
40
+
41
+Once the VPN is established, you have essentially created a secure
42
+alternate path between the two hosts which is addressed by using the
43
+tunnel endpoints. You can control which network traffic passes between
44
+the hosts (a) over the VPN or (b) independently of the VPN, by choosing
45
+whether to use (a) the VPN endpoint address or (b) the public internet
46
+address, to access the remote host. For example if you are on
47
+bob.example.com and you wish to connect to ``alice.example.com`` via
48
+``ssh`` without using the VPN (since **ssh** has its own built-in security)
49
+you would use the command ``ssh alice.example.com``. However in the same
50
+scenario, you could also use the command ``telnet 10.4.0.2`` to create a
51
+telnet session with alice.example.com over the VPN, that would use the
52
+VPN to secure the session rather than ``ssh``.
53
+
54
+You can use any address you wish for the tunnel endpoints but make sure
55
+that they are private addresses (such as those that begin with 10 or
56
+192.168) and that they are not part of any existing subnet on the
57
+networks of either peer, unless you are bridging. If you use an address
58
+that is part of your local subnet for either of the tunnel endpoints,
59
+you will get a weird feedback loop.
60
+
61
+
62
+Example 1: A simple tunnel without security
63
+-------------------------------------------
64
+
65
+On bob:
66
+::
67
+
68
+   openvpn --remote alice.example.com --dev tun1 \
69
+            --ifconfig 10.4.0.1 10.4.0.2 --verb 9
70
+
71
+On alice:
72
+::
73
+
74
+   openvpn --remote bob.example.com --dev tun1 \
75
+            --ifconfig 10.4.0.2 10.4.0.1 --verb 9
76
+
77
+Now verify the tunnel is working by pinging across the tunnel.
78
+
79
+On bob:
80
+::
81
+
82
+   ping 10.4.0.2
83
+
84
+On alice:
85
+::
86
+
87
+   ping 10.4.0.1
88
+
89
+The ``--verb 9`` option will produce verbose output, similar to the
90
+``tcpdump``\(8) program. Omit the ``--verb 9`` option to have OpenVPN run
91
+quietly.
92
+
93
+
94
+Example 2: A tunnel with static-key security (i.e. using a pre-shared secret)
95
+-----------------------------------------------------------------------------
96
+
97
+First build a static key on bob.
98
+::
99
+
100
+   openvpn --genkey --secret key
101
+
102
+This command will build a key file called ``key`` (in ascii format). Now
103
+copy ``key`` to ``alice.example.com`` over a secure medium such as by using
104
+the ``scp``\(1) program.
105
+
106
+On bob:
107
+::
108
+
109
+   openvpn --remote alice.example.com --dev tun1  \
110
+            --ifconfig 10.4.0.1 10.4.0.2 --verb 5 \
111
+            --secret key
112
+
113
+On alice:
114
+::
115
+
116
+   openvpn --remote bob.example.com --dev tun1   \
117
+           --ifconfig 10.4.0.2 10.4.0.1 --verb 5 \
118
+           --secret key
119
+
120
+Now verify the tunnel is working by pinging across the tunnel.
121
+
122
+On bob:
123
+::
124
+
125
+   ping 10.4.0.2
126
+
127
+On alice:
128
+::
129
+
130
+   ping 10.4.0.1
131
+
132
+
133
+Example 3: A tunnel with full TLS-based security
134
+------------------------------------------------
135
+
136
+For this test, we will designate ``bob`` as the TLS client and ``alice``
137
+as the TLS server.
138
+
139
+*Note:*
140
+    The client or server designation only has
141
+    meaning for the TLS subsystem. It has no bearing on OpenVPN's
142
+    peer-to-peer, UDP-based communication model.*
143
+
144
+First, build a separate certificate/key pair for both bob and alice (see
145
+above where ``--cert`` is discussed for more info). Then construct
146
+Diffie Hellman parameters (see above where ``--dh`` is discussed for
147
+more info). You can also use the included test files :code:`client.crt`,
148
+:code:`client.key`, :code:`server.crt`, :code:`server.key` and
149
+:code:`ca.crt`. The ``.crt`` files are certificates/public-keys, the
150
+``.key`` files are private keys, and :code:`ca.crt` is a certification
151
+authority who has signed both :code:`client.crt` and :code:`server.crt`.
152
+For Diffie Hellman parameters you can use the included file
153
+:code:`dh2048.pem`.
154
+
155
+*WARNING:*
156
+    All client, server, and certificate authority certificates
157
+    and keys included in the OpenVPN distribution are totally
158
+    insecure and should be used for testing only.
159
+
160
+On bob:
161
+::
162
+
163
+   openvpn --remote alice.example.com --dev tun1    \
164
+           --ifconfig 10.4.0.1 10.4.0.2             \
165
+           --tls-client --ca ca.crt                 \
166
+           --cert client.crt --key client.key       \
167
+           --reneg-sec 60 --verb 5
168
+
169
+On alice:
170
+::
171
+
172
+   openvpn --remote bob.example.com --dev tun1      \
173
+           --ifconfig 10.4.0.2 10.4.0.1             \
174
+           --tls-server --dh dh1024.pem --ca ca.crt \
175
+           --cert server.crt --key server.key       \
176
+           --reneg-sec 60 --verb 5
177
+
178
+Now verify the tunnel is working by pinging across the tunnel.
179
+
180
+On bob:
181
+::
182
+
183
+   ping 10.4.0.2
184
+
185
+On alice:
186
+::
187
+
188
+   ping 10.4.0.1
189
+
190
+Notice the ``--reneg-sec 60`` option we used above. That tells OpenVPN
191
+to renegotiate the data channel keys every minute. Since we used
192
+``--verb 5`` above, you will see status information on each new key
193
+negotiation.
194
+
195
+For production operations, a key renegotiation interval of 60 seconds is
196
+probably too frequent. Omit the ``--reneg-sec 60`` option to use
197
+OpenVPN's default key renegotiation interval of one hour.
198
+
199
+
200
+Routing:
201
+--------
202
+
203
+Assuming you can ping across the tunnel, the next step is to route a
204
+real subnet over the secure tunnel. Suppose that bob and alice have two
205
+network interfaces each, one connected to the internet, and the other to
206
+a private network. Our goal is to securely connect both private
207
+networks. We will assume that bob's private subnet is *10.0.0.0/24* and
208
+alice's is *10.0.1.0/24*.
209
+
210
+First, ensure that IP forwarding is enabled on both peers. On Linux,
211
+enable routing:
212
+::
213
+
214
+    echo 1 > /proc/sys/net/ipv4/ip_forward
215
+
216
+This setting is not persistent.  Please see your operating systems
217
+documentation how to properly configure IP forwarding, which is also
218
+persistent through system boots.
219
+
220
+If your system is configured with a firewall.  Please see your operating
221
+systems guide on how to configure the firewall.  You typically want to
222
+allow traffic coming from and going to the tun/tap adapter OpenVPN is
223
+configured to use.
224
+
225
+On bob:
226
+::
227
+
228
+   route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.4.0.2
229
+
230
+On alice:
231
+::
232
+
233
+   route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.4.0.1
234
+
235
+Now any machine on the *10.0.0.0/24* subnet can access any machine on the
236
+*10.0.1.0/24* subnet over the secure tunnel (or vice versa).
237
+
238
+In a production environment, you could put the route command(s) in a
239
+script and execute with the ``--up`` option.
0 240
new file mode 100644
... ...
@@ -0,0 +1,435 @@
0
+Generic Options
1
+---------------
2
+This section covers generic options which are accessible regardless of
3
+which mode OpenVPN is configured as.
4
+
5
+--help
6
+
7
+  Show options.
8
+
9
+--auth-nocache
10
+  Don't cache ``--askpass`` or ``--auth-user-pass`` username/passwords in
11
+  virtual memory.
12
+
13
+  If specified, this directive will cause OpenVPN to immediately forget
14
+  username/password inputs after they are used. As a result, when OpenVPN
15
+  needs a username/password, it will prompt for input from stdin, which
16
+  may be multiple times during the duration of an OpenVPN session.
17
+
18
+  When using ``--auth-nocache`` in combination with a user/password file
19
+  and ``--chroot`` or ``--daemon``, make sure to use an absolute path.
20
+
21
+  This directive does not affect the ``--http-proxy`` username/password.
22
+  It is always cached.
23
+
24
+--cd dir
25
+  Change directory to ``dir`` prior to reading any files such as
26
+  configuration files, key files, scripts, etc. ``dir`` should be an
27
+  absolute path, with a leading "/", and without any references to the
28
+  current directory such as :code:`.` or :code:`..`.
29
+
30
+  This option is useful when you are running OpenVPN in ``--daemon`` mode,
31
+  and you want to consolidate all of your OpenVPN control files in one
32
+  location.
33
+
34
+--chroot dir
35
+  Chroot to ``dir`` after initialization. ``--chroot`` essentially
36
+  redefines ``dir`` as being the top level directory tree (/). OpenVPN
37
+  will therefore be unable to access any files outside this tree. This can
38
+  be desirable from a security standpoint.
39
+
40
+  Since the chroot operation is delayed until after initialization, most
41
+  OpenVPN options that reference files will operate in a pre-chroot
42
+  context.
43
+
44
+  In many cases, the ``dir`` parameter can point to an empty directory,
45
+  however complications can result when scripts or restarts are executed
46
+  after the chroot operation.
47
+
48
+  Note: The SSL library will probably need /dev/urandom to be available
49
+  inside the chroot directory ``dir``. This is because SSL libraries
50
+  occasionally need to collect fresh random. Newer linux kernels and some
51
+  BSDs implement a getrandom() or getentropy() syscall that removes the
52
+  need for /dev/urandom to be available.
53
+
54
+--config file
55
+  Load additional config options from ``file`` where each line corresponds
56
+  to one command line option, but with the leading '--' removed.
57
+
58
+  If ``--config file`` is the only option to the openvpn command, the
59
+  ``--config`` can be removed, and the command can be given as ``openvpn
60
+  file``
61
+
62
+  Note that configuration files can be nested to a reasonable depth.
63
+
64
+  Double quotation or single quotation characters ("", '') can be used to
65
+  enclose single parameters containing whitespace, and "#" or ";"
66
+  characters in the first column can be used to denote comments.
67
+
68
+  Note that OpenVPN 2.0 and higher performs backslash-based shell escaping
69
+  for characters not in single quotations, so the following mappings
70
+  should be observed:
71
+  ::
72
+
73
+      \\       Maps to a single backslash character (\).
74
+      \"       Pass a literal doublequote character ("), don't
75
+               interpret it as enclosing a parameter.
76
+      \[SPACE] Pass a literal space or tab character, don't
77
+               interpret it as a parameter delimiter.
78
+
79
+  For example on Windows, use double backslashes to represent pathnames:
80
+  ::
81
+
82
+      secret "c:\\OpenVPN\\secret.key"
83
+
84
+
85
+  For examples of configuration files, see
86
+  https://openvpn.net/community-resources/how-to/
87
+
88
+  Here is an example configuration file:
89
+  ::
90
+
91
+      #
92
+      # Sample OpenVPN configuration file for
93
+      # using a pre-shared static key.
94
+      #
95
+      # '#' or ';' may be used to delimit comments.
96
+
97
+      # Use a dynamic tun device.
98
+      dev tun
99
+
100
+      # Our remote peer
101
+      remote mypeer.mydomain
102
+
103
+      # 10.1.0.1 is our local VPN endpoint
104
+      # 10.1.0.2 is our remote VPN endpoint
105
+      ifconfig 10.1.0.1 10.1.0.2
106
+
107
+      # Our pre-shared static key
108
+      secret static.key
109
+
110
+--daemon progname
111
+  Become a daemon after all initialization functions are completed. This
112
+  option will cause all message and error output to be sent to the syslog
113
+  file (such as :code:`/var/log/messages`), except for the output of
114
+  scripts and ifconfig commands, which will go to :code:`/dev/null` unless
115
+  otherwise redirected. The syslog redirection occurs immediately at the
116
+  point that ``--daemon`` is parsed on the command line even though the
117
+  daemonization point occurs later. If one of the ``--log`` options is
118
+  present, it will supersede syslog redirection.
119
+
120
+  The optional ``progname`` parameter will cause OpenVPN to report its
121
+  program name to the system logger as ``progname``. This can be useful in
122
+  linking OpenVPN messages in the syslog file with specific tunnels. When
123
+  unspecified, ``progname`` defaults to "openvpn".
124
+
125
+  When OpenVPN is run with the ``--daemon`` option, it will try to delay
126
+  daemonization until the majority of initialization functions which are
127
+  capable of generating fatal errors are complete. This means that
128
+  initialization scripts can test the return status of the openvpn command
129
+  for a fairly reliable indication of whether the command has correctly
130
+  initialized and entered the packet forwarding event loop.
131
+
132
+  In OpenVPN, the vast majority of errors which occur after initialization
133
+  are non-fatal.
134
+
135
+  Note: as soon as OpenVPN has daemonized, it can not ask for usernames,
136
+  passwords, or key pass phrases anymore. This has certain consequences,
137
+  namely that using a password-protected private key will fail unless the
138
+  ``--askpass`` option is used to tell OpenVPN to ask for the pass phrase
139
+  (this requirement is new in v2.3.7, and is a consequence of calling
140
+  daemon() before initializing the crypto layer).
141
+
142
+  Further, using ``--daemon`` together with ``--auth-user-pass`` (entered
143
+  on console) and ``--auth-nocache`` will fail as soon as key
144
+  renegotiation (and reauthentication) occurs.
145
+
146
+--disable-occ
147
+  Don't output a warning message if option inconsistencies are detected
148
+  between peers. An example of an option inconsistency would be where one
149
+  peer uses ``--dev tun`` while the other peer uses ``--dev tap``.
150
+
151
+  Use of this option is discouraged, but is provided as a temporary fix in
152
+  situations where a recent version of OpenVPN must connect to an old
153
+  version.
154
+
155
+--engine engine-name
156
+  Enable OpenSSL hardware-based crypto engine functionality.
157
+
158
+  If ``engine-name`` is specified, use a specific crypto engine. Use the
159
+  ``--show-engines`` standalone option to list the crypto engines which
160
+  are supported by OpenSSL.
161
+
162
+--fast-io
163
+  (Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to
164
+  poll/epoll/select prior to the write operation. The purpose of such a
165
+  call would normally be to block until the device or socket is ready to
166
+  accept the write. Such blocking is unnecessary on some platforms which
167
+  don't support write blocking on UDP sockets or TUN/TAP devices. In such
168
+  cases, one can optimize the event loop by avoiding the poll/epoll/select
169
+  call, improving CPU efficiency by 5% to 10%.
170
+
171
+  This option can only be used on non-Windows systems, when ``--proto
172
+  udp`` is specified, and when ``--shaper`` is NOT specified.
173
+
174
+--group group
175
+  Similar to the ``--user`` option, this option changes the group ID of
176
+  the OpenVPN process to ``group`` after initialization.
177
+
178
+--ignore-unknown-option args
179
+  Valid syntax:
180
+  ::
181
+
182
+     ignore-unknown-options opt1 opt2 opt3 ... optN
183
+
184
+  When one of options ``opt1 ... optN`` is encountered in the configuration
185
+  file the configuration file parsing does not fail if this OpenVPN version
186
+  does not support the option. Multiple ``--ignore-unknown-option`` options
187
+  can be given to support a larger number of options to ignore.
188
+
189
+  This option should be used with caution, as there are good security
190
+  reasons for having OpenVPN fail if it detects problems in a config file.
191
+  Having said that, there are valid reasons for wanting new software
192
+  features to gracefully degrade when encountered by older software
193
+  versions.
194
+
195
+  ``--ignore-unknown-option`` is available since OpenVPN 2.3.3.
196
+
197
+--iproute cmd
198
+  Set alternate command to execute instead of default ``iproute2`` command.
199
+  May be used in order to execute OpenVPN in unprivileged environment.
200
+
201
+--keying-material-exporter args
202
+  Save Exported Keying Material [RFC5705] of len bytes (must be between 16
203
+  and 4095 bytes) using ``label`` in environment
204
+  (:code:`exported_keying_material`) for use by plugins in
205
+  :code:`OPENVPN_PLUGIN_TLS_FINAL` callback.
206
+
207
+  Valid syntax:
208
+  ::
209
+
210
+    keying-material-exporter label len
211
+
212
+  Note that exporter ``labels`` have the potential to collide with existing
213
+  PRF labels. In order to prevent this, labels *MUST* begin with
214
+  :code:`EXPORTER`.
215
+
216
+--mlock
217
+  Disable paging by calling the POSIX mlockall function. Requires that
218
+  OpenVPN be initially run as root (though OpenVPN can subsequently
219
+  downgrade its UID using the ``--user`` option).
220
+
221
+  Using this option ensures that key material and tunnel data are never
222
+  written to disk due to virtual memory paging operations which occur
223
+  under most modern operating systems. It ensures that even if an attacker
224
+  was able to crack the box running OpenVPN, he would not be able to scan
225
+  the system swap file to recover previously used ephemeral keys, which
226
+  are used for a period of time governed by the ``--reneg`` options (see
227
+  below), then are discarded.
228
+
229
+  The downside of using ``--mlock`` is that it will reduce the amount of
230
+  physical memory available to other applications.
231
+
232
+--nice n
233
+  Change process priority after initialization (``n`` greater than 0 is
234
+  lower priority, ``n`` less than zero is higher priority).
235
+
236
+--persist-key
237
+  Don't re-read key files across :code:`SIGUSR1` or ``--ping-restart``.
238
+
239
+  This option can be combined with ``--user nobody`` to allow restarts
240
+  triggered by the :code:`SIGUSR1` signal. Normally if you drop root
241
+  privileges in OpenVPN, the daemon cannot be restarted since it will now
242
+  be unable to re-read protected key files.
243
+
244
+  This option solves the problem by persisting keys across :code:`SIGUSR1`
245
+  resets, so they don't need to be re-read.
246
+
247
+--remap-usr1 signal
248
+  Control whether internally or externally generated :code:`SIGUSR1` signals
249
+  are remapped to :code:`SIGHUP` (restart without persisting state) or
250
+  SIGTERM (exit).
251
+
252
+  ``signal`` can be set to :code:`SIGHUP` or :code:`SIGTERM`. By default,
253
+  no remapping occurs.
254
+
255
+--script-security level
256
+  This directive offers policy-level control over OpenVPN's usage of
257
+  external programs and scripts. Lower ``level`` values are more
258
+  restrictive, higher values are more permissive. Settings for ``level``:
259
+
260
+  :code:`0`
261
+      Strictly no calling of external programs.
262
+
263
+  :code:`1`
264
+      (Default) Only call built-in executables such as ifconfig,
265
+      ip, route, or netsh.
266
+
267
+  :code:`2`
268
+      Allow calling of built-in executables and user-defined
269
+      scripts.
270
+
271
+  :code:`3`
272
+      Allow passwords to be passed to scripts via environmental
273
+      variables (potentially unsafe).
274
+
275
+  OpenVPN releases before v2.3 also supported a ``method`` flag which
276
+  indicated how OpenVPN should call external commands and scripts. This
277
+  could be either :code:`execve` or :code:`system`. As of OpenVPN 2.3, this
278
+  flag is no longer accepted. In most \*nix environments the execve()
279
+  approach has been used without any issues.
280
+
281
+  Some directives such as ``--up`` allow options to be passed to the
282
+  external script. In these cases make sure the script name does not
283
+  contain any spaces or the configuration parser will choke because it
284
+  can't determine where the script name ends and script options start.
285
+
286
+  To run scripts in Windows in earlier OpenVPN versions you needed to
287
+  either add a full path to the script interpreter which can parse the
288
+  script or use the ``system`` flag to run these scripts. As of OpenVPN
289
+  2.3 it is now a strict requirement to have full path to the script
290
+  interpreter when running non-executables files. This is not needed for
291
+  executable files, such as .exe, .com, .bat or .cmd files. For example,
292
+  if you have a Visual Basic script, you must use this syntax now:
293
+
294
+  ::
295
+
296
+     --up 'C:\\Windows\\System32\\wscript.exe C:\\Program\ Files\\OpenVPN\\config\\my-up-script.vbs'
297
+
298
+  Please note the single quote marks and the escaping of the backslashes
299
+  (\\) and the space character.
300
+
301
+  The reason the support for the :code:`system` flag was removed is due to
302
+  the security implications with shell expansions when executing scripts
303
+  via the :code:`system()` call.
304
+
305
+--setcon context
306
+  Apply SELinux ``context`` after initialization. This essentially
307
+  provides the ability to restrict OpenVPN's rights to only network I/O
308
+  operations, thanks to SELinux. This goes further than ``--user`` and
309
+  ``--chroot`` in that those two, while being great security features,
310
+  unfortunately do not protect against privilege escalation by
311
+  exploitation of a vulnerable system call. You can of course combine all
312
+  three, but please note that since setcon requires access to /proc you
313
+  will have to provide it inside the chroot directory (e.g. with mount
314
+  --bind).
315
+
316
+  Since the setcon operation is delayed until after initialization,
317
+  OpenVPN can be restricted to just network-related system calls, whereas
318
+  by applying the context before startup (such as the OpenVPN one provided
319
+  in the SELinux Reference Policies) you will have to allow many things
320
+  required only during initialization.
321
+
322
+  Like with chroot, complications can result when scripts or restarts are
323
+  executed after the setcon operation, which is why you should really
324
+  consider using the ``--persist-key`` and ``--persist-tun`` options.
325
+
326
+--status args
327
+  Write operational status to ``file`` every ``n`` seconds.
328
+
329
+  Valid syntaxes:
330
+  ::
331
+
332
+    status file
333
+    status file n
334
+
335
+  Status can also be written to the syslog by sending a :code:`SIGUSR2`
336
+  signal.
337
+
338
+  With multi-client capability enabled on a server, the status file
339
+  includes a list of clients and a routing table. The output format can be
340
+  controlled by the ``--status-version`` option in that case.
341
+
342
+  For clients or instances running in point-to-point mode, it will contain
343
+  the traffic statistics.
344
+
345
+--status-version n
346
+  Set the status file format version number to ``n``.
347
+
348
+  This only affects the status file on servers with multi-client
349
+  capability enabled.  Valid status version values:
350
+
351
+  :code:`1`
352
+      Traditional format (default). The client list contains the
353
+      following fields comma-separated: Common Name, Real Address, Bytes
354
+      Received, Bytes Sent, Connected Since.
355
+
356
+  :code:`2`
357
+      A more reliable format for external processing. Compared to
358
+      version :code:`1`, the client list contains some additional fields:
359
+      Virtual Address, Virtual IPv6 Address, Username, Client ID, Peer ID,
360
+      Data Channel Cipher. Future versions may extend the number of fields.
361
+
362
+  :code:`3`
363
+      Identical to :code:`2`, but fields are tab-separated.
364
+
365
+--test-crypto
366
+  Do a self-test of OpenVPN's crypto options by encrypting and decrypting
367
+  test packets using the data channel encryption options specified above.
368
+  This option does not require a peer to function, and therefore can be
369
+  specified without ``--dev`` or ``--remote``.
370
+
371
+  The typical usage of ``--test-crypto`` would be something like this:
372
+  ::
373
+
374
+     openvpn --test-crypto --secret key
375
+
376
+  or
377
+
378
+  ::
379
+
380
+     openvpn --test-crypto --secret key --verb 9
381
+
382
+  This option is very useful to test OpenVPN after it has been ported to a
383
+  new platform, or to isolate problems in the compiler, OpenSSL crypto
384
+  library, or OpenVPN's crypto code. Since it is a self-test mode,
385
+  problems with encryption and authentication can be debugged
386
+  independently of network and tunnel issues.
387
+
388
+--tmp-dir dir
389
+  Specify a directory ``dir`` for temporary files. This directory will be
390
+  used by openvpn processes and script to communicate temporary data with
391
+  openvpn main process. Note that the directory must be writable by the
392
+  OpenVPN process after it has dropped it's root privileges.
393
+
394
+  This directory will be used by in the following cases:
395
+
396
+  * ``--client-connect`` scripts to dynamically generate client-specific
397
+    configuration files.
398
+
399
+  * :code:`OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY` plugin hook to return
400
+    success/failure via ``auth_control_file`` when using deferred auth
401
+    method
402
+
403
+  * :code:`OPENVPN_PLUGIN_ENABLE_PF` plugin hook to pass filtering rules
404
+    via ``pf_file``
405
+
406
+--use-prediction-resistance
407
+  Enable prediction resistance on mbed TLS's RNG.
408
+
409
+  Enabling prediction resistance causes the RNG to reseed in each call for
410
+  random. Reseeding this often can quickly deplete the kernel entropy
411
+  pool.
412
+
413
+  If you need this option, please consider running a daemon that adds
414
+  entropy to the kernel pool.
415
+
416
+--user user
417
+  Change the user ID of the OpenVPN process to ``user`` after
418
+  initialization, dropping privileges in the process. This option is
419
+  useful to protect the system in the event that some hostile party was
420
+  able to gain control of an OpenVPN session. Though OpenVPN's security
421
+  features make this unlikely, it is provided as a second line of defense.
422
+
423
+  By setting ``user`` to :code:`nobody` or somebody similarly unprivileged,
424
+  the hostile party would be limited in what damage they could cause. Of
425
+  course once you take away privileges, you cannot return them to an
426
+  OpenVPN session. This means, for example, that if you want to reset an
427
+  OpenVPN daemon with a :code:`SIGUSR1` signal (for example in response to
428
+  a DHCP reset), you should make use of one or more of the ``--persist``
429
+  options to ensure that OpenVPN doesn't need to execute any privileged
430
+  operations in order to restart (such as re-reading key files or running
431
+  ``ifconfig`` on the TUN device).
432
+
433
+--writepid file
434
+  Write OpenVPN's main process ID to ``file``.
0 435
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+INLINE FILE SUPPORT
1
+===================
2
+
3
+OpenVPN allows including files in the main configuration for the ``--ca``,
4
+``--cert``, ``--dh``, ``--extra-certs``, ``--key``, ``--pkcs12``,
5
+``--secret``, ``--crl-verify``, ``--http-proxy-user-pass``, ``--tls-auth``,
6
+``--auth-gen-token-secret``, ``--tls-crypt`` and ``--tls-crypt-v2``
7
+options.
8
+
9
+Each inline file started by the line ``<option>`` and ended by the line
10
+``</option>``
11
+
12
+Here is an example of an inline file usage
13
+
14
+::
15
+
16
+    <cert>
17
+    -----BEGIN CERTIFICATE-----
18
+    [...]
19
+    -----END CERTIFICATE-----
20
+    </cert>
21
+
22
+When using the inline file feature with ``--pkcs12`` the inline file has
23
+to be base64 encoded. Encoding of a .p12 file into base64 can be done
24
+for example with OpenSSL by running :code:`openssl base64 -in input.p12`
0 25
new file mode 100644
... ...
@@ -0,0 +1,409 @@
0
+Link Options
1
+------------
2
+This link options section covers options related to the connection between
3
+the local and the remote host.
4
+
5
+--bind keywords
6
+  Bind to local address and port. This is the default unless any of
7
+  ``--proto tcp-client`` , ``--http-proxy`` or ``--socks-proxy`` are used.
8
+
9
+  If the optional :code:`ipv6only` keyword is present OpenVPN will bind only
10
+  to IPv6 (as opposed to IPv6 and IPv4) when a IPv6 socket is opened.
11
+
12
+--float
13
+  Allow remote peer to change its IP address and/or port number, such as
14
+  due to DHCP (this is the default if ``--remote`` is not used).
15
+  ``--float`` when specified with ``--remote`` allows an OpenVPN session
16
+  to initially connect to a peer at a known address, however if packets
17
+  arrive from a new address and pass all authentication tests, the new
18
+  address will take control of the session. This is useful when you are
19
+  connecting to a peer which holds a dynamic address such as a dial-in
20
+  user or DHCP client.
21
+
22
+  Essentially, ``--float`` tells OpenVPN to accept authenticated packets
23
+  from any address, not only the address which was specified in the
24
+  ``--remote`` option.
25
+
26
+--fragment max
27
+  Enable internal datagram fragmentation so that no UDP datagrams are sent
28
+  which are larger than ``max`` bytes.
29
+
30
+  The ``max`` parameter is interpreted in the same way as the
31
+  ``--link-mtu`` parameter, i.e. the UDP packet size after encapsulation
32
+  overhead has been added in, but not including the UDP header itself.
33
+
34
+  The ``--fragment`` option only makes sense when you are using the UDP
35
+  protocol (``--proto udp``).
36
+
37
+  ``--fragment`` adds 4 bytes of overhead per datagram.
38
+
39
+  See the ``--mssfix`` option below for an important related option to
40
+  ``--fragment``.
41
+
42
+  It should also be noted that this option is not meant to replace UDP
43
+  fragmentation at the IP stack level. It is only meant as a last resort
44
+  when path MTU discovery is broken. Using this option is less efficient
45
+  than fixing path MTU discovery for your IP link and using native IP
46
+  fragmentation instead.
47
+
48
+  Having said that, there are circumstances where using OpenVPN's internal
49
+  fragmentation capability may be your only option, such as tunneling a
50
+  UDP multicast stream which requires fragmentation.
51
+
52
+--keepalive args
53
+  A helper directive designed to simplify the expression of ``--ping`` and
54
+  ``--ping-restart``.
55
+
56
+  Valid syntax:
57
+  ::
58
+
59
+     keepalive interval timeout
60
+
61
+  This option can be used on both client and server side, but it is enough
62
+  to add this on the server side as it will push appropriate ``--ping``
63
+  and ``--ping-restart`` options to the client. If used on both server and
64
+  client, the values pushed from server will override the client local
65
+  values.
66
+
67
+  The ``timeout`` argument will be twice as long on the server side. This
68
+  ensures that a timeout is detected on client side before the server side
69
+  drops the connection.
70
+
71
+  For example, ``--keepalive 10 60`` expands as follows:
72
+  ::
73
+
74
+     if mode server:
75
+         ping 10                    # Argument: interval
76
+         ping-restart 120           # Argument: timeout*2
77
+         push "ping 10"             # Argument: interval
78
+         push "ping-restart 60"     # Argument: timeout
79
+     else
80
+         ping 10                    # Argument: interval
81
+         ping-restart 60            # Argument: timeout
82
+
83
+--link-mtu n
84
+  Sets an upper bound on the size of UDP packets which are sent between
85
+  OpenVPN peers. *It's best not to set this parameter unless you know what
86
+  you're doing.*
87
+
88
+--local host
89
+  Local host name or IP address for bind. If specified, OpenVPN will bind
90
+  to this address only. If unspecified, OpenVPN will bind to all
91
+  interfaces.
92
+
93
+--lport port
94
+  Set local TCP/UDP port number or name. Cannot be used together with
95
+  ``--nobind`` option.
96
+
97
+--mark value
98
+  Mark encrypted packets being sent with value. The mark value can be
99
+  matched in policy routing and packetfilter rules. This option is only
100
+  supported in Linux and does nothing on other operating systems.
101
+
102
+--mode m
103
+  Set OpenVPN major mode. By default, OpenVPN runs in point-to-point mode
104
+  (:code:`p2p`). OpenVPN 2.0 introduces a new mode (:code:`server`) which
105
+  implements a multi-client server capability.
106
+
107
+--mssfix max
108
+  Announce to TCP sessions running over the tunnel that they should limit
109
+  their send packet sizes such that after OpenVPN has encapsulated them,
110
+  the resulting UDP packet size that OpenVPN sends to its peer will not
111
+  exceed ``max`` bytes. The default value is :code:`1450`.
112
+
113
+  The ``max`` parameter is interpreted in the same way as the
114
+  ``--link-mtu`` parameter, i.e. the UDP packet size after encapsulation
115
+  overhead has been added in, but not including the UDP header itself.
116
+  Resulting packet would be at most 28 bytes larger for IPv4 and 48 bytes
117
+  for IPv6 (20/40 bytes for IP header and 8 bytes for UDP header). Default
118
+  value of 1450 allows IPv4 packets to be transmitted over a link with MTU
119
+  1473 or higher without IP level fragmentation.
120
+
121
+  The ``--mssfix`` option only makes sense when you are using the UDP
122
+  protocol for OpenVPN peer-to-peer communication, i.e. ``--proto udp``.
123
+
124
+  ``--mssfix`` and ``--fragment`` can be ideally used together, where
125
+  ``--mssfix`` will try to keep TCP from needing packet fragmentation in
126
+  the first place, and if big packets come through anyhow (from protocols
127
+  other than TCP), ``--fragment`` will internally fragment them.
128
+
129
+  Both ``--fragment`` and ``--mssfix`` are designed to work around cases
130
+  where Path MTU discovery is broken on the network path between OpenVPN
131
+  peers.
132
+
133
+  The usual symptom of such a breakdown is an OpenVPN connection which
134
+  successfully starts, but then stalls during active usage.
135
+
136
+  If ``--fragment`` and ``--mssfix`` are used together, ``--mssfix`` will
137
+  take its default ``max`` parameter from the ``--fragment max`` option.
138
+
139
+  Therefore, one could lower the maximum UDP packet size to 1300 (a good
140
+  first try for solving MTU-related connection problems) with the
141
+  following options:
142
+  ::
143
+
144
+     --tun-mtu 1500 --fragment 1300 --mssfix
145
+
146
+--mtu-disc type
147
+  Should we do Path MTU discovery on TCP/UDP channel? Only supported on
148
+  OSes such as Linux that supports the necessary system call to set.
149
+
150
+  Valid types:
151
+
152
+  :code:`no`      Never send DF (Don't Fragment) frames
153
+
154
+  :code:`maybe`   Use per-route hints
155
+
156
+  :code:`yes`     Always DF (Don't Fragment)
157
+
158
+--mtu-test
159
+  To empirically measure MTU on connection startup, add the ``--mtu-test``
160
+  option to your configuration. OpenVPN will send ping packets of various
161
+  sizes to the remote peer and measure the largest packets which were
162
+  successfully received. The ``--mtu-test`` process normally takes about 3
163
+  minutes to complete.
164
+
165
+--nobind
166
+  Do not bind to local address and port. The IP stack will allocate a
167
+  dynamic port for returning packets. Since the value of the dynamic port
168
+  could not be known in advance by a peer, this option is only suitable
169
+  for peers which will be initiating connections by using the --remote
170
+  option.
171
+
172
+--passtos
173
+  Set the TOS field of the tunnel packet to what the payload's TOS is.
174
+
175
+--ping n
176
+  Ping remote over the TCP/UDP control channel if no packets have been
177
+  sent for at least ``n`` seconds (specify ``--ping`` on both peers to
178
+  cause ping packets to be sent in both directions since OpenVPN ping
179
+  packets are not echoed like IP ping packets). When used in one of
180
+  OpenVPN's secure modes (where ``--secret``, ``--tls-server`` or
181
+  ``--tls-client`` is specified), the ping packet will be
182
+  cryptographically secure.
183
+
184
+  This option has two intended uses:
185
+
186
+  (1)  Compatibility with stateful firewalls. The periodic ping will ensure
187
+       that a stateful firewall rule which allows OpenVPN UDP packets to
188
+       pass will not time out.
189
+
190
+  (2)  To provide a basis for the remote to test the existence of its peer
191
+       using the ``--ping-exit`` option.
192
+
193
+--ping-exit n
194
+  Causes OpenVPN to exit after ``n`` seconds pass without reception of a
195
+  ping or other packet from remote. This option can be combined with
196
+  ``--inactive``, ``--ping`` and ``--ping-exit`` to create a two-tiered
197
+  inactivity disconnect.
198
+
199
+  For example,
200
+  ::
201
+
202
+      openvpn [options...] --inactive 3600 --ping 10 --ping-exit 60
203
+
204
+  when used on both peers will cause OpenVPN to exit within 60 seconds if
205
+  its peer disconnects, but will exit after one hour if no actual tunnel
206
+  data is exchanged.
207
+
208
+--ping-restart n
209
+  Similar to ``--ping-exit``, but trigger a :code:`SIGUSR1` restart after
210
+  ``n`` seconds pass without reception of a ping or other packet from
211
+  remote.
212
+
213
+  This option is useful in cases where the remote peer has a dynamic IP
214
+  address and a low-TTL DNS name is used to track the IP address using a
215
+  service such as http://dyndns.org/ + a dynamic DNS client such as
216
+  ``ddclient``.
217
+
218
+  If the peer cannot be reached, a restart will be triggered, causing the
219
+  hostname used with ``--remote`` to be re-resolved (if ``--resolv-retry``
220
+  is also specified).
221
+
222
+  In server mode, ``--ping-restart``, ``--inactive`` or any other type of
223
+  internally generated signal will always be applied to individual client
224
+  instance objects, never to whole server itself. Note also in server mode
225
+  that any internally generated signal which would normally cause a
226
+  restart, will cause the deletion of the client instance object instead.
227
+
228
+  In client mode, the ``--ping-restart`` parameter is set to 120 seconds
229
+  by default. This default will hold until the client pulls a replacement
230
+  value from the server, based on the ``--keepalive`` setting in the
231
+  server configuration. To disable the 120 second default, set
232
+  ``--ping-restart 0`` on the client.
233
+
234
+  See the signals section below for more information on :code:`SIGUSR1`.
235
+
236
+  Note that the behavior of ``SIGUSR1`` can be modified by the
237
+  ``--persist-tun``, ``--persist-key``, ``--persist-local-ip`` and
238
+  ``--persist-remote-ip`` options.
239
+
240
+  Also note that ``--ping-exit`` and ``--ping-restart`` are mutually
241
+  exclusive and cannot be used together.
242
+
243
+--ping-timer-rem
244
+  Run the ``--ping-exit`` / ``--ping-restart`` timer only if we have a
245
+  remote address. Use this option if you are starting the daemon in listen
246
+  mode (i.e. without an explicit ``--remote`` peer), and you don't want to
247
+  start clocking timeouts until a remote peer connects.
248
+
249
+--proto p
250
+  Use protocol ``p`` for communicating with remote host. ``p`` can be
251
+  :code:`udp`, :code:`tcp-client`, or :code:`tcp-server`.
252
+
253
+  The default protocol is :code:`udp` when ``--proto`` is not specified.
254
+
255
+  For UDP operation, ``--proto udp`` should be specified on both peers.
256
+
257
+  For TCP operation, one peer must use ``--proto tcp-server`` and the
258
+  other must use ``--proto tcp-client``. A peer started with
259
+  :code:`tcp-server` will wait indefinitely for an incoming connection. A peer
260
+  started with :code:`tcp-client` will attempt to connect, and if that fails,
261
+  will sleep for 5 seconds (adjustable via the ``--connect-retry`` option)
262
+  and try again infinite or up to N retries (adjustable via the
263
+  ``--connect-retry-max`` option). Both TCP client and server will
264
+  simulate a SIGUSR1 restart signal if either side resets the connection.
265
+
266
+  OpenVPN is designed to operate optimally over UDP, but TCP capability is
267
+  provided for situations where UDP cannot be used. In comparison with
268
+  UDP, TCP will usually be somewhat less efficient and less robust when
269
+  used over unreliable or congested networks.
270
+
271
+  This article outlines some of problems with tunneling IP over TCP:
272
+  http://sites.inka.de/sites/bigred/devel/tcp-tcp.html
273
+
274
+  There are certain cases, however, where using TCP may be advantageous
275
+  from a security and robustness perspective, such as tunneling non-IP or
276
+  application-level UDP protocols, or tunneling protocols which don't
277
+  possess a built-in reliability layer.
278
+
279
+--port port
280
+  TCP/UDP port number or port name for both local and remote (sets both
281
+  ``--lport`` and ``--rport`` options to given port). The current default
282
+  of 1194 represents the official IANA port number assignment for OpenVPN
283
+  and has been used since version 2.0-beta17. Previous versions used port
284
+  5000 as the default.
285
+
286
+--rport port
287
+  Set TCP/UDP port number or name used by the ``--remote`` option. The
288
+  port can also be set directly using the ``--remote`` option.
289
+
290
+--replay-window args
291
+  Modify the replay protection sliding-window size and time window.
292
+
293
+  Valid syntax:
294
+  ::
295
+
296
+     replay-window n [t]
297
+
298
+  Use a replay protection sliding-window of size **n** and a time window
299
+  of **t** seconds.
300
+
301
+  By default **n** is 64 (the IPSec default) and **t** is 15 seconds.
302
+
303
+  This option is only relevant in UDP mode, i.e. when either **--proto
304
+  udp** is specified, or no **--proto** option is specified.
305
+
306
+  When OpenVPN tunnels IP packets over UDP, there is the possibility that
307
+  packets might be dropped or delivered out of order. Because OpenVPN,
308
+  like IPSec, is emulating the physical network layer, it will accept an
309
+  out-of-order packet sequence, and will deliver such packets in the same
310
+  order they were received to the TCP/IP protocol stack, provided they
311
+  satisfy several constraints.
312
+
313
+  (a)   The packet cannot be a replay (unless ``--no-replay`` is
314
+        specified, which disables replay protection altogether).
315
+
316
+  (b)   If a packet arrives out of order, it will only be accepted if
317
+        the difference between its sequence number and the highest sequence
318
+        number received so far is less than ``n``.
319
+
320
+  (c)   If a packet arrives out of order, it will only be accepted if it
321
+        arrives no later than ``t`` seconds after any packet containing a higher
322
+        sequence number.
323
+
324
+  If you are using a network link with a large pipeline (meaning that the
325
+  product of bandwidth and latency is high), you may want to use a larger
326
+  value for ``n``. Satellite links in particular often require this.
327
+
328
+  If you run OpenVPN at ``--verb 4``, you will see the message
329
+  "Replay-window backtrack occurred [x]" every time the maximum sequence
330
+  number backtrack seen thus far increases. This can be used to calibrate
331
+  ``n``.
332
+
333
+  There is some controversy on the appropriate method of handling packet
334
+  reordering at the security layer.
335
+
336
+  Namely, to what extent should the security layer protect the
337
+  encapsulated protocol from attacks which masquerade as the kinds of
338
+  normal packet loss and reordering that occur over IP networks?
339
+
340
+  The IPSec and OpenVPN approach is to allow packet reordering within a
341
+  certain fixed sequence number window.
342
+
343
+  OpenVPN adds to the IPSec model by limiting the window size in time as
344
+  well as sequence space.
345
+
346
+  OpenVPN also adds TCP transport as an option (not offered by IPSec) in
347
+  which case OpenVPN can adopt a very strict attitude towards message
348
+  deletion and reordering: Don't allow it. Since TCP guarantees
349
+  reliability, any packet loss or reordering event can be assumed to be an
350
+  attack.
351
+
352
+  In this sense, it could be argued that TCP tunnel transport is preferred
353
+  when tunneling non-IP or UDP application protocols which might be
354
+  vulnerable to a message deletion or reordering attack which falls within
355
+  the normal operational parameters of IP networks.
356
+
357
+  So I would make the statement that one should never tunnel a non-IP
358
+  protocol or UDP application protocol over UDP, if the protocol might be
359
+  vulnerable to a message deletion or reordering attack that falls within
360
+  the normal operating parameters of what is to be expected from the
361
+  physical IP layer. The problem is easily fixed by simply using TCP as
362
+  the VPN transport layer.
363
+
364
+--replay-persist file
365
+  Persist replay-protection state across sessions using ``file`` to save
366
+  and reload the state.
367
+
368
+  This option will strengthen protection against replay attacks,
369
+  especially when you are using OpenVPN in a dynamic context (such as with
370
+  ``--inetd``) when OpenVPN sessions are frequently started and stopped.
371
+
372
+  This option will keep a disk copy of the current replay protection state
373
+  (i.e. the most recent packet timestamp and sequence number received from
374
+  the remote peer), so that if an OpenVPN session is stopped and
375
+  restarted, it will reject any replays of packets which were already
376
+  received by the prior session.
377
+
378
+  This option only makes sense when replay protection is enabled (the
379
+  default) and you are using either ``--secret`` (shared-secret key mode)
380
+  or TLS mode with ``--tls-auth``.
381
+
382
+--socket-flags flags
383
+  Apply the given flags to the OpenVPN transport socket. Currently, only
384
+  :code:`TCP_NODELAY` is supported.
385
+
386
+  The :code:`TCP_NODELAY` socket flag is useful in TCP mode, and causes the
387
+  kernel to send tunnel packets immediately over the TCP connection without
388
+  trying to group several smaller packets into a larger packet.  This can
389
+  result in a considerably improvement in latency.
390
+
391
+  This option is pushable from server to client, and should be used on
392
+  both client and server for maximum effect.
393
+
394
+--tcp-nodelay
395
+  This macro sets the :code:`TCP_NODELAY` socket flag on the server as well
396
+  as pushes it to connecting clients. The :code:`TCP_NODELAY` flag disables
397
+  the Nagle algorithm on TCP sockets causing packets to be transmitted
398
+  immediately with low latency, rather than waiting a short period of time
399
+  in order to aggregate several packets into a larger containing packet.
400
+  In VPN applications over TCP, :code:`TCP_NODELAY` is generally a good
401
+  latency optimization.
402
+
403
+  The macro expands as follows:
404
+  ::
405
+
406
+     if mode server:
407
+         socket-flags TCP_NODELAY
408
+         push "socket-flags TCP_NODELAY"
0 409
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+Log options
1
+-----------
2
+
3
+--echo parms
4
+  Echo ``parms`` to log output.
5
+
6
+  Designed to be used to send messages to a controlling application which
7
+  is receiving the OpenVPN log output.
8
+
9
+--errors-to-stderr
10
+  Output errors to stderr instead of stdout unless log output is
11
+  redirected by one of the ``--log`` options.
12
+
13
+--log file
14
+  Output logging messages to ``file``, including output to stdout/stderr
15
+  which is generated by called scripts. If ``file`` already exists it will
16
+  be truncated. This option takes effect immediately when it is parsed in
17
+  the command line and will supersede syslog output if ``--daemon`` or
18
+  ``--inetd`` is also specified. This option is persistent over the entire
19
+  course of an OpenVPN instantiation and will not be reset by
20
+  :code:`SIGHUP`, :code:`SIGUSR1`, or ``--ping-restart``.
21
+
22
+  Note that on Windows, when OpenVPN is started as a service, logging
23
+  occurs by default without the need to specify this option.
24
+
25
+--log-append file
26
+  Append logging messages to ``file``.  If ``file`` does not exist, it will
27
+  be created. This option behaves exactly like ``--log`` except that it
28
+  appends to rather than truncating the log file.
29
+
30
+--machine-readable-output
31
+  Always write timestamps and message flags to log messages, even when
32
+  they otherwise would not be prefixed. In particular, this applies to log
33
+  messages sent to stdout.
34
+
35
+--mute n
36
+  Log at most ``n`` consecutive messages in the same category. This is
37
+  useful to limit repetitive logging of similar message types.
38
+
39
+--mute-replay-warnings
40
+  Silence the output of replay warnings, which are a common false alarm on
41
+  WiFi networks. This option preserves the security of the replay
42
+  protection code without the verbosity associated with warnings about
43
+  duplicate packets.
44
+
45
+--suppress-timestamps
46
+  Avoid writing timestamps to log messages, even when they otherwise would
47
+  be prepended. In particular, this applies to log messages sent to
48
+  stdout.
49
+
50
+--syslog progname
51
+  Direct log output to system logger, but do not become a daemon. See
52
+  ``--daemon`` directive above for description of ``progname`` parameter.
53
+
54
+--verb n
55
+  Set output verbosity to ``n`` (default :code:`1`). Each level shows all
56
+  info from the previous levels. Level :code:`3` is recommended if you want
57
+  a good summary of what's happening without being swamped by output.
58
+
59
+  :code:`0`
60
+      No output except fatal errors.
61
+
62
+  :code:`1` to :code:`4`
63
+      Normal usage range.
64
+
65
+  :code:`5`
66
+      Outputs :code:`R` and :code:`W` characters to the console for
67
+      each packet read and write, uppercase is used for TCP/UDP
68
+      packets and lowercase is used for TUN/TAP packets.
69
+
70
+  :code:`6` to :code:`11`
71
+      Debug info range (see :code:`errlevel.h` in the source code for
72
+      additional information on debug levels).
0 73
new file mode 100644
... ...
@@ -0,0 +1,135 @@
0
+Management Interface Options
1
+----------------------------
2
+OpenVPN provides a feature rich socket based management interface for both
3
+server and client mode operations.
4
+
5
+--management args
6
+  Enable a management server on a ``socket-name`` Unix socket on those
7
+  platforms supporting it, or on a designated TCP port.
8
+
9
+  Valid syntaxes:
10
+  ::
11
+
12
+    management socket-name unix          #
13
+    management socket-name unix pw-file  # (recommended)
14
+    management IP port                   # (INSECURE)
15
+    management IP port pw-file           #
16
+
17
+  ``pw-file``, if specified, is a password file where the password must
18
+  be on first line. Instead of a filename it can use the keyword stdin
19
+  which will prompt the user for a password to use when OpenVPN is
20
+  starting.
21
+
22
+  For unix sockets, the default behaviour is to create a unix domain
23
+  socket that may be connected to by any process. Use the
24
+  ``--management-client-user`` and ``--management-client-group``
25
+  directives to restrict access.
26
+
27
+  The management interface provides a special mode where the TCP
28
+  management link can operate over the tunnel itself. To enable this mode,
29
+  set IP to ``tunnel``. Tunnel mode will cause the management interface to
30
+  listen for a TCP connection on the local VPN address of the TUN/TAP
31
+  interface.
32
+
33
+  ***BEWARE*** of enabling the management interface over TCP. In these cases
34
+  you should *ALWAYS* make use of ``pw-file`` to password protect the
35
+  management interface. Any user who can connect to this TCP ``IP:port``
36
+  will be able to manage and control (and interfere with) the OpenVPN
37
+  process. It is also strongly recommended to set IP to 127.0.0.1
38
+  (localhost) to restrict accessibility of the management server to local
39
+  clients.
40
+
41
+  While the management port is designed for programmatic control of
42
+  OpenVPN by other applications, it is possible to telnet to the port,
43
+  using a telnet client in "raw" mode. Once connected, type :code:`help`
44
+  for a list of commands.
45
+
46
+  For detailed documentation on the management interface, see the
47
+  *management-notes.txt* file in the management folder of the OpenVPN
48
+  source distribution.
49
+
50
+--management-client
51
+  Management interface will connect as a TCP/unix domain client to
52
+  ``IP:port`` specified by ``--management`` rather than listen as a TCP
53
+  server or on a unix domain socket.
54
+
55
+  If the client connection fails to connect or is disconnected, a SIGTERM
56
+  signal will be generated causing OpenVPN to quit.
57
+
58
+--management-client-auth
59
+  Gives management interface client the responsibility to authenticate
60
+  clients after their client certificate has been verified. See
61
+  :code:`management-notes.txt` in OpenVPN distribution for detailed notes.
62
+
63
+--management-client-group g
64
+  When the management interface is listening on a unix domain socket, only
65
+  allow connections from group ``g``.
66
+
67
+--management-client-pf
68
+  Management interface clients must specify a packet filter file for each
69
+  connecting client. See :code:`management-notes.txt` in OpenVPN
70
+  distribution for detailed notes.
71
+
72
+--management-client-user u
73
+  When the management interface is listening on a unix domain socket, only
74
+  allow connections from user ``u``.
75
+
76
+--management-external-cert certificate-hint
77
+  Allows usage for external certificate instead of ``--cert`` option
78
+  (client-only). ``certificate-hint`` is an arbitrary string which is
79
+  passed to a management interface client as an argument of
80
+  *NEED-CERTIFICATE* notification. Requires ``--management-external-key``.
81
+
82
+--management-external-key args
83
+  Allows usage for external private key file instead of ``--key`` option
84
+  (client-only).
85
+
86
+  Valid syntaxes:
87
+  ::
88
+
89
+     management-external-key
90
+     management-external-key nopadding
91
+     management-external-key pkcs1
92
+     management-external-key nopadding pkcs1
93
+
94
+  The optional parameters :code:`nopadding` and :code:`pkcs1` signal
95
+  support for different padding algorithms. See
96
+  :code:`doc/mangement-notes.txt` for a complete description of this
97
+  feature.
98
+
99
+--management-forget-disconnect
100
+  Make OpenVPN forget passwords when management session disconnects.
101
+
102
+  This directive does not affect the ``--http-proxy`` username/password.
103
+  It is always cached.
104
+
105
+--management-hold
106
+  Start OpenVPN in a hibernating state, until a client of the management
107
+  interface explicitly starts it with the :code:`hold release` command.
108
+
109
+--management-log-cache n
110
+  Cache the most recent ``n`` lines of log file history for usage by the
111
+  management channel.
112
+
113
+--management-query-passwords
114
+  Query management channel for private key password and
115
+  ``--auth-user-pass`` username/password. Only query the management
116
+  channel for inputs which ordinarily would have been queried from the
117
+  console.
118
+
119
+--management-query-proxy
120
+  Query management channel for proxy server information for a specific
121
+  ``--remote`` (client-only).
122
+
123
+--management-query-remote
124
+  Allow management interface to override ``--remote`` directives
125
+  (client-only).
126
+
127
+--management-signal
128
+  Send SIGUSR1 signal to OpenVPN if management session disconnects. This
129
+  is useful when you wish to disconnect an OpenVPN session on user logoff.
130
+  For ``--management-client`` this option is not needed since a disconnect
131
+  will always generate a :code:`SIGTERM`.
132
+
133
+--management-up-down
134
+  Report tunnel up/down events to management interface.
0 135
new file mode 100644
... ...
@@ -0,0 +1,9 @@
0
+NETWORK CONFIGURATION
1
+=====================
2
+
3
+OpenVPN consists of two sides of network configuration.  One side is the
4
+*link* between the local and remote side, the other side is the *virtual
5
+network adapter* (tun/tap device).
6
+
7
+.. include:: link-options.rst
8
+.. include:: vpn-network-options.rst
0 9
new file mode 100644
... ...
@@ -0,0 +1,80 @@
0
+PKCS#11 / SmartCard options
1
+---------------------------
2
+
3
+--pkcs11-cert-private args
4
+  Set if access to certificate object should be performed after login.
5
+  Every provider has its own setting.
6
+
7
+  Valid syntaxes:
8
+  ::
9
+
10
+     pkcs11-cert-private 0
11
+     pkcs11-cert-private 1
12
+
13
+--pkcs11-id name
14
+  Specify the serialized certificate id to be used. The id can be gotten
15
+  by the standalone ``--show-pkcs11-ids`` option.
16
+
17
+--pkcs11-id-management
18
+  Acquire PKCS#11 id from management interface. In this case a
19
+  :code:`NEED-STR 'pkcs11-id-request'` real-time message will be triggered,
20
+  application may use pkcs11-id-count command to retrieve available number of
21
+  certificates, and pkcs11-id-get command to retrieve certificate id and
22
+  certificate body.
23
+
24
+--pkcs11-pin-cache seconds
25
+  Specify how many seconds the PIN can be cached, the default is until the
26
+  token is removed.
27
+
28
+--pkcs11-private-mode mode
29
+  Specify which method to use in order to perform private key operations.
30
+  A different mode can be specified for each provider. Mode is encoded as
31
+  hex number, and can be a mask one of the following:
32
+
33
+  :code:`0` (default)   Try to determine automatically.
34
+
35
+  :code:`1`             Use sign.
36
+
37
+  :code:`2`             Use sign recover.
38
+
39
+  :code:`4`             Use decrypt.
40
+
41
+  :code:`8`             Use unwrap.
42
+
43
+--pkcs11-protected-authentication args
44
+  Use PKCS#11 protected authentication path, useful for biometric and
45
+  external keypad devices. Every provider has its own setting.
46
+
47
+  Valid syntaxes:
48
+  ::
49
+
50
+     pkcs11-protected-authentication 0
51
+     pkcs11-protected-authentication 1
52
+
53
+--pkcs11-providers provider
54
+  Specify an RSA Security Inc. PKCS #11 Cryptographic Token Interface
55
+  (Cryptoki) providers to load. This option can be used instead of
56
+  ``--cert``, ``--key`` and ``--pkcs12``.
57
+
58
+  If p11-kit is present on the system, its :code:`p11-kit-proxy.so` module
59
+  will be loaded by default if either the ``--pkcs11-id`` or
60
+  ``--pkcs11-id-management`` options are specified without
61
+  ``--pkcs11-provider`` being given.
62
+
63
+--show-pkcs11-ids args
64
+  (Standalone) Show PKCS#11 token object list.
65
+
66
+  Valid syntax:
67
+  ::
68
+
69
+     show-pkcs11 [provider] [cert_private]
70
+
71
+  Specify ``cert_private`` as :code:`1` if certificates are stored as
72
+  private objects.
73
+
74
+  If *p11-kit* is present on the system, the ``provider`` argument is
75
+  optional; if omitted the default :code:`p11-kit-proxy.so` module will be
76
+  queried.
77
+
78
+  ``--verb`` option can be used BEFORE this option to produce debugging
79
+  information.
0 80
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+Plug-in Interface Options
1
+-------------------------
2
+
3
+OpenVPN can be extended by loading external plug-in modules at runtime.  These
4
+plug-ins must be prebuilt and adhere to the OpenVPN Plug-In API.
5
+
6
+--plugin args
7
+  Loads an OpenVPN plug-in module.
8
+
9
+  Valid syntax:
10
+  ::
11
+
12
+     plugin module-name
13
+     plugin module-name "arguments"
14
+
15
+  The ``module-name`` needs to be the first
16
+  argument, indicating the plug-in to load.  The second argument is an
17
+  optional init string which will be passed directly to the plug-in.
18
+  If the init consists of multiple arguments it must be enclosed in
19
+  double-quotes (\").  Multiple plugin modules may be loaded into one
20
+  OpenVPN process.
21
+
22
+  The ``module-name`` argument can be just a filename or a filename
23
+  with a relative or absolute path. The format of the filename and path
24
+  defines if the plug-in will be loaded from a default plug-in directory
25
+  or outside this directory.
26
+  ::
27
+
28
+    --plugin path         Effective directory used
29
+    ===================== =============================
30
+     myplug.so            DEFAULT_DIR/myplug.so
31
+     subdir/myplug.so     DEFAULT_DIR/subdir/myplug.so
32
+     ./subdir/myplug.so   CWD/subdir/myplug.so
33
+     /usr/lib/my/plug.so  /usr/lib/my/plug.so
34
+
35
+
36
+  ``DEFAULT_DIR`` is replaced by the default plug-in directory, which is
37
+  configured at the build time of OpenVPN. ``CWD`` is the current directory
38
+  where OpenVPN was started or the directory OpenVPN have switched into
39
+  via the ``--cd`` option before the ``--plugin`` option.
40
+
41
+  For more information and examples on how to build OpenVPN plug-in
42
+  modules, see the README file in the ``plugin`` folder of the OpenVPN
43
+  source distribution.
44
+
45
+  If you are using an RPM install of OpenVPN, see
46
+  :code:`/usr/share/openvpn/plugin`. The documentation is in ``doc`` and
47
+  the actual plugin modules are in ``lib``.
48
+
49
+  Multiple plugin modules can be cascaded, and modules can be used in
50
+  tandem with scripts. The modules will be called by OpenVPN in the order
51
+  that they are declared in the config file. If both a plugin and script
52
+  are configured for the same callback, the script will be called last. If
53
+  the return code of the module/script controls an authentication function
54
+  (such as tls-verify, auth-user-pass-verify, or client-connect), then
55
+  every module and script must return success (:code:`0`) in order for the
56
+  connection to be authenticated.
0 57
new file mode 100644
... ...
@@ -0,0 +1,228 @@
0
+Protocol options
1
+----------------
2
+Options in this section affect features available in the OpenVPN wire
3
+protocol.  Many of these options also define the encryption options
4
+of the data channel in the OpenVPN wire protocol.  These options must be
5
+configured in a compatible way between both the local and remote side.
6
+
7
+--auth alg
8
+  Authenticate data channel packets and (if enabled) ``tls-auth`` control
9
+  channel packets with HMAC using message digest algorithm ``alg``. (The
10
+  default is ``SHA1`` ). HMAC is a commonly used message authentication
11
+  algorithm (MAC) that uses a data string, a secure hash algorithm and a
12
+  key to produce a digital signature.
13
+
14
+  The OpenVPN data channel protocol uses encrypt-then-mac (i.e. first
15
+  encrypt a packet then HMAC the resulting ciphertext), which prevents
16
+  padding oracle attacks.
17
+
18
+  If an AEAD cipher mode (e.g. GCM) is chosen then the specified ``--auth``
19
+  algorithm is ignored for the data channel and the authentication method
20
+  of the AEAD cipher is used instead. Note that ``alg`` still specifies
21
+  the digest used for ``tls-auth``.
22
+
23
+  In static-key encryption mode, the HMAC key is included in the key file
24
+  generated by ``--genkey``. In TLS mode, the HMAC key is dynamically
25
+  generated and shared between peers via the TLS control channel. If
26
+  OpenVPN receives a packet with a bad HMAC it will drop the packet. HMAC
27
+  usually adds 16 or 20 bytes per packet. Set ``alg=none`` to disable
28
+  authentication.
29
+
30
+  For more information on HMAC see
31
+  http://www.cs.ucsd.edu/users/mihir/papers/hmac.html
32
+
33
+--cipher alg
34
+  Encrypt data channel packets with cipher algorithm ``alg``.
35
+
36
+  The default is :code:`BF-CBC`, an abbreviation for Blowfish in Cipher
37
+  Block Chaining mode. When cipher negotiation (NCP) is allowed,
38
+  OpenVPN 2.4 and newer on both client and server side will automatically
39
+  upgrade to :code:`AES-256-GCM`.  See ``--ncp-ciphers`` and
40
+  ``--ncp-disable`` for more details on NCP.
41
+
42
+  Using :code:`BF-CBC` is no longer recommended, because of its 64-bit
43
+  block size. This small block size allows attacks based on collisions, as
44
+  demonstrated by SWEET32. See
45
+  https://community.openvpn.net/openvpn/wiki/SWEET32
46
+  for details. Due to this, support for :code:`BF-CBC`, :code:`DES`,
47
+  :code:`CAST5`, :code:`IDEA` and :code:`RC2` ciphers will be removed in
48
+  OpenVPN 2.6.
49
+
50
+  To see other ciphers that are available with OpenVPN, use the
51
+  ``--show-ciphers`` option.
52
+
53
+  Set ``alg`` to :code:`none` to disable encryption.
54
+
55
+--compress algorithm
56
+  **DEPRECATED** Enable a compression algorithm.  Compression is generally
57
+  not recommended.  VPN tunnels which use compression are susceptible to
58
+  the VORALCE attack vector.
59
+
60
+  The ``algorithm`` parameter may be :code:`lzo`, :code:`lz4`, or empty.
61
+  LZO and LZ4 are different compression algorithms, with LZ4 generally
62
+  offering the best performance with least CPU usage. For backwards
63
+  compatibility with OpenVPN versions before v2.4, use :code:`lzo` (which
64
+  is identical to the older option ``--comp-lzo yes``).
65
+
66
+  If the ``algorithm`` parameter is empty, compression will be turned off,
67
+  but the packet framing for compression will still be enabled, allowing a
68
+  different setting to be pushed later.
69
+
70
+  ***Security Considerations***
71
+
72
+  Compression and encryption is a tricky combination. If an attacker knows
73
+  or is able to control (parts of) the plaintext of packets that contain
74
+  secrets, the attacker might be able to extract the secret if compression
75
+  is enabled. See e.g. the CRIME and BREACH attacks on TLS which also
76
+  leverage compression to break encryption. If you are not entirely sure
77
+  that the above does not apply to your traffic, you are advised to
78
+  *not* enable compression.
79
+
80
+--comp-lzo mode
81
+  *DEPRECATED* This option will be removed in a future OpenVPN release.
82
+  Use the newer ``--compress`` instead.
83
+
84
+  Use LZO compression -- may add up to 1 byte per packet for incompressible
85
+  data. ``mode`` may be :code:`yes`, :code:`no`, or :code:`adaptive`
86
+  (default).
87
+
88
+  In a server mode setup, it is possible to selectively turn compression
89
+  on or off for individual clients.
90
+
91
+  First, make sure the client-side config file enables selective
92
+  compression by having at least one ``--comp-lzo`` directive, such as
93
+  ``--comp-lzo no``. This will turn off compression by default, but allow
94
+  a future directive push from the server to dynamically change the
95
+  :code:`on`/:code:`off`/:code:`adaptive` setting.
96
+
97
+  Next in a ``--client-config-dir`` file, specify the compression setting
98
+  for the client, for example:
99
+  ::
100
+
101
+    comp-lzo yes
102
+    push "comp-lzo yes"
103
+
104
+  The first line sets the ``comp-lzo`` setting for the server side of the
105
+  link, the second sets the client side.
106
+
107
+--comp-noadapt
108
+  When used in conjunction with ``--comp-lzo``, this option will disable
109
+  OpenVPN's adaptive compression algorithm. Normally, adaptive compression
110
+  is enabled with ``--comp-lzo``.
111
+
112
+  Adaptive compression tries to optimize the case where you have
113
+  compression enabled, but you are sending predominantly incompressible
114
+  (or pre-compressed) packets over the tunnel, such as an FTP or rsync
115
+  transfer of a large, compressed file. With adaptive compression, OpenVPN
116
+  will periodically sample the compression process to measure its
117
+  efficiency. If the data being sent over the tunnel is already
118
+  compressed, the compression efficiency will be very low, triggering
119
+  openvpn to disable compression for a period of time until the next
120
+  re-sample test.
121
+
122
+--key-direction
123
+  Alternative way of specifying the optional direction parameter for the
124
+  ``--tls-auth`` and ``--secret`` options. Useful when using inline files
125
+  (See section on inline files).
126
+
127
+--keysize n
128
+  **DEPRECATED** This option will be removed in OpenVPN 2.6.
129
+
130
+  Size of cipher key in bits (optional). If unspecified, defaults to
131
+  cipher-specific default. The ``--show-ciphers`` option (see below) shows
132
+  all available OpenSSL ciphers, their default key sizes, and whether the
133
+  key size can be changed. Use care in changing a cipher's default key
134
+  size. Many ciphers have not been extensively cryptanalyzed with
135
+  non-standard key lengths, and a larger key may offer no real guarantee
136
+  of greater security, or may even reduce security.
137
+
138
+--ncp-ciphers cipher-list
139
+  Restrict the allowed ciphers to be negotiated to the ciphers in
140
+  ``cipher-list``. ``cipher-list`` is a colon-separated list of ciphers,
141
+  and defaults to :code:`AES-256-GCM:AES-128-GCM`.
142
+
143
+  For servers, the first cipher from ``cipher-list`` that is also
144
+  supported by the client will be pushed to clients that support cipher
145
+  negotiation.
146
+
147
+  Cipher negotiation is enabled in client-server mode only. I.e. if
148
+  ``--mode`` is set to 'server' (server-side, implied by setting
149
+  ``--server`` ), or if ``--pull`` is specified (client-side, implied by
150
+  setting --client).
151
+
152
+  If both peers support and do not disable NCP, the negotiated cipher will
153
+  override the cipher specified by ``--cipher``.
154
+
155
+  Additionally, to allow for more smooth transition, if NCP is enabled,
156
+  OpenVPN will inherit the cipher of the peer if that cipher is different
157
+  from the local ``--cipher`` setting, but the peer cipher is one of the
158
+  ciphers specified in ``--ncp-ciphers``. E.g. a non-NCP client (<=v2.3,
159
+  or with --ncp-disabled set) connecting to a NCP server (v2.4+) with
160
+  ``--cipher BF-CBC`` and ``--ncp-ciphers AES-256-GCM:AES-256-CBC`` set can
161
+  either specify ``--cipher BF-CBC`` or ``--cipher AES-256-CBC`` and both
162
+  will work.
163
+
164
+  Note for using NCP with an OpenVPN 2.4 peer: This list must include the
165
+  :code:`AES-256-GCM` and :code:`AES-128-GCM` ciphers.
166
+
167
+  This list is restricted to be 127 chars long after conversion to OpenVPN
168
+  ciphers.
169
+
170
+--ncp-disable
171
+  Disable "Negotiable Crypto Parameters". This completely disables cipher
172
+  negotiation.
173
+
174
+--secret args
175
+  Enable Static Key encryption mode (non-TLS). Use pre-shared secret
176
+  ``file`` which was generated with ``--genkey``.
177
+
178
+  Valid syntaxes:
179
+  ::
180
+
181
+     secret file
182
+     secret file direction
183
+
184
+  The optional ``direction`` parameter enables the use of 4 distinct keys
185
+  (HMAC-send, cipher-encrypt, HMAC-receive, cipher-decrypt), so that each
186
+  data flow direction has a different set of HMAC and cipher keys. This
187
+  has a number of desirable security properties including eliminating
188
+  certain kinds of DoS and message replay attacks.
189
+
190
+  When the ``direction`` parameter is omitted, 2 keys are used
191
+  bidirectionally, one for HMAC and the other for encryption/decryption.
192
+
193
+  The ``direction`` parameter should always be complementary on either
194
+  side of the connection, i.e. one side should use :code:`0` and the other
195
+  should use :code:`1`, or both sides should omit it altogether.
196
+
197
+  The ``direction`` parameter requires that ``file`` contains a 2048 bit
198
+  key. While pre-1.5 versions of OpenVPN generate 1024 bit key files, any
199
+  version of OpenVPN which supports the ``direction`` parameter, will also
200
+  support 2048 bit key file generation using the ``--genkey`` option.
201
+
202
+  Static key encryption mode has certain advantages, the primary being
203
+  ease of configuration.
204
+
205
+  There are no certificates or certificate authorities or complicated
206
+  negotiation handshakes and protocols. The only requirement is that you
207
+  have a pre-existing secure channel with your peer (such as ``ssh``) to
208
+  initially copy the key. This requirement, along with the fact that your
209
+  key never changes unless you manually generate a new one, makes it
210
+  somewhat less secure than TLS mode (see below). If an attacker manages
211
+  to steal your key, everything that was ever encrypted with it is
212
+  compromised. Contrast that to the perfect forward secrecy features of
213
+  TLS mode (using Diffie Hellman key exchange), where even if an attacker
214
+  was able to steal your private key, he would gain no information to help
215
+  him decrypt past sessions.
216
+
217
+  Another advantageous aspect of Static Key encryption mode is that it is
218
+  a handshake-free protocol without any distinguishing signature or
219
+  feature (such as a header or protocol handshake sequence) that would
220
+  mark the ciphertext packets as being generated by OpenVPN. Anyone
221
+  eavesdropping on the wire would see nothing but random-looking data.
222
+
223
+--tran-window n
224
+  Transition window -- our old key can live this many seconds after a new
225
+  a key renegotiation begins (default :code:`3600` seconds). This feature
226
+  allows for a graceful transition from old to new key, and removes the key
227
+  renegotiation sequence from the critical path of tunnel data forwarding.
0 228
new file mode 100644
... ...
@@ -0,0 +1,65 @@
0
+--show-proxy-settings
1
+  Show sensed HTTP or SOCKS proxy settings. Currently, only Windows
2
+  clients support this option.
3
+
4
+--http-proxy args
5
+  Connect to remote host through an HTTP proxy.  This requires at least an
6
+  address ``server`` and ``port`` argument.  If HTTP Proxy-Authenticate
7
+  is required, a file name to an ``authfile`` file containing a username
8
+  and password on 2 lines can be given, or :code:`stdin` to prompt from
9
+  console. Its content can also be specified in the config file with the
10
+  ``--http-proxy-user-pass`` option. (See section on inline files)
11
+
12
+  The last optional argument is an ``auth-method`` which should be one
13
+  of :code:`none`, :code:`basic`, or :code:`ntlm`.
14
+
15
+  HTTP Digest authentication is supported as well, but only via the
16
+  :code:`auto` or :code:`auto-nct` flags (below).  This must replace
17
+  the ``authfile`` argument.
18
+
19
+  The :code:`auto` flag causes OpenVPN to automatically determine the
20
+  ``auth-method`` and query stdin or the management interface for
21
+  username/password credentials, if required. This flag exists on OpenVPN
22
+  2.1 or higher.
23
+
24
+  The ``auto-nct`` flag (no clear-text auth) instructs OpenVPN to
25
+  automatically determine the authentication method, but to reject weak
26
+  authentication protocols such as HTTP Basic Authentication.
27
+
28
+  Examples:
29
+  ::
30
+
31
+     http-proxy proxy.example.net 3128
32
+     http-proxy proxy.example.net 3128 authfile.txt
33
+     http-proxy proxy.example.net 3128 stdin
34
+     http-proxy proxy.example.net 3128 auto basic
35
+     http-proxy proxy.example.net 3128 auto-nct ntlm
36
+
37
+--http-proxy-option args
38
+  Set extended HTTP proxy options. Requires an option ``type`` as argument
39
+  and an optional ``parameter`` to the type.  Repeat to set multiple
40
+  options.
41
+
42
+  :code:`VERSION` ``version``
43
+      Set HTTP version number to ``version`` (default :code:`1.0`).
44
+
45
+  :code:`AGENT` ``user-agent``
46
+      Set HTTP "User-Agent" string to ``user-agent``.
47
+
48
+  :code:`CUSTOM-HEADER` ``name`` ``content``
49
+      Adds the custom Header with ``name`` as name and ``content`` as
50
+      the content of the custom HTTP header.
51
+
52
+  Examples:
53
+  ::
54
+
55
+     http-proxy-option VERSION 1.1
56
+     http-proxy-option AGENT OpenVPN/2.4
57
+     http-proxy-option X-Proxy-Flag some-flags
58
+
59
+--socks-proxy args
60
+  Connect to remote host through a Socks5 proxy.  A required ``server``
61
+  argument is needed.  Optionally a ``port`` (default :code:`1080`) and
62
+  ``authfile`` can be given.  The ``authfile`` is a file containing a
63
+  username and password on 2 lines, or :code:`stdin` can be used to
64
+  prompt from console.
0 65
new file mode 100644
... ...
@@ -0,0 +1,52 @@
0
+Data Channel Renegotiation
1
+--------------------------
2
+
3
+When running OpenVPN in client/server mode, the data channel will use a
4
+separate ephemeral encryption key which is rotated at regular intervals.
5
+
6
+--reneg-bytes n
7
+  Renegotiate data channel key after ``n`` bytes sent or received
8
+  (disabled by default with an exception, see below). OpenVPN allows the
9
+  lifetime of a key to be expressed as a number of bytes
10
+  encrypted/decrypted, a number of packets, or a number of seconds. A key
11
+  renegotiation will be forced if any of these three criteria are met by
12
+  either peer.
13
+
14
+  If using ciphers with cipher block sizes less than 128-bits,
15
+  ``--reneg-bytes`` is set to 64MB by default, unless it is explicitly
16
+  disabled by setting the value to :code:`0`, but this is
17
+  **HIGHLY DISCOURAGED** as this is designed to add some protection against
18
+  the SWEET32 attack vector. For more information see the ``--cipher``
19
+  option.
20
+
21
+--reneg-pkts n
22
+  Renegotiate data channel key after **n** packets sent and received
23
+  (disabled by default).
24
+
25
+--reneg-sec args
26
+  Renegotiate data channel key after at most ``max`` seconds
27
+  (default :code:`3600`) and at least ``min`` seconds (default is 90% of
28
+  ``max`` for servers, and equal to ``max`` for clients).
29
+  ::
30
+
31
+     reneg-sec max [min]
32
+
33
+  The effective ``--reneg-sec`` value used is per session
34
+  pseudo-uniform-randomized between ``min`` and ``max``.
35
+
36
+  With the default value of :code:`3600` this results in an effective per
37
+  session value in the range of :code:`3240`..:code:`3600` seconds for
38
+  servers, or just 3600 for clients.
39
+
40
+  When using dual-factor authentication, note that this default value may
41
+  cause the end user to be challenged to reauthorize once per hour.
42
+
43
+  Also, keep in mind that this option can be used on both the client and
44
+  server, and whichever uses the lower value will be the one to trigger
45
+  the renegotiation. A common mistake is to set ``--reneg-sec`` to a
46
+  higher value on either the client or server, while the other side of the
47
+  connection is still using the default value of :code:`3600` seconds,
48
+  meaning that the renegotiation will still occur once per :code:`3600`
49
+  seconds. The solution is to increase --reneg-sec on both the client and
50
+  server, or set it to :code:`0` on one side of the connection (to
51
+  disable), and to your chosen value on the other side.
0 52
new file mode 100644
... ...
@@ -0,0 +1,806 @@
0
+SCRIPTING INTEGRATION
1
+=====================
2
+
3
+OpenVPN can execute external scripts in various phases of the lifetime of
4
+the OpenVPN process.
5
+
6
+
7
+Script Order of Execution
8
+-------------------------
9
+
10
+#. ``--up``
11
+
12
+   Executed after TCP/UDP socket bind and TUN/TAP open.
13
+
14
+#. ``--tls-verify``
15
+
16
+   Executed when we have a still untrusted remote peer.
17
+
18
+#. ``--ipchange``
19
+
20
+   Executed after connection authentication, or remote IP address change.
21
+
22
+#. ``--client-connect``
23
+
24
+   Executed in **--mode server** mode immediately after client
25
+   authentication.
26
+
27
+#. ``--route-up``
28
+
29
+   Executed after connection authentication, either immediately after, or
30
+   some number of seconds after as defined by the **--route-delay** option.
31
+
32
+#. ``--route-pre-down``
33
+
34
+   Executed right before the routes are removed.
35
+
36
+#. ``--client-disconnect``
37
+
38
+   Executed in ``--mode server`` mode on client instance shutdown.
39
+
40
+#. ``--down``
41
+
42
+   Executed after TCP/UDP and TUN/TAP close.
43
+
44
+#. ``--learn-address``
45
+
46
+   Executed in ``--mode server`` mode whenever an IPv4 address/route or MAC
47
+   address is added to OpenVPN's internal routing table.
48
+
49
+#. ``--auth-user-pass-verify``
50
+
51
+   Executed in ``--mode server`` mode on new client connections, when the
52
+   client is still untrusted.
53
+
54
+SCRIPT HOOKS
55
+------------
56
+
57
+--auth-user-pass-verify args
58
+  Require the client to provide a username/password (possibly in addition
59
+  to a client certificate) for authentication.
60
+
61
+  Valid syntax:
62
+  ::
63
+
64
+     auth-user-pass-verify cmd method
65
+
66
+  OpenVPN will run command ``cmd`` to validate the username/password
67
+  provided by the client.
68
+
69
+  ``cmd`` consists of a path to a script (or executable program), optionally
70
+  followed by arguments. The path and arguments may be single- or
71
+  double-quoted and/or escaped using a backslash, and should be separated
72
+  by one or more spaces.
73
+
74
+  If ``method`` is set to :code:`via-env`, OpenVPN will call ``script``
75
+  with the environmental variables :code:`username` and :code:`password`
76
+  set to the username/password strings provided by the client. *Beware*
77
+  that this method is insecure on some platforms which make the environment
78
+  of a process publicly visible to other unprivileged processes.
79
+
80
+  If ``method`` is set to :code:`via-file`, OpenVPN will write the username
81
+  and password to the first two lines of a temporary file. The filename
82
+  will be passed as an argument to ``script``, and the file will be
83
+  automatically deleted by OpenVPN after the script returns. The location
84
+  of the temporary file is controlled by the ``--tmp-dir`` option, and
85
+  will default to the current directory if unspecified. For security,
86
+  consider setting ``--tmp-dir`` to a volatile storage medium such as
87
+  :code:`/dev/shm` (if available) to prevent the username/password file
88
+  from touching the hard drive.
89
+
90
+  The script should examine the username and password, returning a success
91
+  exit code (:code:`0`) if the client's authentication request is to be
92
+  accepted, or a failure code (:code:`1`) to reject the client.
93
+
94
+  This directive is designed to enable a plugin-style interface for
95
+  extending OpenVPN's authentication capabilities.
96
+
97
+  To protect against a client passing a maliciously formed username or
98
+  password string, the username string must consist only of these
99
+  characters: alphanumeric, underbar (':code:`_`'), dash (':code:`-`'),
100
+  dot (':code:`.`'), or at (':code:`@`'). The password string can consist
101
+  of any printable characters except for CR or LF. Any illegal characters
102
+  in either the username or password string will be converted to
103
+  underbar (':code:`_`').
104
+
105
+  Care must be taken by any user-defined scripts to avoid creating a
106
+  security vulnerability in the way that these strings are handled. Never
107
+  use these strings in such a way that they might be escaped or evaluated
108
+  by a shell interpreter.
109
+
110
+  For a sample script that performs PAM authentication, see
111
+  :code:`sample-scripts/auth-pam.pl` in the OpenVPN source distribution.
112
+
113
+--client-connect cmd
114
+  Run command ``cmd`` on client connection.
115
+
116
+  ``cmd`` consists of a path to a script (or executable program), optionally
117
+  followed by arguments. The path and arguments may be single- or
118
+  double-quoted and/or escaped using a backslash, and should be separated
119
+  by one or more spaces.
120
+
121
+  The command is passed the common name and IP address of the
122
+  just-authenticated client as environmental variables (see environmental
123
+  variable section below). The command is also passed the pathname of a
124
+  freshly created temporary file as the last argument (after any arguments
125
+  specified in ``cmd`` ), to be used by the command to pass dynamically
126
+  generated config file directives back to OpenVPN.
127
+
128
+  If the script wants to generate a dynamic config file to be applied on
129
+  the server when the client connects, it should write it to the file
130
+  named by the last argument.
131
+
132
+  See the ``--client-config-dir`` option below for options which can be
133
+  legally used in a dynamically generated config file.
134
+
135
+  Note that the return value of ``script`` is significant. If ``script``
136
+  returns a non-zero error status, it will cause the client to be
137
+  disconnected.
138
+
139
+--client-disconnect cmd
140
+  Like ``--client-connect`` but called on client instance shutdown. Will
141
+  not be called unless the ``--client-connect`` script and plugins (if
142
+  defined) were previously called on this instance with successful (0)
143
+  status returns.
144
+
145
+  The exception to this rule is if the ``--client-disconnect`` command or
146
+  plugins are cascaded, and at least one client-connect function
147
+  succeeded, then ALL of the client-disconnect functions for scripts and
148
+  plugins will be called on client instance object deletion, even in cases
149
+  where some of the related client-connect functions returned an error
150
+  status.
151
+
152
+  The ``--client-disconnect`` command is passed the same pathname as the
153
+  corresponding ``--client-connect`` command as its last argument (after
154
+  any arguments specified in ``cmd``).
155
+
156
+--down cmd
157
+  Run command ``cmd`` after TUN/TAP device close (post ``--user`` UID
158
+  change and/or ``--chroot`` ). ``cmd`` consists of a path to script (or
159
+  executable program), optionally followed by arguments. The path and
160
+  arguments may be single- or double-quoted and/or escaped using a
161
+  backslash, and should be separated by one or more spaces.
162
+
163
+  Called with the same parameters and environmental variables as the
164
+  ``--up`` option above.
165
+
166
+  Note that if you reduce privileges by using ``--user`` and/or
167
+  ``--group``, your ``--down`` script will also run at reduced privilege.
168
+
169
+--down-pre
170
+  Call ``--down`` cmd/script before, rather than after, TUN/TAP close.
171
+
172
+--ipchange cmd
173
+  Run command ``cmd`` when our remote ip-address is initially
174
+  authenticated or changes.
175
+
176
+  ``cmd`` consists of a path to a script (or executable program), optionally
177
+  followed by arguments. The path and arguments may be single- or
178
+  double-quoted and/or escaped using a backslash, and should be separated
179
+  by one or more spaces.
180
+
181
+  When ``cmd`` is executed two arguments are appended after any arguments
182
+  specified in ``cmd`` , as follows:
183
+  ::
184
+
185
+     cmd ip address port number
186
+
187
+  Don't use ``--ipchange`` in ``--mode server`` mode. Use a
188
+  ``--client-connect`` script instead.
189
+
190
+  See the `Environmental Variables`_ section below for additional
191
+  parameters passed as environmental variables.
192
+
193
+  If you are running in a dynamic IP address environment where the IP
194
+  addresses of either peer could change without notice, you can use this
195
+  script, for example, to edit the :code:`/etc/hosts` file with the current
196
+  address of the peer. The script will be run every time the remote peer
197
+  changes its IP address.
198
+
199
+  Similarly if *our* IP address changes due to DHCP, we should configure
200
+  our IP address change script (see man page for ``dhcpcd``\(8)) to
201
+  deliver a ``SIGHUP`` or ``SIGUSR1`` signal to OpenVPN. OpenVPN will
202
+  then re-establish a connection with its most recently authenticated
203
+  peer on its new IP address.
204
+
205
+--learn-address cmd
206
+  Run command ``cmd`` to validate client virtual addresses or routes.
207
+
208
+  ``cmd`` consists of a path to a script (or executable program), optionally
209
+  followed by arguments. The path and arguments may be single- or
210
+  double-quoted and/or escaped using a backslash, and should be separated
211
+  by one or more spaces.
212
+
213
+  Three arguments will be appended to any arguments in ``cmd`` as follows:
214
+
215
+  :code:`$1` - [operation]
216
+      :code:`"add"`, :code:`"update"`, or :code:`"delete"` based on whether
217
+      or not the address is being added to, modified, or deleted from
218
+      OpenVPN's internal routing table.
219
+
220
+  :code:`$2` - [address]
221
+      The address being learned or unlearned. This can be an IPv4 address
222
+      such as :code:`"198.162.10.14"`, an IPv4 subnet such as
223
+      :code:`"198.162.10.0/24"`, or an ethernet MAC address (when
224
+      ``--dev tap`` is being used) such as :code:`"00:FF:01:02:03:04"`.
225
+
226
+  :code:`$3` - [common name]
227
+      The common name on the certificate associated with the client linked
228
+      to this address. Only present for :code:`"add"` or :code:`"update"`
229
+      operations, not :code:`"delete"`.
230
+
231
+  On :code:`"add"` or :code:`"update"` methods, if the script returns
232
+  a failure code (non-zero), OpenVPN will reject the address and will not
233
+  modify its internal routing table.
234
+
235
+  Normally, the ``cmd`` script will use the information provided above to
236
+  set appropriate firewall entries on the VPN TUN/TAP interface. Since
237
+  OpenVPN provides the association between virtual IP or MAC address and
238
+  the client's authenticated common name, it allows a user-defined script
239
+  to configure firewall access policies with regard to the client's
240
+  high-level common name, rather than the low level client virtual
241
+  addresses.
242
+
243
+--route-up cmd
244
+  Run command ``cmd`` after routes are added, subject to ``--route-delay``.
245
+
246
+  ``cmd`` consists of a path to a script (or executable program), optionally
247
+  followed by arguments. The path and arguments may be single- or
248
+  double-quoted and/or escaped using a backslash, and should be separated
249
+  by one or more spaces.
250
+
251
+  See the `Environmental Variables`_ section below for additional
252
+  parameters passed as environmental variables.
253
+
254
+--route-pre-down cmd
255
+  Run command ``cmd`` before routes are removed upon disconnection.
256
+
257
+  ``cmd`` consists of a path to a script (or executable program), optionally
258
+  followed by arguments. The path and arguments may be single- or
259
+  double-quoted and/or escaped using a backslash, and should be separated
260
+  by one or more spaces.
261
+
262
+  See the `Environmental Variables`_ section below for additional
263
+  parameters passed as environmental variables.
264
+
265
+--setenv args
266
+  Set a custom environmental variable :code:`name=value` to pass to script.
267
+
268
+  Valid syntaxes:
269
+  ::
270
+
271
+     setenv name value
272
+     setenv FORWARD_COMPATIBLE 1
273
+     setenv opt config_option
274
+
275
+  By setting :code:`FORWARD_COMPATIBLE` to :code:`1`, the config file
276
+  syntax checking is relaxed so that unknown directives will trigger a
277
+  warning but not a fatal error, on the assumption that a given unknown
278
+  directive might be valid in future OpenVPN versions.
279
+
280
+  This option should be used with caution, as there are good security
281
+  reasons for having OpenVPN fail if it detects problems in a config file.
282
+  Having said that, there are valid reasons for wanting new software
283
+  features to gracefully degrade when encountered by older software
284
+  versions.
285
+
286
+  It is also possible to tag a single directive so as not to trigger a
287
+  fatal error if the directive isn't recognized. To do this, prepend the
288
+  following before the directive: ``setenv opt``
289
+
290
+  Versions prior to OpenVPN 2.3.3 will always ignore options set with the
291
+  ``setenv opt`` directive.
292
+
293
+  See also ``--ignore-unknown-option``
294
+
295
+--setenv-safe args
296
+  Set a custom environmental variable :code:`OPENVPN_name` to :code:`value`
297
+  to pass to scripts.
298
+
299
+  Valid syntaxes:
300
+  ::
301
+
302
+     setenv-safe name value
303
+
304
+  This directive is designed to be pushed by the server to clients, and
305
+  the prepending of :code:`OPENVPN_` to the environmental variable is a
306
+  safety precaution to prevent a :code:`LD_PRELOAD` style attack from a
307
+  malicious or compromised server.
308
+
309
+--tls-verify cmd
310
+  Run command ``cmd`` to verify the X509 name of a pending TLS connection
311
+  that has otherwise passed all other tests of certification (except for
312
+  revocation via ``--crl-verify`` directive; the revocation test occurs
313
+  after the ``--tls-verify`` test).
314
+
315
+  ``cmd`` should return :code:`0` to allow the TLS handshake to proceed,
316
+  or :code:`1` to fail.
317
+
318
+  ``cmd`` consists of a path to a script (or executable program), optionally
319
+  followed by arguments. The path and arguments may be single- or
320
+  double-quoted and/or escaped using a backslash, and should be separated
321
+  by one or more spaces.
322
+
323
+  When ``cmd`` is executed two arguments are appended after any arguments
324
+  specified in ``cmd``, as follows:
325
+  ::
326
+
327
+     cmd certificate_depth subject
328
+
329
+  These arguments are, respectively, the current certificate depth and the
330
+  X509 subject distinguished name (dn) of the peer.
331
+
332
+  This feature is useful if the peer you want to trust has a certificate
333
+  which was signed by a certificate authority who also signed many other
334
+  certificates, where you don't necessarily want to trust all of them, but
335
+  rather be selective about which peer certificate you will accept. This
336
+  feature allows you to write a script which will test the X509 name on a
337
+  certificate and decide whether or not it should be accepted. For a
338
+  simple perl script which will test the common name field on the
339
+  certificate, see the file ``verify-cn`` in the OpenVPN distribution.
340
+
341
+  See the `Environmental Variables`_ section below for additional
342
+  parameters passed as environmental variables.
343
+
344
+--up cmd
345
+  Run command ``cmd`` after successful TUN/TAP device open (pre ``--user``
346
+  UID change).
347
+
348
+  ``cmd`` consists of a path to a script (or executable program), optionally
349
+  followed by arguments. The path and arguments may be single- or
350
+  double-quoted and/or escaped using a backslash, and should be separated
351
+  by one or more spaces.
352
+
353
+  The up command is useful for specifying route commands which route IP
354
+  traffic destined for private subnets which exist at the other end of the
355
+  VPN connection into the tunnel.
356
+
357
+  For ``--dev tun`` execute as:
358
+  ::
359
+
360
+      cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [init | restart]
361
+
362
+  For ``--dev tap`` execute as:
363
+  ::
364
+
365
+       cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [init | restart]
366
+
367
+  See the `Environmental Variables`_ section below for additional
368
+  parameters passed as environmental variables.
369
+
370
+  Note that if ``cmd`` includes arguments, all OpenVPN-generated arguments
371
+  will be appended to them to build an argument list with which the
372
+  executable will be called.
373
+
374
+  Typically, ``cmd`` will run a script to add routes to the tunnel.
375
+
376
+  Normally the up script is called after the TUN/TAP device is opened. In
377
+  this context, the last command line parameter passed to the script will
378
+  be *init.* If the ``--up-restart`` option is also used, the up script
379
+  will be called for restarts as well. A restart is considered to be a
380
+  partial reinitialization of OpenVPN where the TUN/TAP instance is
381
+  preserved (the ``--persist-tun`` option will enable such preservation).
382
+  A restart can be generated by a SIGUSR1 signal, a ``--ping-restart``
383
+  timeout, or a connection reset when the TCP protocol is enabled with the
384
+  ``--proto`` option. If a restart occurs, and ``--up-restart`` has been
385
+  specified, the up script will be called with *restart* as the last
386
+  parameter.
387
+
388
+  *NOTE:*
389
+     On restart, OpenVPN will not pass the full set of environment
390
+     variables to the script. Namely, everything related to routing and
391
+     gateways will not be passed, as nothing needs to be done anyway - all
392
+     the routing setup is already in place. Additionally, the up-restart
393
+     script will run with the downgraded UID/GID settings (if configured).
394
+
395
+  The following standalone example shows how the ``--up`` script can be
396
+  called in both an initialization and restart context. (*NOTE:* for
397
+  security reasons, don't run the following example unless UDP port 9999
398
+  is blocked by your firewall. Also, the example will run indefinitely, so
399
+  you should abort with control-c).
400
+
401
+  ::
402
+
403
+      openvpn --dev tun --port 9999 --verb 4 --ping-restart 10 \
404
+              --up 'echo up' --down 'echo down' --persist-tun  \
405
+              --up-restart
406
+
407
+  Note that OpenVPN also provides the ``--ifconfig`` option to
408
+  automatically ifconfig the TUN device, eliminating the need to define an
409
+  ``--up`` script, unless you also want to configure routes in the
410
+  ``--up`` script.
411
+
412
+  If ``--ifconfig`` is also specified, OpenVPN will pass the ifconfig
413
+  local and remote endpoints on the command line to the ``--up`` script so
414
+  that they can be used to configure routes such as:
415
+
416
+  ::
417
+
418
+      route add -net 10.0.0.0 netmask 255.255.255.0 gw $5
419
+
420
+--up-delay
421
+  Delay TUN/TAP open and possible ``--up`` script execution until after
422
+  TCP/UDP connection establishment with peer.
423
+
424
+  In ``--proto udp`` mode, this option normally requires the use of
425
+  ``--ping`` to allow connection initiation to be sensed in the absence of
426
+  tunnel data, since UDP is a "connectionless" protocol.
427
+
428
+  On Windows, this option will delay the TAP-Win32 media state
429
+  transitioning to "connected" until connection establishment, i.e. the
430
+  receipt of the first authenticated packet from the peer.
431
+
432
+--up-restart
433
+  Enable the ``--up`` and ``--down`` scripts to be called for restarts as
434
+  well as initial program start. This option is described more fully above
435
+  in the ``--up`` option documentation.
436
+
437
+String Types and Remapping
438
+--------------------------
439
+
440
+In certain cases, OpenVPN will perform remapping of characters in
441
+strings. Essentially, any characters outside the set of permitted
442
+characters for each string type will be converted to underbar ('\_').
443
+
444
+*Q: Why is string remapping necessary?*
445
+    It's an important security feature to prevent the malicious
446
+    coding of strings from untrusted sources to be passed as parameters to
447
+    scripts, saved in the environment, used as a common name, translated to
448
+    a filename, etc.
449
+
450
+*Q: Can string remapping be disabled?*
451
+    Yes, by using the ``--no-name-remapping`` option, however this
452
+    should be considered an advanced option.
453
+
454
+Here is a brief rundown of OpenVPN's current string types and the
455
+permitted character class for each string:
456
+
457
+*X509 Names*
458
+   Alphanumeric, underbar ('\_'), dash ('-'), dot ('.'), at
459
+   ('@'), colon (':'), slash ('/'), and equal ('='). Alphanumeric is
460
+   defined as a character which will cause the C library isalnum() function
461
+   to return true.
462
+
463
+*Common Names*
464
+   Alphanumeric, underbar ('\_'), dash ('-'), dot ('.'), and at ('@').
465
+
466
+*--auth-user-pass username*
467
+   Same as Common Name, with one exception:
468
+   starting with OpenVPN 2.0.1, the username is passed to the
469
+   :code:`OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY` plugin in its raw form,
470
+   without string remapping.
471
+
472
+*--auth-user-pass password*
473
+   Any "printable" character except CR or LF. Printable is defined to be
474
+   a character which will cause the C library isprint() function to
475
+   return true.
476
+
477
+*--client-config-dir filename as derived from common name or`username*
478
+   Alphanumeric, underbar ('\_'), dash ('-'), and dot ('.') except for "."
479
+   or ".." as standalone strings. As of v2.0.1-rc6, the at ('@') character
480
+   has been added as well for compatibility with the common name character
481
+   class.
482
+
483
+*Environmental variable names*
484
+   Alphanumeric or underbar ('\_').
485
+
486
+*Environmental variable values*
487
+   Any printable character.
488
+
489
+For all cases, characters in a string which are not members of the legal
490
+character class for that string type will be remapped to underbar
491
+('\_').  
492
+
493
+
494
+Environmental Variables
495
+-----------------------
496
+
497
+Once set, a variable is persisted indefinitely until it is reset by a
498
+new value or a restart,
499
+
500
+As of OpenVPN 2.0-beta12, in server mode, environmental variables set by
501
+OpenVPN are scoped according to the client objects they are associated
502
+with, so there should not be any issues with scripts having access to
503
+stale, previously set variables which refer to different client
504
+instances.
505
+
506
+:code:`bytes_received`
507
+    Total number of bytes received from client during VPN session. Set prior
508
+    to execution of the ``--client-disconnect`` script.
509
+
510
+:code:`bytes_sent`
511
+    Total number of bytes sent to client during VPN session. Set prior to
512
+    execution of the ``--client-disconnect`` script.
513
+
514
+:code:`common_name`
515
+    The X509 common name of an authenticated client. Set prior to execution
516
+    of ``--client-connect``, ``--client-disconnect`` and
517
+    ``--auth-user-pass-verify`` scripts.
518
+
519
+:code:`config`
520
+    Name of first ``--config`` file. Set on program initiation and reset on
521
+    SIGHUP.
522
+
523
+:code:`daemon`
524
+    Set to "1" if the ``--daemon`` directive is specified, or "0" otherwise.
525
+    Set on program initiation and reset on SIGHUP.
526
+
527
+:code:`daemon_log_redirect`
528
+    Set to "1" if the ``--log`` or ``--log-append`` directives are
529
+    specified, or "0" otherwise. Set on program initiation and reset on
530
+    SIGHUP.
531
+
532
+:code:`dev`
533
+    The actual name of the TUN/TAP device, including a unit number if it
534
+    exists. Set prior to ``--up`` or ``--down`` script execution.
535
+
536
+:code:`dev_idx`
537
+    On Windows, the device index of the TUN/TAP adapter (to be used in
538
+    netsh.exe calls which sometimes just do not work right with interface
539
+    names). Set prior to ``--up`` or ``--down`` script execution.
540
+
541
+:code:`foreign_option_{n}`
542
+    An option pushed via ``--push`` to a client which does not natively
543
+    support it, such as ``--dhcp-option`` on a non-Windows system, will be
544
+    recorded to this environmental variable sequence prior to ``--up``
545
+    script execution.
546
+
547
+:code:`ifconfig_broadcast`
548
+    The broadcast address for the virtual ethernet segment which is derived
549
+    from the ``--ifconfig`` option when ``--dev tap`` is used. Set prior to
550
+    OpenVPN calling the :code:`ifconfig` or :code:`netsh` (windows version
551
+    of ifconfig) commands which normally occurs prior to ``--up`` script
552
+    execution.
553
+
554
+:code:`ifconfig_ipv6_local`
555
+    The local VPN endpoint IPv6 address specified in the
556
+    ``--ifconfig-ipv6`` option (first parameter). Set prior to OpenVPN
557
+    calling the :code:`ifconfig` or code:`netsh` (windows version of
558
+    ifconfig) commands which normally occurs prior to ``--up`` script
559
+    execution.
560
+
561
+:code:`ifconfig_ipv6_netbits`
562
+    The prefix length of the IPv6 network on the VPN interface. Derived
563
+    from the /nnn parameter of the IPv6 address in the ``--ifconfig-ipv6``
564
+    option (first parameter). Set prior to OpenVPN calling the
565
+    :code:`ifconfig` or :code:`netsh` (windows version of ifconfig)
566
+    commands which normally occurs prior to ``--up`` script execution.
567
+
568
+:code:`ifconfig_ipv6_remote`
569
+    The remote VPN endpoint IPv6 address specified in the
570
+    ``--ifconfig-ipv6`` option (second parameter). Set prior to OpenVPN
571
+    calling the :code:`ifconfig` or :code:`netsh` (windows version of
572
+    ifconfig) commands which normally occurs prior to ``--up`` script
573
+    execution.
574
+
575
+:code:`ifconfig_local`
576
+    The local VPN endpoint IP address specified in the ``--ifconfig``
577
+    option (first parameter). Set prior to OpenVPN calling the
578
+    :code:`ifconfig` or :code:`netsh` (windows version of ifconfig)
579
+    commands which normally occurs prior to ``--up`` script execution.
580
+
581
+:code:`ifconfig_remote`
582
+    The remote VPN endpoint IP address specified in the ``--ifconfig``
583
+    option (second parameter) when ``--dev tun`` is used. Set prior to
584
+    OpenVPN calling the :code:`ifconfig` or :code:`netsh` (windows version
585
+    of ifconfig) commands which normally occurs prior to ``--up`` script
586
+    execution.
587
+
588
+:code:`ifconfig_netmask`
589
+    The subnet mask of the virtual ethernet segment that is specified as
590
+    the second parameter to ``--ifconfig`` when ``--dev tap`` is being
591
+    used. Set prior to OpenVPN calling the :code:`ifconfig` or
592
+    :code:`netsh` (windows version of ifconfig) commands which normally
593
+    occurs prior to ``--up`` script execution.
594
+
595
+:code:`ifconfig_pool_local_ip`
596
+    The local virtual IP address for the TUN/TAP tunnel taken from an
597
+    ``--ifconfig-push`` directive if specified, or otherwise from the
598
+    ifconfig pool (controlled by the ``--ifconfig-pool`` config file
599
+    directive). Only set for ``--dev tun`` tunnels. This option is set on
600
+    the server prior to execution of the ``--client-connect`` and
601
+    ``--client-disconnect`` scripts.
602
+
603
+:code:`ifconfig_pool_netmask`
604
+    The virtual IP netmask for the TUN/TAP tunnel taken from an
605
+    ``--ifconfig-push`` directive if specified, or otherwise from the
606
+    ifconfig pool (controlled by the ``--ifconfig-pool`` config file
607
+    directive). Only set for ``--dev tap`` tunnels. This option is set on
608
+    the server prior to execution of the ``--client-connect`` and
609
+    ``--client-disconnect`` scripts.
610
+
611
+:code:`ifconfig_pool_remote_ip`
612
+    The remote virtual IP address for the TUN/TAP tunnel taken from an
613
+    ``--ifconfig-push`` directive if specified, or otherwise from the
614
+    ifconfig pool (controlled by the ``--ifconfig-pool`` config file
615
+    directive). This option is set on the server prior to execution of the
616
+    ``--client-connect`` and ``--client-disconnect`` scripts.
617
+
618
+:code:`link_mtu`
619
+    The maximum packet size (not including the IP header) of tunnel data in
620
+    UDP tunnel transport mode. Set prior to ``--up`` or ``--down`` script
621
+    execution.
622
+
623
+:code:`local`
624
+    The ``--local`` parameter. Set on program initiation and reset on
625
+    SIGHUP.
626
+
627
+:code:`local_port`
628
+    The local port number or name, specified by ``--port`` or ``--lport``.
629
+    Set on program initiation and reset on SIGHUP.
630
+
631
+:code:`password`
632
+    The password provided by a connecting client. Set prior to
633
+    ``--auth-user-pass-verify`` script execution only when the ``via-env``
634
+    modifier is specified, and deleted from the environment after the script
635
+    returns.
636
+
637
+:code:`proto`
638
+    The ``--proto`` parameter. Set on program initiation and reset on
639
+    SIGHUP.
640
+
641
+:code:`remote_{n}`
642
+    The ``--remote`` parameter. Set on program initiation and reset on
643
+    SIGHUP.
644
+
645
+:code:`remote_port_{n}`
646
+    The remote port number, specified by ``--port`` or ``--rport``. Set on
647
+    program initiation and reset on SIGHUP.
648
+
649
+:code:`route_net_gateway`
650
+    The pre-existing default IP gateway in the system routing table. Set
651
+    prior to ``--up`` script execution.
652
+
653
+:code:`route_vpn_gateway`
654
+    The default gateway used by ``--route`` options, as specified in either
655
+    the ``--route-gateway`` option or the second parameter to
656
+    ``--ifconfig`` when ``--dev tun`` is specified. Set prior to ``--up``
657
+    script execution.
658
+
659
+:code:`route_{parm}_{n}`
660
+    A set of variables which define each route to be added, and are set
661
+    prior to ``--up`` script execution.
662
+
663
+    ``parm`` will be one of :code:`network`, :code:`netmask"`,
664
+    :code:`gateway`, or :code:`metric`.
665
+
666
+    ``n`` is the OpenVPN route number, starting from 1.
667
+
668
+    If the network or gateway are resolvable DNS names, their IP address
669
+    translations will be recorded rather than their names as denoted on the
670
+    command line or configuration file.
671
+
672
+:code:`route_ipv6_{parm}_{n}`
673
+    A set of variables which define each IPv6 route to be added, and are
674
+    set prior to **--up** script execution.
675
+
676
+    ``parm`` will be one of :code:`network` or :code:`gateway`
677
+    (:code:`netmask` is contained as :code:`/nnn` in the
678
+    ``route_ipv6_network_{n}``, unlike IPv4 where it is passed in a
679
+    separate environment variable).
680
+
681
+    ``n`` is the OpenVPN route number, starting from 1.
682
+
683
+    If the network or gateway are resolvable DNS names, their IP address
684
+    translations will be recorded rather than their names as denoted on the
685
+    command line or configuration file.
686
+
687
+:code:`peer_cert`
688
+    Temporary file name containing the client certificate upon connection.
689
+    Useful in conjunction with ``--tls-verify``.
690
+
691
+:code:`script_context`
692
+    Set to "init" or "restart" prior to up/down script execution. For more
693
+    information, see documentation for ``--up``.
694
+
695
+:code:`script_type`
696
+    Prior to execution of any script, this variable is set to the type of
697
+    script being run. It can be one of the following: :code:`up`,
698
+    :code:`down`, :code:`ipchange`, :code:`route-up`, :code:`tls-verify`,
699
+    :code:`auth-user-pass-verify`, :code:`client-connect`,
700
+    :code:`client-disconnect` or :code:`learn-address`. Set prior to
701
+    execution of any script.
702
+
703
+:code:`signal`
704
+    The reason for exit or restart. Can be one of :code:`sigusr1`,
705
+    :code:`sighup`, :code:`sigterm`, :code:`sigint`, :code:`inactive`
706
+    (controlled by ``--inactive`` option), :code:`ping-exit` (controlled
707
+    by ``--ping-exit`` option), :code:`ping-restart` (controlled by
708
+    ``--ping-restart`` option), :code:`connection-reset` (triggered on TCP
709
+    connection reset), :code:`error` or :code:`unknown` (unknown signal).
710
+    This variable is set just prior to down script execution.
711
+
712
+:code:`time_ascii`
713
+    Client connection timestamp, formatted as a human-readable time string.
714
+    Set prior to execution of the ``--client-connect`` script.
715
+
716
+:code:`time_duration`
717
+    The duration (in seconds) of the client session which is now
718
+    disconnecting. Set prior to execution of the ``--client-disconnect``
719
+    script.
720
+
721
+:code:`time_unix`
722
+    Client connection timestamp, formatted as a unix integer date/time
723
+    value. Set prior to execution of the ``--client-connect`` script.
724
+
725
+:code:`tls_digest_{n}` / :code:`tls_digest_sha256_{n}`
726
+    Contains the certificate SHA1 / SHA256 fingerprint, where ``n`` is the
727
+    verification level. Only set for TLS connections. Set prior to execution
728
+    of ``--tls-verify`` script.
729
+
730
+:code:`tls_id_{n}`
731
+    A series of certificate fields from the remote peer, where ``n`` is the
732
+    verification level. Only set for TLS connections. Set prior to execution
733
+    of ``--tls-verify`` script.
734
+
735
+:code:`tls_serial_{n}`
736
+    The serial number of the certificate from the remote peer, where ``n``
737
+    is the verification level. Only set for TLS connections. Set prior to
738
+    execution of ``--tls-verify`` script. This is in the form of a decimal
739
+    string like "933971680", which is suitable for doing serial-based OCSP
740
+    queries (with OpenSSL, do not prepend "0x" to the string) If something
741
+    goes wrong while reading the value from the certificate it will be an
742
+    empty string, so your code should check that. See the
743
+    :code:`contrib/OCSP_check/OCSP_check.sh` script for an example.
744
+
745
+:code:`tls_serial_hex_{n}`
746
+    Like :code:`tls_serial_{n}`, but in hex form (e.g.
747
+    :code:`12:34:56:78:9A`).
748
+
749
+:code:`tun_mtu`
750
+    The MTU of the TUN/TAP device. Set prior to ``--up`` or ``--down``
751
+    script execution.
752
+
753
+:code:`trusted_ip` / :code:`trusted_ip6`)
754
+    Actual IP address of connecting client or peer which has been
755
+    authenticated. Set prior to execution of ``--ipchange``,
756
+    ``--client-connect`` and ``--client-disconnect`` scripts. If using ipv6
757
+    endpoints (udp6, tcp6), :code:`trusted_ip6` will be set instead.
758
+
759
+:code:`trusted_port`
760
+    Actual port number of connecting client or peer which has been
761
+    authenticated. Set prior to execution of ``--ipchange``,
762
+    ``--client-connect`` and ``--client-disconnect`` scripts.
763
+
764
+:code:`untrusted_ip` / :code:`untrusted_ip6`
765
+    Actual IP address of connecting client or peer which has not been
766
+    authenticated yet. Sometimes used to *nmap* the connecting host in a
767
+    ``--tls-verify`` script to ensure it is firewalled properly. Set prior
768
+    to execution of ``--tls-verify`` and ``--auth-user-pass-verify``
769
+    scripts. If using ipv6 endpoints (udp6, tcp6), :code:`untrusted_ip6`
770
+    will be set instead.
771
+
772
+:code:`untrusted_port`
773
+    Actual port number of connecting client or peer which has not been
774
+    authenticated yet. Set prior to execution of ``--tls-verify`` and
775
+    ``--auth-user-pass-verify`` scripts.
776
+
777
+:code:`username`
778
+    The username provided by a connecting client. Set prior to
779
+    ``--auth-user-pass-verify`` script execution only when the
780
+    :code:`via-env` modifier is specified.
781
+
782
+:code:`X509_{n}_{subject_field}`
783
+    An X509 subject field from the remote peer certificate, where ``n`` is
784
+    the verification level. Only set for TLS connections. Set prior to
785
+    execution of ``--tls-verify`` script. This variable is similar to
786
+    :code:`tls_id_{n}` except the component X509 subject fields are broken
787
+    out, and no string remapping occurs on these field values (except for
788
+    remapping of control characters to ":code:`_`"). For example, the
789
+    following variables would be set on the OpenVPN server using the sample
790
+    client certificate in sample-keys (client.crt). Note that the
791
+    verification level is 0 for the client certificate and 1 for the CA
792
+    certificate.
793
+
794
+    ::
795
+
796
+       X509_0_emailAddress=me@myhost.mydomain
797
+       X509_0_CN=Test-Client
798
+       X509_0_O=OpenVPN-TEST
799
+       X509_0_ST=NA
800
+       X509_0_C=KG
801
+       X509_1_emailAddress=me@myhost.mydomain
802
+       X509_1_O=OpenVPN-TEST
803
+       X509_1_L=BISHKEK
804
+       X509_1_ST=NA
805
+       X509_1_C=KG
0 806
new file mode 100644
... ...
@@ -0,0 +1,768 @@
0
+Server Options
1
+--------------
2
+Starting with OpenVPN 2.0, a multi-client TCP/UDP server mode is
3
+supported, and can be enabled with the ``--mode server`` option. In
4
+server mode, OpenVPN will listen on a single port for incoming client
5
+connections. All client connections will be routed through a single tun
6
+or tap interface. This mode is designed for scalability and should be
7
+able to support hundreds or even thousands of clients on sufficiently
8
+fast hardware. SSL/TLS authentication must be used in this mode.
9
+
10
+--auth-gen-token args
11
+  Returns an authentication token to successfully authenticated clients.
12
+
13
+  Valid syntax:
14
+  ::
15
+
16
+     auth-gen-token [lifetime] [external-auth]
17
+
18
+  After successful user/password authentication, the OpenVPN server will
19
+  with this option generate a temporary authentication token and push that
20
+  to the client. On the following renegotiations, the OpenVPN client will pass
21
+  this token instead of the users password. On the server side the server
22
+  will do the token authentication internally and it will NOT do any
23
+  additional authentications against configured external user/password
24
+  authentication mechanisms.
25
+
26
+  The tokens implemented by this mechanism include an initial timestamp and
27
+  a renew timestamp and are secured by HMAC.
28
+
29
+  The ``lifetime`` argument defines how long the generated token is valid.
30
+  The lifetime is defined in seconds. If lifetime is not set or it is set
31
+  to :code:`0`, the token will never expire.
32
+
33
+  The token will expire either after the configured ``lifetime`` of the
34
+  token is reached or after not being renewed for more than 2 \*
35
+  ``reneg-sec`` seconds. Clients will be sent renewed tokens on every TLS
36
+  renogiation to keep the client's token updated. This is done to
37
+  invalidate a token if a client is disconnected for a sufficently long
38
+  time, while at the same time permitting much longer token lifetimes for
39
+  active clients.
40
+
41
+  This feature is useful for environments which are configured to use One
42
+  Time Passwords (OTP) as part of the user/password authentications and
43
+  that authentication mechanism does not implement any auth-token support.
44
+
45
+  When the :code:`external-auth` keyword is present the normal
46
+  authentication method will always be called even if auth-token succeeds.
47
+  Normally other authentications method are skipped if auth-token
48
+  verification suceeds or fails.
49
+
50
+  This option postpones this decision to the external authentication
51
+  methods and checks the validity of the account and do other checks.
52
+
53
+  In this mode the environment will have a ``session_id`` variable that
54
+  holds the session id from auth-gen-token. Also an environment variable
55
+  ``session_state`` is present. This variable indicates whether the
56
+  auth-token has succeeded or not. It can have the following values:
57
+
58
+  :code:`Initial`
59
+      No token from client.
60
+
61
+  :code:`Authenticated`
62
+      Token is valid and not expired.
63
+
64
+  :code:`Expired`
65
+      Token is valid but has expired.
66
+
67
+  :code:`Invalid`
68
+      Token is invalid (failed HMAC or wrong length)
69
+
70
+  :code:`AuthenticatedEmptyUser` / :code:`ExpiredEmptyUser`
71
+      The token is not valid with the username sent from the client but
72
+      would be valid (or expired) if we assume an empty username was
73
+      used instead.  These two cases are a workaround for behaviour in
74
+      OpenVPN 3.  If this workaround is not needed these two cases should
75
+      be handled in the same way as :code:`Invalid`.
76
+
77
+  **Warning:** Use this feature only if you want your authentication
78
+  method called on every verification. Since the external authentication
79
+  is called it needs to also indicate a success or failure of the
80
+  authentication. It is strongly recommended to return an authentication
81
+  failure in the case of the Invalid/Expired auth-token with the
82
+  external-auth option unless the client could authenticate in another
83
+  acceptable way (e.g. client certificate), otherwise returning success
84
+  will lead to authentication bypass (as does returning success on a wrong
85
+  password from a script).
86
+
87
+--auth-gen-token-secret file
88
+  Specifies a file that holds a secret for the HMAC used in
89
+  ``--auth-gen-token`` If ``file`` is not present OpenVPN will generate a
90
+  random secret on startup. This file should be used if auth-token should
91
+  validate after restarting a server or if client should be able to roam
92
+  between multiple OpenVPN servers with their auth-token.
93
+
94
+--auth-user-pass-optional
95
+  Allow connections by clients that do not specify a username/password.
96
+  Normally, when ``--auth-user-pass-verify`` or
97
+  ``--management-client-auth`` are specified (or an authentication plugin
98
+  module), the OpenVPN server daemon will require connecting clients to
99
+  specify a username and password. This option makes the submission of a
100
+  username/password by clients optional, passing the responsibility to the
101
+  user-defined authentication module/script to accept or deny the client
102
+  based on other factors (such as the setting of X509 certificate fields).
103
+  When this option is used, and a connecting client does not submit a
104
+  username/password, the user-defined authentication module/script will
105
+  see the username and password as being set to empty strings (""). The
106
+  authentication module/script MUST have logic to detect this condition
107
+  and respond accordingly.
108
+
109
+--ccd-exclusive
110
+  Require, as a condition of authentication, that a connecting client has
111
+  a ``--client-config-dir`` file.
112
+
113
+--client-config-dir dir
114
+  Specify a directory ``dir`` for custom client config files. After a
115
+  connecting client has been authenticated, OpenVPN will look in this
116
+  directory for a file having the same name as the client's X509 common
117
+  name. If a matching file exists, it will be opened and parsed for
118
+  client-specific configuration options. If no matching file is found,
119
+  OpenVPN will instead try to open and parse a default file called
120
+  "DEFAULT", which may be provided but is not required. Note that the
121
+  configuration files must be readable by the OpenVPN process after it has
122
+  dropped it's root privileges.
123
+
124
+  This file can specify a fixed IP address for a given client using
125
+  ``--ifconfig-push``, as well as fixed subnets owned by the client using
126
+  ``--iroute``.
127
+
128
+  One of the useful properties of this option is that it allows client
129
+  configuration files to be conveniently created, edited, or removed while
130
+  the server is live, without needing to restart the server.
131
+
132
+  The following options are legal in a client-specific context: ``--push``,
133
+  ``--push-reset``, ``--push-remove``, ``--iroute``, ``--ifconfig-push``,
134
+  ``--vlan-pvid`` and ``--config``.
135
+
136
+--client-to-client
137
+  Because the OpenVPN server mode handles multiple clients through a
138
+  single tun or tap interface, it is effectively a router. The
139
+  ``--client-to-client`` flag tells OpenVPN to internally route
140
+  client-to-client traffic rather than pushing all client-originating
141
+  traffic to the TUN/TAP interface.
142
+
143
+  When this option is used, each client will "see" the other clients which
144
+  are currently connected. Otherwise, each client will only see the
145
+  server. Don't use this option if you want to firewall tunnel traffic
146
+  using custom, per-client rules.
147
+
148
+--disable
149
+  Disable a particular client (based on the common name) from connecting.
150
+  Don't use this option to disable a client due to key or password
151
+  compromise. Use a CRL (certificate revocation list) instead (see the
152
+  ``--crl-verify`` option).
153
+
154
+  This option must be associated with a specific client instance, which
155
+  means that it must be specified either in a client instance config file
156
+  using ``--client-config-dir`` or dynamically generated using a
157
+  ``--client-connect`` script.
158
+
159
+--connect-freq args
160
+  Allow a maximum of ``n`` new connections per ``sec`` seconds from
161
+  clients.
162
+
163
+  Valid syntax:
164
+  ::
165
+
166
+     connect-freq n sec
167
+
168
+  This is designed to contain DoS attacks which flood the server
169
+  with connection requests using certificates which will ultimately fail
170
+  to authenticate.
171
+
172
+  This is an imperfect solution however, because in a real DoS scenario,
173
+  legitimate connections might also be refused.
174
+
175
+  For the best protection against DoS attacks in server mode, use
176
+  ``--proto udp`` and either ``--tls-auth`` or ``--tls-crypt``.
177
+
178
+--duplicate-cn
179
+  Allow multiple clients with the same common name to concurrently
180
+  connect. In the absence of this option, OpenVPN will disconnect a client
181
+  instance upon connection of a new client having the same common name.
182
+
183
+--ifconfig-pool args
184
+  Set aside a pool of subnets to be dynamically allocated to connecting
185
+  clients, similar to a DHCP server.
186
+
187
+  Valid syntax:
188
+  ::
189
+
190
+     ifconfig-pool start-IP end-IP [netmask]
191
+
192
+  For tun-style tunnels, each client
193
+  will be given a /30 subnet (for interoperability with Windows clients).
194
+  For tap-style tunnels, individual addresses will be allocated, and the
195
+  optional ``netmask`` parameter will also be pushed to clients.
196
+
197
+--ifconfig-ipv6-pool args
198
+  Specify an IPv6 address pool for dynamic assignment to clients.
199
+
200
+  Valid args:
201
+  ::
202
+
203
+     ifconfig-ipv6-pool ipv6addr/bits
204
+
205
+  The pool starts at ``ipv6addr`` and matches the offset determined from
206
+  the start of the IPv4 pool.
207
+
208
+--ifconfig-pool-persist args
209
+  Persist/unpersist ifconfig-pool data to ``file``, at ``seconds``
210
+  intervals (default :code:`600`), as well as on program startup and shutdown.
211
+
212
+  Valid syntax:
213
+  ::
214
+
215
+     ifconfig-pool-persist file [seconds]
216
+
217
+  The goal of this option is to provide a long-term association between
218
+  clients (denoted by their common name) and the virtual IP address
219
+  assigned to them from the ifconfig-pool. Maintaining a long-term
220
+  association is good for clients because it allows them to effectively
221
+  use the ``--persist-tun`` option.
222
+
223
+  ``file`` is a comma-delimited ASCII file, formatted as
224
+  :code:`<Common-Name>,<IP-address>`.
225
+
226
+  If ``seconds`` = :code:`0`, ``file`` will be treated as read-only. This
227
+  is useful if you would like to treat ``file`` as a configuration file.
228
+
229
+  Note that the entries in this file are treated by OpenVPN as
230
+  *suggestions* only, based on past associations between a common name and
231
+  IP address.  They do not guarantee that the given common name will always
232
+  receive the given IP address. If you want guaranteed assignment, use
233
+  ``--ifconfig-push``
234
+
235
+--ifconfig-push args
236
+  Push virtual IP endpoints for client tunnel, overriding the
237
+  ``--ifconfig-pool`` dynamic allocation.
238
+
239
+  Valid syntax:
240
+  ::
241
+
242
+     ifconfig-push local remote-netmask [alias]
243
+
244
+  The parameters ``local`` and ``remote-netmask`` are set according to the
245
+  ``--ifconfig`` directive which you want to execute on the client machine
246
+  to configure the remote end of the tunnel. Note that the parameters
247
+  ``local`` and ``remote-netmask`` are from the perspective of the client,
248
+  not the server. They may be DNS names rather than IP addresses, in which
249
+  case they will be resolved on the server at the time of client
250
+  connection.
251
+
252
+  The optional ``alias`` parameter may be used in cases where NAT causes
253
+  the client view of its local endpoint to differ from the server view. In
254
+  this case ``local/remote-netmask`` will refer to the server view while
255
+  ``alias/remote-netmask`` will refer to the client view.
256
+
257
+  This option must be associated with a specific client instance, which
258
+  means that it must be specified either in a client instance config file
259
+  using ``--client-config-dir`` or dynamically generated using a
260
+  ``--client-connect`` script.
261
+
262
+  Remember also to include a ``--route`` directive in the main OpenVPN
263
+  config file which encloses ``local``, so that the kernel will know to
264
+  route it to the server's TUN/TAP interface.
265
+
266
+  OpenVPN's internal client IP address selection algorithm works as
267
+  follows:
268
+
269
+  1.  Use ``--client-connect script`` generated file for static IP
270
+      (first choice).
271
+
272
+  2.  Use ``--client-config-dir`` file for static IP (next choice).
273
+
274
+  3.  Use ``--ifconfig-pool`` allocation for dynamic IP (last
275
+      choice).
276
+
277
+--ifconfig-ipv6-push args
278
+  for ``--client-config-dir`` per-client static IPv6 interface
279
+  configuration, see ``--client-config-dir`` and ``--ifconfig-push`` for
280
+  more details.
281
+
282
+  Valid syntax:
283
+  ::
284
+
285
+     ifconfig-ipv6-push ipv6addr/bits ipv6remote
286
+
287
+--inetd args
288
+  Valid syntaxes:
289
+  ::
290
+
291
+     inetd
292
+     inetd wait
293
+     inetd nowait
294
+     inetd wait progname
295
+
296
+  Use this option when OpenVPN is being run from the inetd or ``xinetd``\(8)
297
+  server.
298
+
299
+  The :code:`wait` and :code:`nowait` option must match what is specified
300
+  in the inetd/xinetd config file. The :code:`nowait` mode can only be used
301
+  with ``--proto tcp-server`` The default is :code:`wait`.  The
302
+  :code:`nowait` mode can be used to instantiate the OpenVPN daemon as a
303
+  classic TCP server, where client connection requests are serviced on a
304
+  single port number. For additional information on this kind of
305
+  configuration, see the OpenVPN FAQ:
306
+  https://community.openvpn.net/openvpn/wiki/325-openvpn-as-a--forking-tcp-server-which-can-service-multiple-clients-over-a-single-tcp-port
307
+
308
+  This option precludes the use of ``--daemon``, ``--local`` or
309
+  ``--remote``.  Note that this option causes message and error output to
310
+  be handled in the same way as the ``--daemon`` option. The optional
311
+  ``progname`` parameter is also handled exactly as in ``--daemon``.
312
+
313
+  Also note that in ``wait`` mode, each OpenVPN tunnel requires a separate
314
+  TCP/UDP port and a separate inetd or xinetd entry. See the OpenVPN 1.x
315
+  HOWTO for an example on using OpenVPN with xinetd:
316
+  https://openvpn.net/community-resources/1xhowto/
317
+
318
+--multihome
319
+  Configure a multi-homed UDP server. This option needs to be used when a
320
+  server has more than one IP address (e.g. multiple interfaces, or
321
+  secondary IP addresses), and is not using ``--local`` to force binding
322
+  to one specific address only. This option will add some extra lookups to
323
+  the packet path to ensure that the UDP reply packets are always sent
324
+  from the address that the client is talking to. This is not supported on
325
+  all platforms, and it adds more processing, so it's not enabled by
326
+  default.
327
+
328
+  *Notes:*
329
+    -  This option is only relevant for UDP servers.
330
+    -  If you do an IPv6+IPv4 dual-stack bind on a Linux machine with
331
+       multiple IPv4 address, connections to IPv4 addresses will not
332
+       work right on kernels before 3.15, due to missing kernel
333
+       support for the IPv4-mapped case (some distributions have
334
+       ported this to earlier kernel versions, though).
335
+
336
+--iroute args
337
+  Generate an internal route to a specific client. The ``netmask``
338
+  parameter, if omitted, defaults to :code:`255.255.255.255`.
339
+
340
+  Valid syntax:
341
+  ::
342
+
343
+     iroute network [netmask]
344
+
345
+  This directive can be used to route a fixed subnet from the server to a
346
+  particular client, regardless of where the client is connecting from.
347
+  Remember that you must also add the route to the system routing table as
348
+  well (such as by using the ``--route`` directive). The reason why two
349
+  routes are needed is that the ``--route`` directive routes the packet
350
+  from the kernel to OpenVPN. Once in OpenVPN, the ``--iroute`` directive
351
+  routes to the specific client.
352
+
353
+  This option must be specified either in a client instance config file
354
+  using ``--client-config-dir`` or dynamically generated using a
355
+  ``--client-connect`` script.
356
+
357
+  The ``--iroute`` directive also has an important interaction with
358
+  ``--push "route ..."``. ``--iroute`` essentially defines a subnet which
359
+  is owned by a particular client (we will call this client *A*). If you
360
+  would like other clients to be able to reach *A*'s subnet, you can use
361
+  ``--push "route ..."`` together with ``--client-to-client`` to effect
362
+  this. In order for all clients to see *A*'s subnet, OpenVPN must push
363
+  this route to all clients EXCEPT for *A*, since the subnet is already
364
+  owned by *A*. OpenVPN accomplishes this by not not pushing a route to
365
+  a client if it matches one of the client's iroutes.
366
+
367
+--iroute-ipv6 args
368
+  for ``--client-config-dir`` per-client static IPv6 route configuration,
369
+  see ``--iroute`` for more details how to setup and use this, and how
370
+  ``--iroute`` and ``--route`` interact.
371
+
372
+  Valid syntax:
373
+  ::
374
+
375
+     iroute-ipv6 ipv6addr/bits
376
+
377
+--max-clients n
378
+  Limit server to a maximum of ``n`` concurrent clients.
379
+
380
+--max-routes-per-client n
381
+  Allow a maximum of ``n`` internal routes per client (default
382
+  :code:`256`). This is designed to help contain DoS attacks where an
383
+  authenticated client floods the server with packets appearing to come
384
+  from many unique MAC addresses, forcing the server to deplete virtual
385
+  memory as its internal routing table expands. This directive can be used
386
+  in a ``--client-config-dir`` file or auto-generated by a
387
+  ``--client-connect`` script to override the global value for a particular
388
+  client.
389
+
390
+  Note that this directive affects OpenVPN's internal routing table, not
391
+  the kernel routing table.
392
+
393
+--opt-verify
394
+  Clients that connect with options that are incompatible with those of the
395
+  server will be disconnected.
396
+
397
+  Options that will be compared for compatibility include ``dev-type``,
398
+  ``link-mtu``, ``tun-mtu``, ``proto``, ``ifconfig``,
399
+  ``comp-lzo``, ``fragment``, ``keydir``, ``cipher``,
400
+  ``auth``, ``keysize``, ``secret``, ``no-replay``,
401
+  ``no-iv``, ``tls-auth``, ``key-method``, ``tls-server``
402
+  and ``tls-client``.
403
+
404
+  This option requires that ``--disable-occ`` NOT be used.
405
+
406
+--port-share args
407
+  Share OpenVPN TCP with another service
408
+
409
+  Valid syntax:
410
+  ::
411
+
412
+     port-share host port [dir]
413
+
414
+  When run in TCP server mode, share the OpenVPN port with another
415
+  application, such as an HTTPS server. If OpenVPN senses a connection to
416
+  its port which is using a non-OpenVPN protocol, it will proxy the
417
+  connection to the server at ``host``:``port``. Currently only designed to
418
+  work with HTTP/HTTPS, though it would be theoretically possible to
419
+  extend to other protocols such as ssh.
420
+
421
+  ``dir`` specifies an optional directory where a temporary file with name
422
+  N containing content C will be dynamically generated for each proxy
423
+  connection, where N is the source IP:port of the client connection and C
424
+  is the source IP:port of the connection to the proxy receiver. This
425
+  directory can be used as a dictionary by the proxy receiver to determine
426
+  the origin of the connection. Each generated file will be automatically
427
+  deleted when the proxied connection is torn down.
428
+
429
+  Not implemented on Windows.
430
+
431
+--push option
432
+  Push a config file option back to the client for remote execution. Note
433
+  that ``option`` must be enclosed in double quotes (:code:`""`). The
434
+  client must specify ``--pull`` in its config file. The set of options
435
+  which can be pushed is limited by both feasibility and security. Some
436
+  options such as those which would execute scripts are banned, since they
437
+  would effectively allow a compromised server to execute arbitrary code
438
+  on the client. Other options such as TLS or MTU parameters cannot be
439
+  pushed because the client needs to know them before the connection to the
440
+  server can be initiated.
441
+
442
+  This is a partial list of options which can currently be pushed:
443
+  ``--route``, ``--route-gateway``, ``--route-delay``,
444
+  ``--redirect-gateway``, ``--ip-win32``, ``--dhcp-option``,
445
+  ``--inactive``, ``--ping``, ``--ping-exit``, ``--ping-restart``,
446
+  ``--setenv``, ``--auth-token``, ``--persist-key``, ``--persist-tun``,
447
+  ``--echo``, ``--comp-lzo``, ``--socket-flags``, ``--sndbuf``,
448
+  ``--rcvbuf``
449
+
450
+--push-peer-info
451
+  Push additional information about the client to server. The following
452
+  data is always pushed to the server:
453
+
454
+  :code:`IV_VER=<version>`
455
+        The client OpenVPN version
456
+
457
+  :code:`IV_PLAT=[linux|solaris|openbsd|mac|netbsd|freebsd|win]`
458
+        The client OS platform
459
+
460
+  :code:`IV_LZO_STUB=1`
461
+        If client was built with LZO stub capability
462
+
463
+  :code:`IV_LZ4=1`
464
+        If the client supports LZ4 compressions.
465
+
466
+  :code:`IV_PROTO=2`
467
+        If the client supports peer-id floating mechanism
468
+
469
+  :code:`IV_NCP=2`
470
+        Negotiable ciphers, client supports ``--cipher`` pushed by
471
+        the server, a value of 2 or greater indicates client supports
472
+        *AES-GCM-128* and *AES-GCM-256*.
473
+
474
+  :code:`IV_CIPHERS=<ncp-ciphers>`
475
+        The client pushes the list of configured ciphers with the
476
+        ``--ciphers`` option to the server.
477
+
478
+  :code:`IV_GUI_VER=<gui_id> <version>`
479
+        The UI version of a UI if one is running, for example
480
+        :code:`de.blinkt.openvpn 0.5.47` for the Android app.
481
+
482
+  When ``--push-peer-info`` is enabled the additional information consists
483
+  of the following data:
484
+
485
+  :code:`IV_HWADDR=<mac address>`
486
+        The MAC address of clients default gateway
487
+
488
+  :code:`IV_SSL=<version string>`
489
+        The ssl version used by the client, e.g.
490
+        :code:`OpenSSL 1.0.2f 28 Jan 2016`.
491
+
492
+  :code:`IV_PLAT_VER=x.y`
493
+        The version of the operating system, e.g. 6.1 for Windows 7.
494
+
495
+  :code:`UV_<name>=<value>`
496
+        Client environment variables whose names start with
497
+        :code:`UV_`
498
+
499
+--push-remove opt
500
+  Selectively remove all ``--push`` options matching "opt" from the option
501
+  list for a client. ``opt`` is matched as a substring against the whole
502
+  option string to-be-pushed to the client, so ``--push-remove route``
503
+  would remove all ``--push route ...`` and ``--push route-ipv6 ...``
504
+  statements, while ``--push-remove "route-ipv6 2001:"`` would only remove
505
+  IPv6 routes for :code:`2001:...` networks.
506
+
507
+  ``--push-remove`` can only be used in a client-specific context, like in
508
+  a ``--client-config-dir`` file, or ``--client-connect`` script or plugin
509
+  -- similar to ``--push-reset``, just more selective.
510
+
511
+  *NOTE*: to *change* an option, ``--push-remove`` can be used to first
512
+  remove the old value, and then add a new ``--push`` option with the new
513
+  value.
514
+
515
+  *NOTE 2*: due to implementation details, 'ifconfig' and 'ifconfig-ipv6'
516
+  can only be removed with an exact match on the option (
517
+  :code:`push-remove ifconfig`), no substring matching and no matching on
518
+  the IPv4/IPv6 address argument is possible.
519
+
520
+--push-reset
521
+  Don't inherit the global push list for a specific client instance.
522
+  Specify this option in a client-specific context such as with a
523
+  ``--client-config-dir`` configuration file. This option will ignore
524
+  ``--push`` options at the global config file level.
525
+
526
+--server args
527
+  A helper directive designed to simplify the configuration of OpenVPN's
528
+  server mode. This directive will set up an OpenVPN server which will
529
+  allocate addresses to clients out of the given network/netmask. The
530
+  server itself will take the :code:`.1` address of the given network for
531
+  use as the server-side endpoint of the local TUN/TAP interface. If the
532
+  optional :code:`nopool` flag is given, no dynamic IP address pool will
533
+  prepared for VPN clients.
534
+
535
+  Valid syntax:
536
+  ::
537
+
538
+      server network netmask [nopool]
539
+
540
+  For example, ``--server 10.8.0.0 255.255.255.0`` expands as follows:
541
+  ::
542
+
543
+     mode server
544
+     tls-server
545
+     push "topology [topology]"
546
+
547
+     if dev tun AND (topology == net30 OR topology == p2p):
548
+       ifconfig 10.8.0.1 10.8.0.2
549
+       if !nopool:
550
+         ifconfig-pool 10.8.0.4 10.8.0.251
551
+       route 10.8.0.0 255.255.255.0
552
+       if client-to-client:
553
+         push "route 10.8.0.0 255.255.255.0"
554
+       else if topology == net30:
555
+         push "route 10.8.0.1"
556
+
557
+     if dev tap OR (dev tun AND topology == subnet):
558
+       ifconfig 10.8.0.1 255.255.255.0
559
+       if !nopool:
560
+         ifconfig-pool 10.8.0.2 10.8.0.253 255.255.255.0
561
+       push "route-gateway 10.8.0.1"
562
+       if route-gateway unset:
563
+         route-gateway 10.8.0.2
564
+
565
+  Don't use ``--server`` if you are ethernet bridging. Use
566
+  ``--server-bridge`` instead.
567
+
568
+--server-bridge args
569
+  A helper directive similar to ``--server`` which is designed to simplify
570
+  the configuration of OpenVPN's server mode in ethernet bridging
571
+  configurations.
572
+
573
+  Valid syntaxes:
574
+  ::
575
+
576
+      server-bridge gateway netmask pool-start-IP pool-end-IP
577
+      server-bridge [nogw]
578
+
579
+  If ``--server-bridge`` is used without any parameters, it will enable a
580
+  DHCP-proxy mode, where connecting OpenVPN clients will receive an IP
581
+  address for their TAP adapter from the DHCP server running on the
582
+  OpenVPN server-side LAN. Note that only clients that support the binding
583
+  of a DHCP client with the TAP adapter (such as Windows) can support this
584
+  mode. The optional :code:`nogw` flag (advanced) indicates that gateway
585
+  information should not be pushed to the client.
586
+
587
+  To configure ethernet bridging, you must first use your OS's bridging
588
+  capability to bridge the TAP interface with the ethernet NIC interface.
589
+  For example, on Linux this is done with the :code:`brctl` tool, and with
590
+  Windows XP it is done in the Network Connections Panel by selecting the
591
+  ethernet and TAP adapters and right-clicking on "Bridge Connections".
592
+
593
+  Next you you must manually set the IP/netmask on the bridge interface.
594
+  The ``gateway`` and ``netmask`` parameters to ``--server-bridge`` can be
595
+  set to either the IP/netmask of the bridge interface, or the IP/netmask
596
+  of the default gateway/router on the bridged subnet.
597
+
598
+  Finally, set aside a IP range in the bridged subnet, denoted by
599
+  ``pool-start-IP`` and ``pool-end-IP``, for OpenVPN to allocate to
600
+  connecting clients.
601
+
602
+  For example, ``server-bridge 10.8.0.4 255.255.255.0 10.8.0.128
603
+  10.8.0.254`` expands as follows:
604
+  ::
605
+
606
+    mode server
607
+    tls-server
608
+
609
+    ifconfig-pool 10.8.0.128 10.8.0.254 255.255.255.0
610
+    push "route-gateway 10.8.0.4"
611
+
612
+  In another example, ``--server-bridge`` (without parameters) expands as
613
+  follows:
614
+  ::
615
+
616
+    mode server
617
+    tls-server
618
+
619
+    push "route-gateway dhcp"
620
+
621
+  Or ``--server-bridge nogw`` expands as follows:
622
+  ::
623
+
624
+    mode server
625
+    tls-server
626
+
627
+--stale-routes-check args
628
+  Remove routes which haven't had activity for ``n`` seconds (i.e. the ageing
629
+  time).  This check is run every ``t`` seconds (i.e. check interval).
630
+
631
+  Valid syntax:
632
+  ::
633
+
634
+     stale-routes-check n [t]
635
+
636
+  If ``t`` is not present it defaults to ``n``.
637
+
638
+  This option helps to keep the dynamic routing table small. See also
639
+  ``--max-routes-per-client``
640
+
641
+--username-as-common-name
642
+  For ``--auth-user-pass-verify`` authentication, use the authenticated
643
+  username as the common name, rather than the common name from the client
644
+  cert.
645
+
646
+--verify-client-cert mode
647
+  Specify whether the client is required to supply a valid certificate.
648
+
649
+  Possible ``mode`` options are:
650
+
651
+  :code:`none`
652
+      A client certificate is not required. the client needs to
653
+      authenticate using username/password only. Be aware that using this
654
+      directive is less secure than requiring certificates from all
655
+      clients.
656
+
657
+      If you use this directive, the entire responsibility of authentication
658
+      will rest on your ``--auth-user-pass-verify`` script, so keep in mind
659
+      that bugs in your script could potentially compromise the security of
660
+      your VPN.
661
+
662
+      ``--verify-client-cert none`` is functionally equivalent to
663
+      ``--client-cert-not-required``.
664
+
665
+  :code:`optional`
666
+      A client may present a certificate but it is not required to do so.
667
+      When using this directive, you should also use a
668
+      ``--auth-user-pass-verify`` script to ensure that clients are
669
+      authenticated using a certificate, a username and password, or
670
+      possibly even both.
671
+
672
+      Again, the entire responsibility of authentication will rest on your
673
+      ``--auth-user-pass-verify`` script, so keep in mind that bugs in your
674
+      script could potentially compromise the security of your VPN.
675
+
676
+  :code:`require`
677
+      This is the default option. A client is required to present a
678
+      certificate, otherwise VPN access is refused.
679
+
680
+  If you don't use this directive (or use ``--verify-client-cert require``)
681
+  but you also specify an ``--auth-user-pass-verify`` script, then OpenVPN
682
+  will perform double authentication. The client certificate verification
683
+  AND the ``--auth-user-pass-verify`` script will need to succeed in order
684
+  for a client to be authenticated and accepted onto the VPN.
685
+
686
+--vlan-tagging
687
+  Server-only option. Turns the OpenVPN server instance into a switch that
688
+  understands VLAN-tagging, based on IEEE 802.1Q.
689
+
690
+  The server TAP device and each of the connecting clients is seen as a
691
+  port of the switch. All client ports are in untagged mode and the server
692
+  TAP device is VLAN-tagged, untagged or accepts both, depending on the
693
+  ``--vlan-accept`` setting.
694
+
695
+  Ethernet frames with a prepended 802.1Q tag are called "tagged". If the
696
+  VLAN Identifier (VID) field in such a tag is non-zero, the frame is
697
+  called "VLAN-tagged". If the VID is zero, but the Priority Control Point
698
+  (PCP) field is non-zero, the frame is called "prio-tagged". If there is
699
+  no 802.1Q tag, the frame is "untagged".
700
+
701
+  Using the ``--vlan-pvid v`` option once per client (see
702
+  --client-config-dir), each port can be associated with a certain VID.
703
+  Packets can only be forwarded between ports having the same VID.
704
+  Therefore, clients with differing VIDs are completely separated from
705
+  one-another, even if ``--client-to-client`` is activated.
706
+
707
+  The packet filtering takes place in the OpenVPN server. Clients should
708
+  not have any VLAN tagging configuration applied.
709
+
710
+  The ``--vlan-tagging`` option is off by default. While turned off,
711
+  OpenVPN accepts any Ethernet frame and does not perform any special
712
+  processing for VLAN-tagged packets.
713
+
714
+  This option can only be activated in ``--dev tap mode``.
715
+
716
+--vlan-accept args
717
+  Configure the VLAN tagging policy for the server TAP device.
718
+
719
+  Valid syntax:
720
+  ::
721
+
722
+     vlan-accept  all|tagged|untagged
723
+
724
+  The following modes are available:
725
+
726
+  :code:`tagged`
727
+      Admit only VLAN-tagged frames. Only VLAN-tagged packets are accepted,
728
+      while untagged or priority-tagged packets are dropped when entering
729
+      the server TAP device.
730
+
731
+  :code:`untagged`
732
+      Admit only untagged and prio-tagged frames.  VLAN-tagged packets are
733
+      not accepted, while untagged or priority-tagged packets entering the
734
+      server TAP device are tagged with the value configured for the global
735
+      ``--vlan-pvid`` setting.
736
+
737
+  :code:`all` (default)
738
+      Admit all frames.  All packets are admitted and then treated like
739
+      untagged or tagged mode respectively.
740
+
741
+  *Note*:
742
+      Some vendors refer to switch ports running in :code:`tagged` mode
743
+      as "trunk ports" and switch ports running in :code:`untagged` mode
744
+      as "access ports".
745
+
746
+  Packets forwarded from clients to the server are VLAN-tagged with the
747
+  originating client's PVID, unless the VID matches the global
748
+  ``--vlan-pvid``, in which case the tag is removed.
749
+
750
+  If no *PVID* is configured for a given client (see --vlan-pvid) packets
751
+  are tagged with 1 by default.
752
+
753
+--vlan-pvid v
754
+  Specifies which VLAN identifier a "port" is associated with. Only valid
755
+  when ``--vlan-tagging`` is speficied.
756
+
757
+  In the client context, the setting specifies which VLAN ID a client is
758
+  associated with. In the global context, the VLAN ID of the server TAP
759
+  device is set. The latter only makes sense for ``--vlan-accept
760
+  untagged`` and ``--vlan-accept all`` modes.
761
+
762
+  Valid values for ``v`` go from :code:`1` through to :code:`4094`. The
763
+  global value defaults to :code:`1`. If no ``--vlan-pvid`` is specified in
764
+  the client context, the global value is inherited.
765
+
766
+  In some switch implementations, the *PVID* is also referred to as "Native
767
+  VLAN".
0 768
new file mode 100644
... ...
@@ -0,0 +1,30 @@
0
+SIGNALS
1
+=======
2
+
3
+:code:`SIGHUP`
4
+    Cause OpenVPN to close all TUN/TAP and network connections, restart,
5
+    re-read the configuration file (if any), and reopen TUN/TAP and network
6
+    connections.
7
+
8
+:code:`SIGUSR1`
9
+    Like :code:`SIGHUP``, except don't re-read configuration file, and
10
+    possibly don't close and reopen TUN/TAP device, re-read key files,
11
+    preserve local IP address/port, or preserve most recently authenticated
12
+    remote IP address/port based on ``--persist-tun``, ``--persist-key``,
13
+    ``--persist-local-ip`` and ``--persist-remote-ip`` options respectively
14
+    (see above).
15
+
16
+    This signal may also be internally generated by a timeout condition,
17
+    governed by the ``--ping-restart`` option.
18
+
19
+    This signal, when combined with ``--persist-remote-ip``, may be sent
20
+    when the underlying parameters of the host's network interface change
21
+    such as when the host is a DHCP client and is assigned a new IP address.
22
+    See ``--ipchange`` for more information.
23
+
24
+:code:`SIGUSR2`
25
+    Causes OpenVPN to display its current statistics (to the syslog file if
26
+    ``--daemon`` is used, or stdout otherwise).
27
+
28
+:code:`SIGINT`, :code:`SIGTERM`
29
+    Causes OpenVPN to exit gracefully.
0 30
new file mode 100644
... ...
@@ -0,0 +1,643 @@
0
+TLS Mode Options
1
+----------------
2
+
3
+TLS mode is the most powerful crypto mode of OpenVPN in both security
4
+and flexibility. TLS mode works by establishing control and data
5
+channels which are multiplexed over a single TCP/UDP port. OpenVPN
6
+initiates a TLS session over the control channel and uses it to exchange
7
+cipher and HMAC keys to protect the data channel. TLS mode uses a robust
8
+reliability layer over the UDP connection for all control channel
9
+communication, while the data channel, over which encrypted tunnel data
10
+passes, is forwarded without any mediation. The result is the best of
11
+both worlds: a fast data channel that forwards over UDP with only the
12
+overhead of encrypt, decrypt, and HMAC functions, and a control channel
13
+that provides all of the security features of TLS, including
14
+certificate-based authentication and Diffie Hellman forward secrecy.
15
+
16
+To use TLS mode, each peer that runs OpenVPN should have its own local
17
+certificate/key pair (``--cert`` and ``--key``), signed by the root
18
+certificate which is specified in ``--ca``.
19
+
20
+When two OpenVPN peers connect, each presents its local certificate to
21
+the other. Each peer will then check that its partner peer presented a
22
+certificate which was signed by the master root certificate as specified
23
+in ``--ca``.
24
+
25
+If that check on both peers succeeds, then the TLS negotiation will
26
+succeed, both OpenVPN peers will exchange temporary session keys, and
27
+the tunnel will begin passing data.
28
+
29
+The OpenVPN project provides a set of scripts for managing RSA
30
+certificates and keys: https://github.com/OpenVPN/easy-rsa
31
+
32
+--askpass file
33
+  Get certificate password from console or ``file`` before we daemonize.
34
+
35
+  Valid syntaxes:
36
+  ::
37
+
38
+     askpass
39
+     askpass file
40
+
41
+  For the extremely security conscious, it is possible to protect your
42
+  private key with a password. Of course this means that every time the
43
+  OpenVPN daemon is started you must be there to type the password. The
44
+  ``--askpass`` option allows you to start OpenVPN from the command line.
45
+  It will query you for a password before it daemonizes. To protect a
46
+  private key with a password you should omit the ``-nodes`` option when
47
+  you use the ``openssl`` command line tool to manage certificates and
48
+  private keys.
49
+
50
+  If ``file`` is specified, read the password from the first line of
51
+  ``file``. Keep in mind that storing your password in a file to a certain
52
+  extent invalidates the extra security provided by using an encrypted
53
+  key.
54
+
55
+--ca file
56
+  Certificate authority (CA) file in .pem format, also referred to as the
57
+  *root* certificate. This file can have multiple certificates in .pem
58
+  format, concatenated together. You can construct your own certificate
59
+  authority certificate and private key by using a command such as:
60
+  ::
61
+
62
+     openssl req -nodes -new -x509 -keyout ca.key -out ca.crt
63
+
64
+  Then edit your openssl.cnf file and edit the ``certificate`` variable to
65
+  point to your new root certificate ``ca.crt``.
66
+
67
+  For testing purposes only, the OpenVPN distribution includes a sample CA
68
+  certificate (ca.crt). Of course you should never use the test
69
+  certificates and test keys distributed with OpenVPN in a production
70
+  environment, since by virtue of the fact that they are distributed with
71
+  OpenVPN, they are totally insecure.
72
+
73
+--capath dir
74
+  Directory containing trusted certificates (CAs and CRLs). Not available
75
+  with mbed TLS.
76
+
77
+  CAs in the capath directory are expected to be named <hash>.<n>. CRLs
78
+  are expected to be named <hash>.r<n>. See the ``-CApath`` option of
79
+  ``openssl verify``, and the ``-hash`` option of ``openssl x509``,
80
+  ``openssl crl`` and ``X509_LOOKUP_hash_dir()``\(3)
81
+  for more information.
82
+
83
+  Similar to the ``--crl-verify`` option, CRLs are not mandatory -
84
+  OpenVPN will log the usual warning in the logs if the relevant CRL is
85
+  missing, but the connection will be allowed.
86
+
87
+--cert file
88
+  Local peer's signed certificate in .pem format -- must be signed by a
89
+  certificate authority whose certificate is in ``--ca file``. Each peer
90
+  in an OpenVPN link running in TLS mode should have its own certificate
91
+  and private key file. In addition, each certificate should have been
92
+  signed by the key of a certificate authority whose public key resides in
93
+  the ``--ca`` certificate authority file. You can easily make your own
94
+  certificate authority (see above) or pay money to use a commercial
95
+  service such as thawte.com (in which case you will be helping to finance
96
+  the world's second space tourist :). To generate a certificate, you can
97
+  use a command such as:
98
+  ::
99
+
100
+     openssl req -nodes -new -keyout mycert.key -out mycert.csr
101
+
102
+  If your certificate authority private key lives on another machine, copy
103
+  the certificate signing request (mycert.csr) to this other machine (this
104
+  can be done over an insecure channel such as email). Now sign the
105
+  certificate with a command such as:
106
+  ::
107
+
108
+     openssl ca -out mycert.crt -in mycert.csr
109
+
110
+  Now copy the certificate (mycert.crt) back to the peer which initially
111
+  generated the .csr file (this can be over a public medium). Note that
112
+  the ``openssl ca`` command reads the location of the certificate
113
+  authority key from its configuration file such as
114
+  :code:`/usr/share/ssl/openssl.cnf` -- note also that for certificate
115
+  authority functions, you must set up the files :code:`index.txt` (may be
116
+  empty) and :code:`serial` (initialize to :code:`01`).
117
+
118
+--crl-verify args
119
+  Check peer certificate against a Certificate Revocation List.
120
+
121
+  Valid syntax:
122
+  ::
123
+
124
+     crl-verify file/directory flag
125
+
126
+  Examples:
127
+  ::
128
+
129
+     crl-verify crl-file.pem
130
+     crl-verify /etc/openvpn/crls dir
131
+
132
+  A CRL (certificate revocation list) is used when a particular key is
133
+  compromised but when the overall PKI is still intact.
134
+
135
+  Suppose you had a PKI consisting of a CA, root certificate, and a number
136
+  of client certificates. Suppose a laptop computer containing a client
137
+  key and certificate was stolen. By adding the stolen certificate to the
138
+  CRL file, you could reject any connection which attempts to use it,
139
+  while preserving the overall integrity of the PKI.
140
+
141
+  The only time when it would be necessary to rebuild the entire PKI from
142
+  scratch would be if the root certificate key itself was compromised.
143
+
144
+  The option is not mandatory - if the relevant CRL is missing, OpenVPN
145
+  will log a warning in the logs - e.g.
146
+  ::
147
+
148
+     VERIFY WARNING: depth=0, unable to get certificate CRL
149
+
150
+  but the connection will be allowed.  If the optional :code:`dir` flag
151
+  is specified, enable a different mode where the ``crl-verify`` is
152
+  pointed at a directory containing files named as revoked serial numbers
153
+  (the files may be empty, the contents are never read). If a client
154
+  requests a connection, where the client certificate serial number
155
+  (decimal string) is the name of a file present in the directory, it will
156
+  be rejected.
157
+
158
+  *Note:*
159
+            As the crl file (or directory) is read every time a peer
160
+            connects, if you are dropping root privileges with
161
+            ``--user``, make sure that this user has sufficient
162
+            privileges to read the file.
163
+
164
+
165
+--dh file
166
+  File containing Diffie Hellman parameters in .pem format (required for
167
+  ``--tls-server`` only).
168
+
169
+  Set ``file`` to :code:`none` to disable Diffie Hellman key exchange (and
170
+  use ECDH only). Note that this requires peers to be using an SSL library
171
+  that supports ECDH TLS cipher suites (e.g. OpenSSL 1.0.1+, or
172
+  mbed TLS 2.0+).
173
+
174
+  Use ``openssl dhparam -out dh2048.pem 2048`` to generate 2048-bit DH
175
+  parameters. Diffie Hellman parameters may be considered public.
176
+
177
+--ecdh-curve name
178
+  Specify the curve to use for elliptic curve Diffie Hellman. Available
179
+  curves can be listed with ``--show-curves``. The specified curve will
180
+  only be used for ECDH TLS-ciphers.
181
+
182
+  This option is not supported in mbed TLS builds of OpenVPN.
183
+
184
+--extra-certs file
185
+  Specify a ``file`` containing one or more PEM certs (concatenated
186
+  together) that complete the local certificate chain.
187
+
188
+  This option is useful for "split" CAs, where the CA for server certs is
189
+  different than the CA for client certs. Putting certs in this file
190
+  allows them to be used to complete the local certificate chain without
191
+  trusting them to verify the peer-submitted certificate, as would be the
192
+  case if the certs were placed in the ``ca`` file.
193
+
194
+--hand-window n
195
+  Handshake Window -- the TLS-based key exchange must finalize within
196
+  ``n`` seconds of handshake initiation by any peer (default :code:`60`
197
+  seconds). If the handshake fails we will attempt to reset our connection
198
+  with our peer and try again. Even in the event of handshake failure we
199
+  will still use our expiring key for up to ``--tran-window`` seconds to
200
+  maintain continuity of transmission of tunnel data.
201
+
202
+--key file
203
+  Local peer's private key in .pem format. Use the private key which was
204
+  generated when you built your peer's certificate (see ``--cert file``
205
+  above).
206
+
207
+--pkcs12 file
208
+  Specify a PKCS #12 file containing local private key, local certificate,
209
+  and root CA certificate. This option can be used instead of ``--ca``,
210
+  ``--cert``, and ``--key``.  Not available with mbed TLS.
211
+
212
+--remote-cert-eku oid
213
+  Require that peer certificate was signed with an explicit *extended key
214
+  usage*.
215
+
216
+  This is a useful security option for clients, to ensure that the host
217
+  they connect to is a designated server.
218
+
219
+  The extended key usage should be encoded in *oid notation*, or *OpenSSL
220
+  symbolic representation*.
221
+
222
+--remote-cert-ku key-usage
223
+  Require that peer certificate was signed with an explicit
224
+  ``key-usage``.
225
+
226
+  If present in the certificate, the :code:`keyUsage` value is validated by
227
+  the TLS library during the TLS handshake. Specifying this option without
228
+  arguments requires this extension to be present (so the TLS library will
229
+  verify it).
230
+
231
+  If ``key-usage`` is a list of usage bits, the :code:`keyUsage` field
232
+  must have *at least* the same bits set as the bits in *one of* the values
233
+  supplied in the ``key-usage`` list.
234
+
235
+  The ``key-usage`` values in the list must be encoded in hex, e.g.
236
+  ::
237
+
238
+     remote-cert-ku a0
239
+
240
+--remote-cert-tls type
241
+  Require that peer certificate was signed with an explicit *key usage*
242
+  and *extended key usage* based on RFC3280 TLS rules.
243
+
244
+  Valid syntaxes:
245
+  ::
246
+
247
+     remote-cert-tls server
248
+     remote-cert-tls client
249
+
250
+  This is a useful security option for clients, to ensure that the host
251
+  they connect to is a designated server. Or the other way around; for a
252
+  server to verify that only hosts with a client certificate can connect.
253
+
254
+  The ``--remote-cert-tls client`` option is equivalent to
255
+  ::
256
+
257
+     remote-cert-ku
258
+     remote-cert-eku "TLS Web Client Authentication"
259
+
260
+  The ``--remote-cert-tls server`` option is equivalent to
261
+  ::
262
+
263
+     remote-cert-ku
264
+     remote-cert-eku "TLS Web Server Authentication"
265
+
266
+  This is an important security precaution to protect against a
267
+  man-in-the-middle attack where an authorized client attempts to connect
268
+  to another client by impersonating the server. The attack is easily
269
+  prevented by having clients verify the server certificate using any one
270
+  of ``--remote-cert-tls``, ``--verify-x509-name``, or ``--tls-verify``.
271
+
272
+--tls-auth args
273
+  Add an additional layer of HMAC authentication on top of the TLS control
274
+  channel to mitigate DoS attacks and attacks on the TLS stack.
275
+
276
+  Valid syntaxes:
277
+  ::
278
+
279
+     tls-auth file
280
+     tls-auth file 0
281
+     tls-auth file 1
282
+
283
+  In a nutshell, ``--tls-auth`` enables a kind of "HMAC firewall" on
284
+  OpenVPN's TCP/UDP port, where TLS control channel packets bearing an
285
+  incorrect HMAC signature can be dropped immediately without response.
286
+
287
+  ``file`` (required) is a file in OpenVPN static key format which can be
288
+  generated by ``--genkey``.
289
+
290
+  Older versions (up to OpenVPN 2.3) supported a freeform passphrase file.
291
+  This is no longer supported in newer versions (v2.4+).
292
+
293
+  See the ``--secret`` option for more information on the optional
294
+  ``direction`` parameter.
295
+
296
+  ``--tls-auth`` is recommended when you are running OpenVPN in a mode
297
+  where it is listening for packets from any IP address, such as when
298
+  ``--remote`` is not specified, or ``--remote`` is specified with
299
+  ``--float``.
300
+
301
+  The rationale for this feature is as follows. TLS requires a
302
+  multi-packet exchange before it is able to authenticate a peer. During
303
+  this time before authentication, OpenVPN is allocating resources (memory
304
+  and CPU) to this potential peer. The potential peer is also exposing
305
+  many parts of OpenVPN and the OpenSSL library to the packets it is
306
+  sending. Most successful network attacks today seek to either exploit
307
+  bugs in programs (such as buffer overflow attacks) or force a program to
308
+  consume so many resources that it becomes unusable. Of course the first
309
+  line of defense is always to produce clean, well-audited code. OpenVPN
310
+  has been written with buffer overflow attack prevention as a top
311
+  priority. But as history has shown, many of the most widely used network
312
+  applications have, from time to time, fallen to buffer overflow attacks.
313
+
314
+  So as a second line of defense, OpenVPN offers this special layer of
315
+  authentication on top of the TLS control channel so that every packet on
316
+  the control channel is authenticated by an HMAC signature and a unique
317
+  ID for replay protection. This signature will also help protect against
318
+  DoS (Denial of Service) attacks. An important rule of thumb in reducing
319
+  vulnerability to DoS attacks is to minimize the amount of resources a
320
+  potential, but as yet unauthenticated, client is able to consume.
321
+
322
+  ``--tls-auth`` does this by signing every TLS control channel packet
323
+  with an HMAC signature, including packets which are sent before the TLS
324
+  level has had a chance to authenticate the peer. The result is that
325
+  packets without the correct signature can be dropped immediately upon
326
+  reception, before they have a chance to consume additional system
327
+  resources such as by initiating a TLS handshake. ``--tls-auth`` can be
328
+  strengthened by adding the ``--replay-persist`` option which will keep
329
+  OpenVPN's replay protection state in a file so that it is not lost
330
+  across restarts.
331
+
332
+  It should be emphasized that this feature is optional and that the key
333
+  file used with ``--tls-auth`` gives a peer nothing more than the power
334
+  to initiate a TLS handshake. It is not used to encrypt or authenticate
335
+  any tunnel data.
336
+
337
+  Use ``--tls-crypt`` instead if you want to use the key file to not only
338
+  authenticate, but also encrypt the TLS control channel.
339
+
340
+--tls-cert-profile profile
341
+  Set the allowed cryptographic algorithms for certificates according to
342
+  ``profile``.
343
+
344
+  The following profiles are supported:
345
+
346
+  :code:`legacy` (default)
347
+      SHA1 and newer, RSA 2048-bit+, any elliptic curve.
348
+
349
+  :code:`preferred`
350
+      SHA2 and newer, RSA 2048-bit+, any elliptic curve.
351
+
352
+  :code:`suiteb`
353
+      SHA256/SHA384, ECDSA with P-256 or P-384.
354
+
355
+  This option is only fully supported for mbed TLS builds. OpenSSL builds
356
+  use the following approximation:
357
+
358
+  :code:`legacy` (default)
359
+      sets "security level 1"
360
+
361
+  :code:`preferred`
362
+      sets "security level 2"
363
+
364
+  :code:`suiteb`
365
+      sets "security level 3" and ``--tls-cipher "SUITEB128"``.
366
+
367
+  OpenVPN will migrate to 'preferred' as default in the future. Please
368
+  ensure that your keys already comply.
369
+
370
+*WARNING:* ``--tls-ciphers`` and ``--tls-ciphersuites``
371
+    These options are expert features, which - if used correctly - can
372
+    improve the security of your VPN connection. But it is also easy to
373
+    unwittingly use them to carefully align a gun with your foot, or just
374
+    break your connection. Use with care!
375
+
376
+--tls-cipher l
377
+  A list ``l`` of allowable TLS ciphers delimited by a colon (":code:`:`").
378
+
379
+  These setting can be used to ensure that certain cipher suites are used
380
+  (or not used) for the TLS connection. OpenVPN uses TLS to secure the
381
+  control channel, over which the keys that are used to protect the actual
382
+  VPN traffic are exchanged.
383
+
384
+  The supplied list of ciphers is (after potential OpenSSL/IANA name
385
+  translation) simply supplied to the crypto library. Please see the
386
+  OpenSSL and/or mbed TLS documentation for details on the cipher list
387
+  interpretation.
388
+
389
+  For OpenSSL, the ``--tls-cipher`` is used for TLS 1.2 and below.
390
+
391
+  Use ``--show-tls`` to see a list of TLS ciphers supported by your crypto
392
+  library.
393
+
394
+  The default for ``--tls-cipher`` is to use mbed TLS's default cipher list
395
+  when using mbed TLS or
396
+  :code:`DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA` when
397
+  using OpenSSL.
398
+
399
+  The default for `--tls-ciphersuites` is to use the crypto library's
400
+  default.
401
+
402
+--tls-ciphersuites l
403
+  Same as ``--tls-cipher`` but for TLS 1.3 and up. mbed TLS has no
404
+  TLS 1.3 support yet and only the ``--tls-cipher`` setting is used.
405
+
406
+--tls-client
407
+  Enable TLS and assume client role during TLS handshake.
408
+
409
+--tls-crypt keyfile
410
+  Encrypt and authenticate all control channel packets with the key from
411
+  ``keyfile``. (See ``--tls-auth`` for more background.)
412
+
413
+  Encrypting (and authenticating) control channel packets:
414
+
415
+  * provides more privacy by hiding the certificate used for the TLS
416
+    connection,
417
+
418
+  * makes it harder to identify OpenVPN traffic as such,
419
+
420
+  * provides "poor-man's" post-quantum security, against attackers who will
421
+    never know the pre-shared key (i.e. no forward secrecy).
422
+
423
+  In contrast to ``--tls-auth``, ``--tls-crypt`` does *not* require the
424
+  user to set ``--key-direction``.
425
+
426
+  **Security Considerations**
427
+
428
+  All peers use the same ``--tls-crypt`` pre-shared group key to
429
+  authenticate and encrypt control channel messages. To ensure that IV
430
+  collisions remain unlikely, this key should not be used to encrypt more
431
+  than 2^48 client-to-server or 2^48 server-to-client control channel
432
+  messages. A typical initial negotiation is about 10 packets in each
433
+  direction. Assuming both initial negotiation and renegotiations are at
434
+  most 2^16 (65536) packets (to be conservative), and (re)negotiations
435
+  happen each minute for each user (24/7), this limits the tls-crypt key
436
+  lifetime to 8171 years divided by the number of users. So a setup with
437
+  1000 users should rotate the key at least once each eight years. (And a
438
+  setup with 8000 users each year.)
439
+
440
+  If IV collisions were to occur, this could result in the security of
441
+  ``--tls-crypt`` degrading to the same security as using ``--tls-auth``.
442
+  That is, the control channel still benefits from the extra protection
443
+  against active man-in-the-middle-attacks and DoS attacks, but may no
444
+  longer offer extra privacy and post-quantum security on top of what TLS
445
+  itself offers.
446
+
447
+  For large setups or setups where clients are not trusted, consider using
448
+  ``--tls-crypt-v2`` instead. That uses per-client unique keys, and
449
+  thereby improves the bounds to 'rotate a client key at least once per
450
+  8000 years'.
451
+
452
+--tls-crypt-v2 keyfile
453
+  Use client-specific tls-crypt keys.
454
+
455
+  For clients, ``keyfile`` is a client-specific tls-crypt key. Such a key
456
+  can be generated using the :code:`--genkey tls-crypt-v2-client` option.
457
+
458
+  For servers, ``keyfile`` is used to unwrap client-specific keys supplied
459
+  by the client during connection setup. This key must be the same as the
460
+  key used to generate the client-specific key (see :code:`--genkey
461
+  tls-crypt-v2-client`).
462
+
463
+  On servers, this option can be used together with the ``--tls-auth`` or
464
+  ``--tls-crypt`` option. In that case, the server will detect whether the
465
+  client is using client-specific keys, and automatically select the right
466
+  mode.
467
+
468
+--tls-crypt-v2-verify cmd
469
+  Run command ``cmd`` to verify the metadata of the client-specific
470
+  tls-crypt-v2 key of a connecting client. This allows server
471
+  administrators to reject client connections, before exposing the TLS
472
+  stack (including the notoriously dangerous X.509 and ASN.1 stacks) to
473
+  the connecting client.
474
+
475
+  OpenVPN supplies the following environment variables to the command:
476
+
477
+  * :code:`script_type` is set to :code:`tls-crypt-v2-verify`
478
+
479
+  * :code:`metadata_type` is set to :code:`0` if the metadata was user
480
+    supplied, or :code:`1` if it's a 64-bit unix timestamp representing
481
+    the key creation time.
482
+
483
+  * :code:`metadata_file` contains the filename of a temporary file that
484
+    contains the client metadata.
485
+
486
+  The command can reject the connection by exiting with a non-zero exit
487
+  code.
488
+
489
+--tls-exit
490
+  Exit on TLS negotiation failure.
491
+
492
+--tls-export-cert directory
493
+  Store the certificates the clients use upon connection to this
494
+  directory. This will be done before ``--tls-verify`` is called. The
495
+  certificates will use a temporary name and will be deleted when the
496
+  tls-verify script returns. The file name used for the certificate is
497
+  available via the ``peer_cert`` environment variable.
498
+
499
+--tls-server
500
+  Enable TLS and assume server role during TLS handshake. Note that
501
+  OpenVPN is designed as a peer-to-peer application. The designation of
502
+  client or server is only for the purpose of negotiating the TLS control
503
+  channel.
504
+
505
+--tls-timeout n
506
+  Packet retransmit timeout on TLS control channel if no acknowledgment
507
+  from remote within ``n`` seconds (default :code:`2`). When OpenVPN sends
508
+  a control packet to its peer, it will expect to receive an
509
+  acknowledgement within ``n`` seconds or it will retransmit the packet,
510
+  subject to a TCP-like exponential backoff algorithm. This parameter only
511
+  applies to control channel packets. Data channel packets (which carry
512
+  encrypted tunnel data) are never acknowledged, sequenced, or
513
+  retransmitted by OpenVPN because the higher level network protocols
514
+  running on top of the tunnel such as TCP expect this role to be left to
515
+  them.
516
+
517
+--tls-version-min args
518
+  Sets the minimum TLS version we will accept from the peer (default is
519
+  "1.0").
520
+
521
+  Valid syntax:
522
+  ::
523
+
524
+     tls-version-min version ['or-highest']
525
+
526
+  Examples for version include :code:`1.0`, :code:`1.1`, or :code:`1.2`. If
527
+  :code:`or-highest` is specified and version is not recognized, we will
528
+  only accept the highest TLS version supported by the local SSL
529
+  implementation.
530
+
531
+--tls-version-max version
532
+  Set the maximum TLS version we will use (default is the highest version
533
+  supported). Examples for version include :code:`1.0`, :code:`1.1`, or
534
+  :code:`1.2`.
535
+
536
+--verify-hash args
537
+  Specify SHA1 or SHA256 fingerprint for level-1 cert.
538
+
539
+  Valid syntax:
540
+  ::
541
+
542
+     verify-hash hash [algo]
543
+
544
+  The level-1 cert is the CA (or intermediate cert) that signs the leaf
545
+  certificate, and is one removed from the leaf certificate in the
546
+  direction of the root. When accepting a connection from a peer, the
547
+  level-1 cert fingerprint must match ``hash`` or certificate verification
548
+  will fail. Hash is specified as XX:XX:... For example:
549
+  ::
550
+
551
+     AD:B0:95:D8:09:C8:36:45:12:A9:89:C8:90:09:CB:13:72:A6:AD:16
552
+
553
+  The ``algo`` flag can be either :code:`SHA1` or :code:`SHA256`. If not
554
+  provided, it defaults to :code:`SHA1`.
555
+
556
+--verify-x509-name args
557
+  Accept connections only if a host's X.509 name is equal to **name.** The
558
+  remote host must also pass all other tests of verification.
559
+
560
+  Valid syntax:
561
+  ::
562
+
563
+     verify-x509 name type
564
+
565
+  Which X.509 name is compared to ``name`` depends on the setting of type.
566
+  ``type`` can be :code:`subject` to match the complete subject DN
567
+  (default), :code:`name` to match a subject RDN or :code:`name-prefix` to
568
+  match a subject RDN prefix. Which RDN is verified as name depends on the
569
+  ``--x509-username-field`` option. But it defaults to the common name
570
+  (CN), e.g. a certificate with a subject DN
571
+  ::
572
+
573
+     C=KG, ST=NA, L=Bishkek, CN=Server-1
574
+
575
+  would be matched by:
576
+  ::
577
+
578
+     verify-x509-name 'C=KG, ST=NA, L=Bishkek, CN=Server-1'
579
+     verify-x509-name Server-1 name
580
+     verify-x509-name Server- name-prefix
581
+
582
+  The last example is useful if you want a client to only accept
583
+  connections to :code:`Server-1`, :code:`Server-2`, etc.
584
+
585
+  ``--verify-x509-name`` is a useful replacement for the ``--tls-verify``
586
+  option to verify the remote host, because ``--verify-x509-name`` works
587
+  in a ``--chroot`` environment without any dependencies.
588
+
589
+  Using a name prefix is a useful alternative to managing a CRL
590
+  (Certificate Revocation List) on the client, since it allows the client
591
+  to refuse all certificates except for those associated with designated
592
+  servers.
593
+
594
+  *NOTE:*
595
+      Test against a name prefix only when you are using OpenVPN
596
+      with a custom CA certificate that is under your control. Never use
597
+      this option with type :code:`name-prefix` when your client
598
+      certificates are signed by a third party, such as a commercial
599
+      web CA.
600
+
601
+--x509-track attribute
602
+  Save peer X509 **attribute** value in environment for use by plugins and
603
+  management interface. Prepend a :code:`+` to ``attribute`` to save values
604
+  from full cert chain. Values will be encoded as
605
+  :code:`X509_<depth>_<attribute>=<value>`. Multiple ``--x509-track``
606
+  options can be defined to track multiple attributes.
607
+
608
+--x509-username-field args
609
+  Field in the X.509 certificate subject to be used as the username
610
+  (default :code:`CN`).
611
+
612
+  Valid syntax:
613
+  ::
614
+
615
+     x509-username-field [ext:]fieldname
616
+
617
+  Typically, this option is specified with **fieldname** as
618
+  either of the following:
619
+  ::
620
+
621
+     x509-username-field emailAddress
622
+     x509-username-field ext:subjectAltName
623
+
624
+  The first example uses the value of the :code:`emailAddress` attribute
625
+  in the certificate's Subject field as the username. The second example
626
+  uses the :code:`ext:` prefix to signify that the X.509 extension
627
+  ``fieldname`` :code:`subjectAltName` be searched for an rfc822Name
628
+  (email) field to be used as the username. In cases where there are
629
+  multiple email addresses in :code:`ext:fieldname`, the last occurrence
630
+  is chosen.
631
+
632
+  When this option is used, the ``--verify-x509-name`` option will match
633
+  against the chosen ``fieldname`` instead of the Common Name.
634
+
635
+  Only the :code:`subjectAltName` and :code:`issuerAltName` X.509
636
+  extensions are supported.
637
+
638
+  **Please note:** This option has a feature which will convert an
639
+  all-lowercase ``fieldname`` to uppercase characters, e.g.,
640
+  :code:`ou` -> :code:`OU`. A mixed-case ``fieldname`` or one having the
641
+  :code:`ext:` prefix will be left as-is. This automatic upcasing feature is
642
+  deprecated and will be removed in a future release.
0 643
new file mode 100644
... ...
@@ -0,0 +1,32 @@
0
+
1
+UNSUPPORTED OPTIONS
2
+===================
3
+
4
+Options listed in this section have been removed from OpenVPN and are no
5
+longer supported
6
+
7
+--client-cert-not-required
8
+  Removed in OpenVPN 2.5.  This should be replaxed with
9
+  ``--verify-client-cert none``.
10
+
11
+--ifconfig-pool-linear
12
+  Removed in OpenVPN 2.5.  This should be replaced with ``--topology p2p``.
13
+
14
+--key-method
15
+  Removed in OpenVPN 2.5.  This option should not be used, as using the old
16
+  ``key-method`` weakens the VPN tunnel security.  The old ``key-method``
17
+  was also only needed when the remote side was older than OpenVPN 2.0.
18
+
19
+--no-iv
20
+  Removed in OpenVPN 2.5.  This option should not be used as it weakens the
21
+  VPN tunnel security.
22
+
23
+--no-replay
24
+  Removed in OpenVPN 2.5.  This option should not be used as it weakens the
25
+  VPN tunnel security.
26
+
27
+--ns-cert-type
28
+  Removed in OpenVPN 2.5.  The ``nsCertType`` field is no longer supported
29
+  in recent SSL/TLS libraries.  If your certificates does not include *key
30
+  usage* and *extended key usage* fields, they must be upgraded and the
31
+  ``--remote-cert-tls`` option should be used instead.
0 32
new file mode 100644
... ...
@@ -0,0 +1,530 @@
0
+Virtual Network Adapter (VPN interface)
1
+---------------------------------------
2
+
3
+Options in this section relates to configuration of the virtual tun/tap
4
+network interface, including setting the VPN IP address and network
5
+routing.
6
+
7
+--block-ipv6
8
+  On the client, instead of sending IPv6 packets over the VPN tunnel, all
9
+  IPv6 packets are answered with an ICMPv6 no route host message. On the
10
+  server, all IPv6 packets from clients are answered with an ICMPv6 no
11
+  route to host message. This options is intended for cases when IPv6
12
+  should be blocked and other options are not available. ``--block-ipv6``
13
+  will use the remote IPv6 as source address of the ICMPv6 packets if set,
14
+  otherwise will use :code:`fe80::7` as source address.
15
+
16
+  For this option to make sense you actually have to route traffic to the
17
+  tun interface. The following example config block would send all IPv6
18
+  traffic to OpenVPN and answer all requests with no route to host,
19
+  effectively blocking IPv6.
20
+
21
+  **Client config**
22
+    ::
23
+
24
+       --ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1
25
+       --redirect-gateway ipv6
26
+       --block-ipv6
27
+
28
+  **Server config**
29
+    Push a "valid" ipv6 config to the client and block on the server
30
+    ::
31
+
32
+       --push "ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1"
33
+       --push "redirect-gateway ipv6"
34
+       --block-ipv6
35
+
36
+--dev device
37
+  TUN/TAP virtual network device which can be :code:`tunX`, :code:`tapX`,
38
+  :code:`null` or an arbitrary name string (:code:`X` can be omitted for
39
+  a dynamic device.)
40
+
41
+  See examples section below for an example on setting up a TUN device.
42
+
43
+  You must use either tun devices on both ends of the connection or tap
44
+  devices on both ends. You cannot mix them, as they represent different
45
+  underlying network layers:
46
+
47
+  :code:`tun`
48
+      devices encapsulate IPv4 or IPv6 (OSI Layer 3)
49
+
50
+  :code:`tap`
51
+      devices encapsulate Ethernet 802.3 (OSI Layer 2).
52
+
53
+  Valid syntaxes:
54
+  ::
55
+
56
+     dev tun2
57
+     dev tap4
58
+     dev ovpn
59
+
60
+  When the device name starts with :code:`tun` or :code:`tap`, the device
61
+  type is extracted automatically.  Otherwise the ``--dev-type`` option
62
+  needs to be added as well.
63
+
64
+--dev-node node
65
+  Explicitly set the device node rather than using :code:`/dev/net/tun`,
66
+  :code:`/dev/tun`, :code:`/dev/tap`, etc. If OpenVPN cannot figure out
67
+  whether ``node`` is a TUN or TAP device based on the name, you should
68
+  also specify ``--dev-type tun`` or ``--dev-type tap``.
69
+
70
+  Under Mac OS X this option can be used to specify the default tun
71
+  implementation. Using ``--dev-node utun`` forces usage of the native
72
+  Darwin tun kernel support. Use ``--dev-node utunN`` to select a specific
73
+  utun instance. To force using the :code:`tun.kext` (:code:`/dev/tunX`)
74
+  use ``--dev-node tun``. When not specifying a ``--dev-node`` option
75
+  openvpn will first try to open utun, and fall back to tun.kext.
76
+
77
+  On Windows systems, select the TAP-Win32 adapter which is named ``node``
78
+  in the Network Connections Control Panel or the raw GUID of the adapter
79
+  enclosed by braces. The ``--show-adapters`` option under Windows can
80
+  also be used to enumerate all available TAP-Win32 adapters and will show
81
+  both the network connections control panel name and the GUID for each
82
+  TAP-Win32 adapter.
83
+
84
+--dev-type device-type
85
+  Which device type are we using? ``device-type`` should be :code:`tun`
86
+  (OSI Layer 3) or :code:`tap` (OSI Layer 2). Use this option only if
87
+  the TUN/TAP device used with ``--dev`` does not begin with :code:`tun`
88
+  or :code:`tap`.
89
+
90
+--dhcp-option args
91
+  Set additional network settings via DHCP.  On Windows, this is parsed by
92
+  the ``tap-windows6`` or ``wintun`` driver.  On other platforms these
93
+  options can be picked up by an ``--up`` script or plug-in if it has been
94
+  pushed by the OpenVPN server.  The option will then be saved in the
95
+  client's environment before the ``--up`` script is called, under the name
96
+  :code:`foreign_option_{n}`.
97
+
98
+  Valid syntax:
99
+  ::
100
+
101
+     dhcp-options type [parm]
102
+
103
+  :code:`DOMAIN` ``name``
104
+        Set Connection-specific DNS Suffix to :code:`name`.
105
+
106
+  :code:`DNS` ``address``
107
+        Set primary domain name server IPv4 or IPv6 address.
108
+        Repeat this option to set secondary DNS server addresses.
109
+
110
+        Note: DNS IPv6 servers are currently set using netsh (the existing
111
+        DHCP code can only do IPv4 DHCP, and that protocol only permits
112
+        IPv4 addresses anywhere). The option will be put into the
113
+        environment, so an ``--up`` script could act upon it if needed.
114
+
115
+  :code:`WINS` ``address``
116
+        Set primary WINS server address (NetBIOS over TCP/IP Name Server).
117
+        Repeat this option to set secondary WINS server addresses.
118
+
119
+  :code:`NBDD` ``address``
120
+        Set primary NBDD server address (NetBIOS over TCP/IP Datagram
121
+        Distribution Server). Repeat this option to set secondary NBDD
122
+        server addresses.
123
+
124
+  :code:`NTP` ``address``
125
+        Set primary NTP server address (Network Time Protocol).
126
+        Repeat this option to set secondary NTP server addresses.
127
+
128
+  :code:`NBT` ``type``
129
+        Set NetBIOS over TCP/IP Node type. Possible options:
130
+
131
+        :code:`1`
132
+              b-node (broadcasts)
133
+
134
+        :code:`2`
135
+              p-node (point-to-point name queries to a WINS server)
136
+
137
+        :code:`4`
138
+              m-node (broadcast then query name server)
139
+
140
+        :code:`8`
141
+              h-node (query name server, then broadcast).
142
+
143
+  :code:`NBS` ``scope-id``
144
+        Set NetBIOS over TCP/IP Scope. A NetBIOS Scope ID provides an
145
+        extended naming service for the NetBIOS over TCP/IP (Known as NBT)
146
+        module. The primary purpose of a NetBIOS scope ID is to isolate
147
+        NetBIOS traffic on a single network to only those nodes with the
148
+        same NetBIOS scope ID. The NetBIOS scope ID is a character string
149
+        that is appended to the NetBIOS name. The NetBIOS scope ID on two
150
+        hosts must match, or the two hosts will not be able to communicate.
151
+        The NetBIOS Scope ID also allows computers to use the same computer
152
+        name, as they have different scope IDs. The Scope ID becomes a part
153
+        of the NetBIOS name, making the name unique. (This description of
154
+        NetBIOS scopes courtesy of NeonSurge@abyss.com)
155
+
156
+  :code:`DISABLE-NBT`
157
+        Disable Netbios-over-TCP/IP.
158
+
159
+--ifconfig args
160
+  Set TUN/TAP adapter parameters. It requires the *IP address* of the local
161
+  VPN endpoint. For TUN devices in point-to-point mode, the next argument
162
+  must be the VPN IP address of the remote VPN endpoint. For TAP devices,
163
+  or TUN devices used with ``--topology subnet``, the second argument
164
+  is the subnet mask of the virtual network segment which is being created
165
+  or connected to.
166
+
167
+  For TUN devices, which facilitate virtual point-to-point IP connections
168
+  (when used in ``--topology net30`` or ``p2p`` mode), the proper usage of
169
+  ``--ifconfig`` is to use two private IP addresses which are not a member
170
+  of any existing subnet which is in use. The IP addresses may be
171
+  consecutive and should have their order reversed on the remote peer.
172
+  After the VPN is established, by pinging ``rn``, you will be pinging
173
+  across the VPN.
174
+
175
+  For TAP devices, which provide the ability to create virtual ethernet
176
+  segments, or TUN devices in ``--topology subnet`` mode (which create
177
+  virtual "multipoint networks"), ``--ifconfig`` is used to set an IP
178
+  address and subnet mask just as a physical ethernet adapter would be
179
+  similarly configured. If you are attempting to connect to a remote
180
+  ethernet bridge, the IP address and subnet should be set to values which
181
+  would be valid on the the bridged ethernet segment (note also that DHCP
182
+  can be used for the same purpose).
183
+
184
+  This option, while primarily a proxy for the ``ifconfig``\(8) command,
185
+  is designed to simplify TUN/TAP tunnel configuration by providing a
186
+  standard interface to the different ifconfig implementations on
187
+  different platforms.
188
+
189
+  ``--ifconfig`` parameters which are IP addresses can also be specified
190
+  as a DNS or /etc/hosts file resolvable name.
191
+
192
+  For TAP devices, ``--ifconfig`` should not be used if the TAP interface
193
+  will be getting an IP address lease from a DHCP server.
194
+
195
+  Examples:
196
+  ::
197
+
198
+     # tun device in net30/p2p mode
199
+     ifconfig 10.8.0.2 10.8.0.1
200
+
201
+     # tun/tap device in subnet mode
202
+     ifconfig 10.8.0.2 255.255.255.0
203
+
204
+--ifconfig-ipv6 args
205
+  Configure an IPv6 address on the *tun* device.
206
+
207
+  Valid syntax:
208
+  ::
209
+
210
+     ifconfig-ipv6 ipv6addr/bits [ipv6remote]
211
+
212
+  The ``ipv6addr/bits`` argument is the IPv6 address to use. The
213
+  second parameter is used as route target for ``--route-ipv6`` if no
214
+  gateway is specified.
215
+
216
+  The ``--topology`` option has no influence with ``--ifconfig-ipv6``
217
+
218
+--ifconfig-noexec
219
+  Don't actually execute ifconfig/netsh commands, instead pass
220
+  ``--ifconfig`` parameters to scripts using environmental variables.
221
+
222
+--ifconfig-nowarn
223
+  Don't output an options consistency check warning if the ``--ifconfig``
224
+  option on this side of the connection doesn't match the remote side.
225
+  This is useful when you want to retain the overall benefits of the
226
+  options consistency check (also see ``--disable-occ`` option) while only
227
+  disabling the ifconfig component of the check.
228
+
229
+  For example, if you have a configuration where the local host uses
230
+  ``--ifconfig`` but the remote host does not, use ``--ifconfig-nowarn``
231
+  on the local host.
232
+
233
+  This option will also silence warnings about potential address conflicts
234
+  which occasionally annoy more experienced users by triggering "false
235
+  positive" warnings.
236
+
237
+--lladdr address
238
+  Specify the link layer address, more commonly known as the MAC address.
239
+  Only applied to TAP devices.
240
+
241
+--persist-tun
242
+  Don't close and reopen TUN/TAP device or run up/down scripts across
243
+  :code:`SIGUSR1` or ``--ping-restart`` restarts.
244
+
245
+  :code:`SIGUSR1` is a restart signal similar to :code:`SIGHUP`, but which
246
+  offers finer-grained control over reset options.
247
+
248
+--redirect-gateway flags
249
+  Automatically execute routing commands to cause all outgoing IP traffic
250
+  to be redirected over the VPN. This is a client-side option.
251
+
252
+  This option performs three steps:
253
+
254
+  (1)  Create a static route for the ``--remote`` address which
255
+       forwards to the pre-existing default gateway. This is done so that
256
+       ``(3)`` will not create a routing loop.
257
+
258
+  (2)  Delete the default gateway route.
259
+
260
+  (3)  Set the new default gateway to be the VPN endpoint address
261
+       (derived either from ``--route-gateway`` or the second parameter to
262
+       ``--ifconfig`` when ``--dev tun`` is specified).
263
+
264
+  When the tunnel is torn down, all of the above steps are reversed so
265
+  that the original default route is restored.
266
+
267
+  Option flags:
268
+
269
+  :code:`local`
270
+      Add the :code:`local` flag if both OpenVPN peers are directly
271
+      connected via a common subnet, such as with wireless. The
272
+      :code:`local` flag will cause step ``(1)`` above to be omitted.
273
+
274
+  :code:`autolocal`
275
+      Try to automatically determine whether to enable :code:`local`
276
+      flag above.
277
+
278
+  :code:`def1`
279
+      Use this flag to override the default gateway by using
280
+      :code:`0.0.0.0/1` and :code:`128.0.0.0/1` rather than
281
+      :code:`0.0.0.0/0`. This has the benefit of overriding but not
282
+      wiping out the original default gateway.
283
+
284
+  :code:`bypass-dhcp`
285
+      Add a direct route to the DHCP server (if it is non-local) which
286
+      bypasses the tunnel (Available on Windows clients, may not be
287
+      available on non-Windows clients).
288
+
289
+  :code:`bypass-dns`
290
+      Add a direct route to the DNS server(s) (if they are non-local)
291
+      which bypasses the tunnel (Available on Windows clients, may
292
+      not be available on non-Windows clients).
293
+
294
+  :code:`block-local`
295
+      Block access to local LAN when the tunnel is active, except for
296
+      the LAN gateway itself. This is accomplished by routing the local
297
+      LAN (except for the LAN gateway address) into the tunnel.
298
+
299
+  :code:`ipv6`
300
+      Redirect IPv6 routing into the tunnel. This works similar to
301
+      the :code:`def1` flag, that is, more specific IPv6 routes are added
302
+      (:code:`2000::/4`, :code:`3000::/4`), covering the whole IPv6
303
+      unicast space.
304
+
305
+  :code:`!ipv4`
306
+      Do not redirect IPv4 traffic - typically used in the flag pair
307
+      :code:`ipv6 !ipv4` to redirect IPv6-only.
308
+
309
+--redirect-private flags
310
+  Like ``--redirect-gateway``, but omit actually changing the default gateway.
311
+  Useful when pushing private subnets.
312
+
313
+--route args
314
+  Add route to routing table after connection is established. Multiple
315
+  routes can be specified. Routes will be automatically torn down in
316
+  reverse order prior to TUN/TAP device close.
317
+
318
+  Valid syntaxes:
319
+  ::
320
+
321
+      route network/IP
322
+      route network/IP netmask
323
+      route network/IP netmask gateway
324
+      route network/IP netmask gateway metric
325
+
326
+  This option is intended as a convenience proxy for the ``route``\(8)
327
+  shell command, while at the same time providing portable semantics
328
+  across OpenVPN's platform space.
329
+
330
+  ``netmask``
331
+        defaults to :code:`255.255.255.255` when not given
332
+
333
+  ``gateway``
334
+        default taken from ``--route-gateway`` or the second
335
+        parameter to ``--ifconfig`` when ``--dev tun`` is specified.
336
+
337
+  ``metric``
338
+        default taken from ``--route-metric`` if set, otherwise :code:`0`.
339
+
340
+  The default can be specified by leaving an option blank or setting it to
341
+  :code:`default`.
342
+
343
+  The ``network`` and ``gateway`` parameters can also be specified as a
344
+  DNS or :code:`/etc/hosts` file resolvable name, or as one of three special
345
+  keywords:
346
+
347
+  :code:`vpn_gateway`
348
+      The remote VPN endpoint address (derived either from
349
+      ``--route-gateway`` or the second parameter to ``--ifconfig``
350
+      when ``--dev tun`` is specified).
351
+
352
+  :code:`net_gateway`
353
+      The pre-existing IP default gateway, read from the
354
+      routing table (not supported on all OSes).
355
+
356
+  :code:`remote_host`
357
+      The ``--remote`` address if OpenVPN is being run in
358
+      client mode, and is undefined in server mode.
359
+
360
+--route-delay args
361
+  Valid syntaxes:
362
+  ::
363
+
364
+       route-delay
365
+       route-delay n
366
+       route-delay n m
367
+
368
+  Delay ``n`` seconds (default :code:`0`) after connection establishment,
369
+  before adding routes. If ``n`` is :code:`0`, routes will be added
370
+  immediately upon connection establishment. If ``--route-delay`` is
371
+  omitted, routes will be added immediately after TUN/TAP device open and
372
+  ``--up`` script execution, before any ``--user`` or ``--group`` privilege
373
+  downgrade (or ``--chroot`` execution.)
374
+
375
+  This option is designed to be useful in scenarios where DHCP is used to
376
+  set tap adapter addresses. The delay will give the DHCP handshake time
377
+  to complete before routes are added.
378
+
379
+  On Windows, ``--route-delay`` tries to be more intelligent by waiting
380
+  ``w`` seconds (default :code:`30` by default) for the TAP-Win32 adapter
381
+  to come up before adding routes.
382
+
383
+--route-ipv6 args
384
+  Setup IPv6 routing in the system to send the specified IPv6 network into
385
+  OpenVPN's *tun*.
386
+
387
+  Valid syntax:
388
+  ::
389
+
390
+     route-ipv6 ipv6addr/bits [gateway] [metric]
391
+
392
+  The gateway parameter is only used for IPv6 routes across *tap* devices,
393
+  and if missing, the ``ipv6remote`` field from ``--ifconfig-ipv6`` or
394
+  ``--route-ipv6-gateway`` is used.
395
+
396
+--route-gateway arg
397
+  Specify a default *gateway* for use with ``--route``.
398
+
399
+  If :code:`dhcp` is specified as the parameter, the gateway address will
400
+  be extracted from a DHCP negotiation with the OpenVPN server-side LAN.
401
+
402
+  Valid syntaxes:
403
+  ::
404
+
405
+      route-gateway gateway
406
+      route-gateway dhcp
407
+
408
+--route-ipv6-gateway gw
409
+  Specify a default gateway ``gw`` for use with ``--route-ipv6``.
410
+
411
+--route-metric m
412
+  Specify a default metric ``m`` for use with ``--route``.
413
+
414
+--route-noexec
415
+  Don't add or remove routes automatically. Instead pass routes to
416
+  ``--route-up`` script using environmental variables.
417
+
418
+--route-nopull
419
+  When used with ``--client`` or ``--pull``, accept options pushed by
420
+  server EXCEPT for routes, block-outside-dns and dhcp options like DNS
421
+  servers.
422
+
423
+  When used on the client, this option effectively bars the server from
424
+  adding routes to the client's routing table, however note that this
425
+  option still allows the server to set the TCP/IP properties of the
426
+  client's TUN/TAP interface.
427
+
428
+--topology mode
429
+  Configure virtual addressing topology when running in ``--dev tun``
430
+  mode. This directive has no meaning in ``--dev tap`` mode, which always
431
+  uses a :code:`subnet` topology.
432
+
433
+  If you set this directive on the server, the ``--server`` and
434
+  ``--server-bridge`` directives will automatically push your chosen
435
+  topology setting to clients as well. This directive can also be manually
436
+  pushed to clients. Like the ``--dev`` directive, this directive must
437
+  always be compatible between client and server.
438
+
439
+  ``mode`` can be one of:
440
+
441
+  :code:`net30`
442
+    Use a point-to-point topology, by allocating one /30 subnet
443
+    per client. This is designed to allow point-to-point semantics when some
444
+    or all of the connecting clients might be Windows systems. This is the
445
+    default on OpenVPN 2.0.
446
+
447
+  :code:`p2p`
448
+    Use a point-to-point topology where the remote endpoint of
449
+    the client's tun interface always points to the local endpoint of the
450
+    server's tun interface. This mode allocates a single IP address per
451
+    connecting client. Only use when none of the connecting clients are
452
+    Windows systems.
453
+
454
+  :code:`subnet`
455
+    Use a subnet rather than a point-to-point topology by
456
+    configuring the tun interface with a local IP address and subnet mask,
457
+    similar to the topology used in ``--dev tap`` and ethernet bridging
458
+    mode. This mode allocates a single IP address per connecting client and
459
+    works on Windows as well. Only available when server and clients are
460
+    OpenVPN 2.1 or higher, or OpenVPN 2.0.x which has been manually patched
461
+    with the ``--topology`` directive code. When used on Windows, requires
462
+    version 8.2 or higher of the TAP-Win32 driver. When used on \*nix,
463
+    requires that the tun driver supports an ``ifconfig``\(8) command which
464
+    sets a subnet instead of a remote endpoint IP address.
465
+
466
+  *Note:* Using ``--topology subnet`` changes the interpretation of the
467
+  arguments of ``--ifconfig`` to mean "address netmask", no longer "local
468
+  remote".
469
+
470
+--tun-mtu n
471
+  Take the TUN device MTU to be **n** and derive the link MTU from it
472
+  (default :code:`1500`). In most cases, you will probably want to leave
473
+  this parameter set to its default value.
474
+
475
+  The MTU (Maximum Transmission Units) is the maximum datagram size in
476
+  bytes that can be sent unfragmented over a particular network path.
477
+  OpenVPN requires that packets on the control and data channels be sent
478
+  unfragmented.
479
+
480
+  MTU problems often manifest themselves as connections which hang during
481
+  periods of active usage.
482
+
483
+  It's best to use the ``--fragment`` and/or ``--mssfix`` options to deal
484
+  with MTU sizing issues.
485
+
486
+--tun-mtu-extra n
487
+  Assume that the TUN/TAP device might return as many as ``n`` bytes more
488
+  than the ``--tun-mtu`` size on read. This parameter defaults to 0, which
489
+  is sufficient for most TUN devices. TAP devices may introduce additional
490
+  overhead in excess of the MTU size, and a setting of 32 is the default
491
+  when TAP devices are used. This parameter only controls internal OpenVPN
492
+  buffer sizing, so there is no transmission overhead associated with
493
+  using a larger value.
494
+
495
+
496
+TUN/TAP standalone operations
497
+-----------------------------
498
+These two standalone operations will require ``--dev`` and optionally
499
+``--user`` and/or ``--group``.
500
+
501
+--mktun
502
+  (Standalone) Create a persistent tunnel on platforms which support them
503
+  such as Linux. Normally TUN/TAP tunnels exist only for the period of
504
+  time that an application has them open. This option takes advantage of
505
+  the TUN/TAP driver's ability to build persistent tunnels that live
506
+  through multiple instantiations of OpenVPN and die only when they are
507
+  deleted or the machine is rebooted.
508
+
509
+  One of the advantages of persistent tunnels is that they eliminate the
510
+  need for separate ``--up`` and ``--down`` scripts to run the appropriate
511
+  ``ifconfig``\(8) and ``route``\(8) commands. These commands can be
512
+  placed in the the same shell script which starts or terminates an
513
+  OpenVPN session.
514
+
515
+  Another advantage is that open connections through the TUN/TAP-based
516
+  tunnel will not be reset if the OpenVPN peer restarts. This can be
517
+  useful to provide uninterrupted connectivity through the tunnel in the
518
+  event of a DHCP reset of the peer's public IP address (see the
519
+  ``--ipchange`` option above).
520
+
521
+  One disadvantage of persistent tunnels is that it is harder to
522
+  automatically configure their MTU value (see ``--link-mtu`` and
523
+  ``--tun-mtu`` above).
524
+
525
+  On some platforms such as Windows, TAP-Win32 tunnels are persistent by
526
+  default.
527
+
528
+--rmtun
529
+  (Standalone) Remove a persistent tunnel.
0 530
new file mode 100644
... ...
@@ -0,0 +1,244 @@
0
+Windows-Specific Options
1
+-------------------------
2
+
3
+--allow-nonadmin TAP-adapter
4
+  (Standalone) Set ``TAP-adapter`` to allow access from non-administrative
5
+  accounts. If ``TAP-adapter`` is omitted, all TAP adapters on the system
6
+  will be configured to allow non-admin access. The non-admin access
7
+  setting will only persist for the length of time that the TAP-Win32
8
+  device object and driver remain loaded, and will need to be re-enabled
9
+  after a reboot, or if the driver is unloaded and reloaded. This
10
+  directive can only be used by an administrator.
11
+
12
+--block-outside-dns
13
+  Block DNS servers on other network adapters to prevent DNS leaks. This
14
+  option prevents any application from accessing TCP or UDP port 53 except
15
+  one inside the tunnel. It uses Windows Filtering Platform (WFP) and
16
+  works on Windows Vista or later.
17
+
18
+  This option is considered unknown on non-Windows platforms and
19
+  unsupported on Windows XP, resulting in fatal error. You may want to use
20
+  ``--setenv opt`` or ``--ignore-unknown-option`` (not suitable for
21
+  Windows XP) to ignore said error. Note that pushing unknown options from
22
+  server does not trigger fatal errors.
23
+
24
+--cryptoapicert select-string
25
+  *(Windows/OpenSSL Only)* Load the certificate and private key from the
26
+  Windows Certificate System Store.
27
+
28
+  Use this option instead of ``--cert`` and ``--key``.
29
+
30
+  This makes it possible to use any smart card, supported by Windows, but
31
+  also any kind of certificate, residing in the Cert Store, where you have
32
+  access to the private key. This option has been tested with a couple of
33
+  different smart cards (GemSAFE, Cryptoflex, and Swedish Post Office eID)
34
+  on the client side, and also an imported PKCS12 software certificate on
35
+  the server side.
36
+
37
+  To select a certificate, based on a substring search in the
38
+  certificate's subject:
39
+  ::
40
+
41
+     cryptoapicert "SUBJ:Peter Runestig"
42
+
43
+  To select a certificate, based on certificate's thumbprint:
44
+  ::
45
+
46
+     cryptoapicert "THUMB:f6 49 24 41 01 b4 ..."
47
+
48
+  The thumbprint hex string can easily be copy-and-pasted from the Windows
49
+  Certificate Store GUI.
50
+
51
+--dhcp-release
52
+  Ask Windows to release the TAP adapter lease on shutdown. This option
53
+  has no effect now, as it is enabled by default starting with
54
+  OpenVPN 2.4.1.
55
+
56
+--dhcp-renew
57
+  Ask Windows to renew the TAP adapter lease on startup. This option is
58
+  normally unnecessary, as Windows automatically triggers a DHCP
59
+  renegotiation on the TAP adapter when it comes up, however if you set
60
+  the TAP-Win32 adapter Media Status property to "Always Connected", you
61
+  may need this flag.
62
+
63
+--ip-win32 method
64
+  When using ``--ifconfig`` on Windows, set the TAP-Win32 adapter IP
65
+  address and netmask using ``method``. Don't use this option unless you
66
+  are also using ``--ifconfig``.
67
+
68
+  :code:`manual`
69
+        Don't set the IP address or netmask automatically. Instead
70
+        output a message to the console telling the user to configure the
71
+        adapter manually and indicating the IP/netmask which OpenVPN
72
+        expects the adapter to be set to.
73
+
74
+  :code:`dynamic [offset] [lease-time]`
75
+        Automatically set the IP address and netmask by replying to DHCP
76
+        query messages generated by the kernel.  This mode is probably the
77
+        "cleanest" solution for setting the TCP/IP properties since it
78
+        uses the well-known DHCP protocol. There are, however, two
79
+        prerequisites for using this mode:
80
+
81
+        (1)  The TCP/IP properties for the TAP-Win32 adapter must be set
82
+             to "Obtain an IP address automatically", and
83
+
84
+        (2) OpenVPN needs to claim an IP address in the subnet for use
85
+            as the virtual DHCP server address.
86
+
87
+        By default in ``--dev tap`` mode, OpenVPN will take the normally
88
+        unused first address in the subnet. For example, if your subnet is
89
+        :code:`192.168.4.0 netmask 255.255.255.0`, then OpenVPN will take
90
+        the IP address :code:`192.168.4.0` to use as the virtual DHCP
91
+        server address.  In ``--dev tun`` mode, OpenVPN will cause the DHCP
92
+        server to masquerade as if it were coming from the remote endpoint.
93
+
94
+        The optional offset parameter is an integer which is > :code:`-256`
95
+        and < :code:`256` and which defaults to -1. If offset is positive,
96
+        the DHCP server will masquerade as the IP address at network
97
+        address + offset. If offset is negative, the DHCP server will
98
+        masquerade as the IP address at broadcast address + offset.
99
+
100
+        The Windows :code:`ipconfig /all` command can be used to show what
101
+        Windows thinks the DHCP server address is. OpenVPN will "claim"
102
+        this address, so make sure to use a free address. Having said that,
103
+        different OpenVPN instantiations, including different ends of
104
+        the same connection, can share the same virtual DHCP server
105
+        address.
106
+
107
+        The ``lease-time`` parameter controls the lease time of the DHCP
108
+        assignment given to the TAP-Win32 adapter, and is denoted in
109
+        seconds. Normally a very long lease time is preferred because it
110
+        prevents routes involving the TAP-Win32 adapter from being lost
111
+        when the system goes to sleep. The default lease time is one year.
112
+
113
+  :code:`netsh`
114
+        Automatically set the IP address and netmask using the Windows
115
+        command-line "netsh" command. This method appears to work correctly
116
+        on Windows XP but not Windows 2000.
117
+
118
+  :code:`ipapi`
119
+        Automatically set the IP address and netmask using the Windows IP
120
+        Helper API. This approach does not have ideal semantics, though
121
+        testing has indicated that it works okay in practice. If you use
122
+        this option, it is best to leave the TCP/IP properties for the
123
+        TAP-Win32 adapter in their default state, i.e. "Obtain an IP
124
+        address automatically."
125
+
126
+  :code:`adaptive` (Default)
127
+        Try :code:`dynamic` method initially and fail over to :code:`netsh`
128
+        if the DHCP negotiation with the TAP-Win32 adapter does not succeed
129
+        in 20 seconds. Such failures have been known to occur when certain
130
+        third-party firewall packages installed on the client machine block
131
+        the DHCP negotiation used by the TAP-Win32 adapter. Note that if
132
+        the :code:`netsh` failover occurs, the TAP-Win32 adapter TCP/IP
133
+        properties will be reset from DHCP to static, and this will cause
134
+        future OpenVPN startups using the :code:`adaptive` mode to use
135
+        :code:`netsh` immediately, rather than trying :code:`dynamic` first.
136
+
137
+        To "unstick" the :code:`adaptive` mode from using :code:`netsh`,
138
+        run OpenVPN at least once using the :code:`dynamic` mode to restore
139
+        the TAP-Win32 adapter TCP/IP properties to a DHCP configuration.
140
+
141
+--pause-exit
142
+  Put up a "press any key to continue" message on the console prior to
143
+  OpenVPN program exit. This option is automatically used by the Windows
144
+  explorer when OpenVPN is run on a configuration file using the
145
+  right-click explorer menu.
146
+
147
+--register-dns
148
+  Run :code:`ipconfig /flushdns` and :code:`ipconfig /registerdns` on
149
+  connection initiation. This is known to kick Windows into recognizing
150
+  pushed DNS servers.
151
+
152
+--route-method m
153
+  Which method ``m`` to use for adding routes on Windows?
154
+
155
+  :code:`adaptive` (default)
156
+        Try IP helper API first. If that fails, fall back to the route.exe
157
+        shell command.
158
+
159
+  :code:`ipapi`
160
+        Use IP helper API.
161
+
162
+  :code:`exe`
163
+        Call the route.exe shell command.
164
+
165
+--service args
166
+  Should be used when OpenVPN is being automatically executed by another
167
+  program in such a context that no interaction with the user via display
168
+  or keyboard is possible.
169
+
170
+  Valid syntax:
171
+  ::
172
+
173
+     service exit-event [0|1]
174
+
175
+  In general, end-users should never need to explicitly use this option,
176
+  as it is automatically added by the OpenVPN service wrapper when a given
177
+  OpenVPN configuration is being run as a service.
178
+
179
+  ``exit-event`` is the name of a Windows global event object, and OpenVPN
180
+  will continuously monitor the state of this event object and exit when
181
+  it becomes signaled.
182
+
183
+  The second parameter indicates the initial state of ``exit-event`` and
184
+  normally defaults to 0.
185
+
186
+  Multiple OpenVPN processes can be simultaneously executed with the same
187
+  ``exit-event`` parameter. In any case, the controlling process can
188
+  signal ``exit-event``, causing all such OpenVPN processes to exit.
189
+
190
+  When executing an OpenVPN process using the ``--service`` directive,
191
+  OpenVPN will probably not have a console window to output status/error
192
+  messages, therefore it is useful to use ``--log`` or ``--log-append`` to
193
+  write these messages to a file.
194
+
195
+--show-adapters
196
+  (Standalone) Show available TAP-Win32 adapters which can be selected
197
+  using the ``--dev-node`` option. On non-Windows systems, the
198
+  ``ifconfig``\(8) command provides similar functionality.
199
+
200
+--show-net
201
+  (Standalone) Show OpenVPN's view of the system routing table and network
202
+  adapter list.
203
+
204
+--show-net-up
205
+  Output OpenVPN's view of the system routing table and network adapter
206
+  list to the syslog or log file after the TUN/TAP adapter has been
207
+  brought up and any routes have been added.
208
+
209
+--show-valid-subnets
210
+  (Standalone) Show valid subnets for ``--dev tun`` emulation. Since the
211
+  TAP-Win32 driver exports an ethernet interface to Windows, and since TUN
212
+  devices are point-to-point in nature, it is necessary for the TAP-Win32
213
+  driver to impose certain constraints on TUN endpoint address selection.
214
+
215
+  Namely, the point-to-point endpoints used in TUN device emulation must
216
+  be the middle two addresses of a /30 subnet (netmask 255.255.255.252).
217
+
218
+--tap-sleep n
219
+  Cause OpenVPN to sleep for ``n`` seconds immediately after the TAP-Win32
220
+  adapter state is set to "connected".
221
+
222
+  This option is intended to be used to troubleshoot problems with the
223
+  ``--ifconfig`` and ``--ip-win32`` options, and is used to give the
224
+  TAP-Win32 adapter time to come up before Windows IP Helper API
225
+  operations are applied to it.
226
+
227
+--win-sys path
228
+  Set the Windows system directory pathname to use when looking for system
229
+  executables such as ``route.exe`` and ``netsh.exe``. By default, if this
230
+  directive is not specified, OpenVPN will use the SystemRoot environment
231
+  variable.
232
+
233
+  This option has changed behaviour since OpenVPN 2.3. Earlier you had to
234
+  define ``--win-sys env`` to use the SystemRoot environment variable,
235
+  otherwise it defaulted to :code:`C:\\WINDOWS`. It is not needed to use
236
+  the ``env`` keyword any more, and it will just be ignored. A warning is
237
+  logged when this is found in the configuration file.
238
+
239
+--windows-driver drv
240
+  Specifies which tun driver to use. Values are :code:`tap-windows6`
241
+  (default) and :code:`wintun`.  This is a Windows-only option.
242
+  :code:`wintun`" requires ``--dev tun`` and the OpenVPN process to run
243
+  elevated, or be invoked using the Interactive Service.
0 244
deleted file mode 100644
... ...
@@ -1,7659 +0,0 @@
1
-.\"  OpenVPN -- An application to securely tunnel IP networks
2
-.\"             over a single TCP/UDP port, with support for SSL/TLS-based
3
-.\"             session authentication and key exchange,
4
-.\"             packet encryption, packet authentication, and
5
-.\"             packet compression.
6
-.\"
7
-.\"  Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
8
-.\"
9
-.\"  This program is free software; you can redistribute it and/or modify
10
-.\"  it under the terms of the GNU General Public License version 2
11
-.\"  as published by the Free Software Foundation.
12
-.\"
13
-.\"  This program is distributed in the hope that it will be useful,
14
-.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
-.\"  GNU General Public License for more details.
17
-.\"
18
-.\"  You should have received a copy of the GNU General Public License along
19
-.\"  with this program; if not, write to the Free Software Foundation, Inc.,
20
-.\"  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
-.\"
22
-.\" Manual page for openvpn
23
-.\"
24
-.\" SH section heading
25
-.\" SS subsection heading
26
-.\" LP paragraph
27
-.\" IP indented paragraph
28
-.\" TP hanging label
29
-.\"
30
-.\" .nf -- no formatting
31
-.\" .fi -- resume formatting
32
-.\" .ft 3 -- boldface
33
-.\" .ft -- normal face
34
-.\" .in +|-{n} -- indent
35
-.\"
36
-.\" Support macros - this is not present on all platforms
37
-.\" Continuation line for .TP header.
38
-.de TQ
39
-.  br
40
-.  ns
41
-.  TP \\$1\" no doublequotes around argument!
42
-..
43
-.\" End of TQ macro
44
-.TH openvpn 8 "28 February 2018"
45
-.\"*********************************************************
46
-.SH NAME
47
-openvpn \- secure IP tunnel daemon.
48
-.\"*********************************************************
49
-.SH SYNOPSIS
50
-.ft 3
51
-openvpn [ options ... ]
52
-.ft
53
-.\"*********************************************************
54
-.SH INTRODUCTION
55
-.LP
56
-OpenVPN is an open source VPN daemon by James Yonan.
57
-Because OpenVPN tries to
58
-be a universal VPN tool offering a great deal of flexibility,
59
-there are a lot of options on this manual page.
60
-If you're new to OpenVPN, you might want to skip ahead to the
61
-examples section where you will see how to construct simple
62
-VPNs on the command line without even needing a configuration file.
63
-
64
-Also note that there's more documentation and examples on
65
-the OpenVPN web site:
66
-.I http://openvpn.net/
67
-
68
-And if you would like to see a shorter version of this manual,
69
-see the openvpn usage message which can be obtained by
70
-running
71
-.B openvpn
72
-without any parameters.
73
-.\"*********************************************************
74
-.SH DESCRIPTION
75
-.LP
76
-OpenVPN is a robust and highly flexible VPN daemon.
77
-OpenVPN supports SSL/TLS security, ethernet bridging,
78
-TCP or UDP tunnel transport through proxies or NAT,
79
-support for dynamic IP addresses and DHCP,
80
-scalability to hundreds or thousands of users,
81
-and portability to most major OS platforms.
82
-
83
-OpenVPN is tightly bound to the OpenSSL library, and derives much
84
-of its crypto capabilities from it.
85
-
86
-OpenVPN supports
87
-conventional encryption
88
-using a pre\-shared secret key
89
-.B (Static Key mode)
90
-or
91
-public key security
92
-.B (SSL/TLS mode)
93
-using client & server certificates.
94
-OpenVPN also
95
-supports non\-encrypted TCP/UDP tunnels.
96
-
97
-OpenVPN is designed to work with the
98
-.B TUN/TAP
99
-virtual networking interface that exists on most platforms.
100
-
101
-Overall, OpenVPN aims to offer many of the key features of IPSec but
102
-with a relatively lightweight footprint.
103
-.\"*********************************************************
104
-.SH OPTIONS
105
-OpenVPN allows any option to be placed either on the command line
106
-or in a configuration file.  Though all command line options are preceded
107
-by a double\-leading\-dash ("\-\-"), this prefix can be removed when
108
-an option is placed in a configuration file.
109
-.\"*********************************************************
110
-.TP
111
-.B \-\-help
112
-Show options.
113
-.\"*********************************************************
114
-.TP
115
-.B \-\-config file
116
-Load additional config options from
117
-.B file
118
-where each line corresponds to one command line option,
119
-but with the leading '\-\-' removed.
120
-
121
-If
122
-.B \-\-config file
123
-is the only option to the openvpn command,
124
-the
125
-.B \-\-config
126
-can be removed, and the command can be given as
127
-.B openvpn file
128
-
129
-Note that
130
-configuration files can be nested to a reasonable depth.
131
-
132
-Double quotation or single quotation characters ("", '')
133
-can be used to enclose single parameters containing whitespace,
134
-and "#" or ";" characters in the first column
135
-can be used to denote comments.
136
-
137
-Note that OpenVPN 2.0 and higher performs backslash\-based shell
138
-escaping for characters not in single quotations,
139
-so the following mappings should be observed:
140
-
141
-.nf
142
-.ft 3
143
-.in +4
144
-\\\\       Maps to a single backslash character (\\).
145
-\\"       Pass a literal doublequote character ("), don't
146
-         interpret it as enclosing a parameter.
147
-\\[SPACE] Pass a literal space or tab character, don't
148
-         interpret it as a parameter delimiter.
149
-.in -4
150
-.ft
151
-.fi
152
-
153
-For example on Windows, use double backslashes to
154
-represent pathnames:
155
-
156
-.nf
157
-.ft 3
158
-.in +4
159
-secret "c:\\\\OpenVPN\\\\secret.key"
160
-.in -4
161
-.ft
162
-.fi
163
-
164
-For examples of configuration files,
165
-see
166
-.I http://openvpn.net/examples.html
167
-
168
-Here is an example configuration file:
169
-
170
-.nf
171
-.ft 3
172
-.in +4
173
-#
174
-# Sample OpenVPN configuration file for
175
-# using a pre\-shared static key.
176
-#
177
-# '#' or ';' may be used to delimit comments.
178
-
179
-# Use a dynamic tun device.
180
-dev tun
181
-
182
-# Our remote peer
183
-remote mypeer.mydomain
184
-
185
-# 10.1.0.1 is our local VPN endpoint
186
-# 10.1.0.2 is our remote VPN endpoint
187
-ifconfig 10.1.0.1 10.1.0.2
188
-
189
-# Our pre\-shared static key
190
-secret static.key
191
-.in -4
192
-.ft
193
-.fi
194
-.\"*********************************************************
195
-.SS Tunnel Options:
196
-.TP
197
-.B \-\-mode m
198
-Set OpenVPN major mode.  By default, OpenVPN runs in
199
-point\-to\-point mode ("p2p").  OpenVPN 2.0 introduces
200
-a new mode ("server") which implements a multi\-client
201
-server capability.
202
-.\"*********************************************************
203
-.TP
204
-.B \-\-local host
205
-Local host name or IP address for bind.
206
-If specified, OpenVPN will bind to this address only.
207
-If unspecified, OpenVPN will bind to all interfaces.
208
-.\"*********************************************************
209
-.TP
210
-.B \-\-remote host [port] [proto]
211
-Remote host name or IP address.  On the client, multiple
212
-.B \-\-remote
213
-options may be specified for redundancy, each referring
214
-to a different OpenVPN server.  Specifying multiple
215
-.B \-\-remote
216
-options for this purpose is a special case of the more
217
-general connection\-profile feature.  See the
218
-.B <connection>
219
-documentation below.
220
-
221
-The OpenVPN client will try to connect to a server at
222
-.B host:port
223
-in the order specified by the list of
224
-.B \-\-remote
225
-options.
226
-
227
-.B proto
228
-indicates the protocol to use when connecting with the
229
-remote, and may be "tcp" or "udp".
230
-
231
-For forcing IPv4 or IPv6 connection suffix tcp or udp
232
-with 4/6 like udp4/udp6/tcp4/tcp6.
233
-
234
-The client will move on to the next host in the list,
235
-in the event of connection failure.
236
-Note that at any given time, the OpenVPN client
237
-will at most be connected to
238
-one server.
239
-
240
-Note that since UDP is connectionless, connection failure
241
-is defined by the
242
-.B \-\-ping
243
-and
244
-.B \-\-ping\-restart
245
-options.
246
-
247
-Note the following corner case:  If you use multiple
248
-.B \-\-remote
249
-options, AND you are dropping root privileges on
250
-the client with
251
-.B \-\-user
252
-and/or
253
-.B \-\-group,
254
-AND the client is running a non\-Windows OS, if the client needs
255
-to switch to a different server, and that server pushes
256
-back different TUN/TAP or route settings, the client may lack
257
-the necessary privileges to close and reopen the TUN/TAP interface.
258
-This could cause the client to exit with a fatal error.
259
-
260
-If
261
-.B \-\-remote
262
-is unspecified, OpenVPN will listen
263
-for packets from any IP address, but will not act on those packets unless
264
-they pass all authentication tests.  This requirement for authentication
265
-is binding on all potential peers, even those from known and supposedly
266
-trusted IP addresses (it is very easy to forge a source IP address on
267
-a UDP packet).
268
-
269
-When used in TCP mode, 
270
-.B \-\-remote
271
-will act as a filter, rejecting connections from any host which does
272
-not match
273
-.B host.
274
-
275
-If
276
-.B host
277
-is a DNS name which resolves to multiple IP addresses,
278
-OpenVPN will try them in the order that the system getaddrinfo()
279
-presents them, so priorization and DNS randomization is done
280
-by the system library.  Unless an IP version is forced by the
281
-protocol specification (4/6 suffix), OpenVPN will try both IPv4
282
-and IPv6 addresses, in the order getaddrinfo() returns them.
283
-.\"*********************************************************
284
-.TP
285
-.B \-\-remote\-random\-hostname
286
-Prepend a random string (6 bytes, 12 hex characters) to hostname to prevent
287
-DNS caching.  For example, "foo.bar.gov" would be modified to
288
-"<random\-chars>.foo.bar.gov".
289
-.\"*********************************************************
290
-.TP
291
-.B <connection>
292
-Define a client connection
293
-profile.  Client connection profiles are groups of OpenVPN options that
294
-describe how to connect to a given OpenVPN server.  Client connection
295
-profiles are specified within an OpenVPN configuration file, and
296
-each profile is bracketed by
297
-.B <connection>
298
-and
299
-.B </connection>.
300
-
301
-An OpenVPN client will try each connection profile sequentially
302
-until it achieves a successful connection.  
303
-
304
-.B \-\-remote\-random
305
-can be used to initially "scramble" the connection
306
-list.
307
-
308
-Here is an example of connection profile usage:
309
-
310
-.nf
311
-.ft 3
312
-.in +4
313
-client
314
-dev tun
315
-
316
-<connection>
317
-remote 198.19.34.56 1194 udp
318
-</connection>
319
-
320
-<connection>
321
-remote 198.19.34.56 443 tcp
322
-</connection>
323
-
324
-<connection>
325
-remote 198.19.34.56 443 tcp
326
-http\-proxy 192.168.0.8 8080
327
-</connection>
328
-
329
-<connection>
330
-remote 198.19.36.99 443 tcp
331
-http\-proxy 192.168.0.8 8080
332
-</connection>
333
-
334
-persist\-key
335
-persist\-tun
336
-pkcs12 client.p12
337
-remote\-cert\-tls server
338
-verb 3
339
-.in -4
340
-.ft
341
-.fi
342
-
343
-First we try to connect to a server at 198.19.34.56:1194 using UDP.
344
-If that fails, we then try to connect to 198.19.34.56:443 using TCP.
345
-If that also fails, then try connecting through an HTTP proxy at 
346
-192.168.0.8:8080 to 198.19.34.56:443 using TCP.  Finally, try to
347
-connect through the same proxy to a server at 198.19.36.99:443
348
-using TCP.
349
-
350
-The following OpenVPN options may be used inside of
351
-a
352
-.B <connection>
353
-block:
354
-
355
-.B bind,
356
-.B connect\-retry,
357
-.B connect\-retry\-max,
358
-.B connect\-timeout,
359
-.B explicit\-exit\-notify,
360
-.B float,
361
-.B fragment,
362
-.B http\-proxy,
363
-.B http\-proxy\-option,
364
-.B key\-direction,
365
-.B link\-mtu,
366
-.B local,
367
-.B lport,
368
-.B mssfix,
369
-.B mtu\-disc,
370
-.B nobind,
371
-.B port,
372
-.B proto,
373
-.B remote,
374
-.B rport,
375
-.B socks\-proxy,
376
-.B tls\-auth,
377
-.B tls\-crypt,
378
-.B tun\-mtu and
379
-.B tun\-mtu\-extra.
380
-
381
-A defaulting mechanism exists for specifying options to apply to
382
-all
383
-.B <connection>
384
-profiles.  If any of the above options (with the exception of
385
-.B remote
386
-) appear outside of a
387
-.B <connection>
388
-block, but in a configuration file which has one or more
389
-.B <connection>
390
-blocks, the option setting will be used as a default for
391
-.B <connection>
392
-blocks which follow it in the configuration file.
393
-
394
-For example, suppose the
395
-.B nobind
396
-option were placed in the sample configuration file above, near
397
-the top of the file, before the first
398
-.B <connection>
399
-block.  The effect would be as if
400
-.B nobind
401
-were declared in all
402
-.B <connection>
403
-blocks below it.
404
-.\"*********************************************************
405
-.TP
406
-.B \-\-proto\-force p
407
-When iterating through connection profiles,
408
-only consider profiles using protocol
409
-.B p
410
-('tcp'|'udp'). 
411
-.\"*********************************************************
412
-.TP
413
-.B \-\-remote\-random
414
-When multiple
415
-.B \-\-remote
416
-address/ports are specified, or if connection profiles are being
417
-used, initially randomize the order of the list
418
-as a kind of basic load\-balancing measure.
419
-.\"*********************************************************
420
-.TP
421
-.B \-\-proto p
422
-Use protocol
423
-.B p
424
-for communicating with remote host.
425
-.B p
426
-can be
427
-.B udp,
428
-.B tcp\-client,
429
-or
430
-.B tcp\-server.
431
-
432
-The default protocol is
433
-.B udp
434
-when
435
-.B \-\-proto
436
-is not specified.
437
-
438
-For UDP operation,
439
-.B \-\-proto udp
440
-should be specified on both peers.
441
-
442
-For TCP operation, one peer must use
443
-.B \-\-proto tcp\-server
444
-and the other must use
445
-.B \-\-proto tcp\-client.
446
-A peer started with
447
-.B tcp\-server
448
-will wait indefinitely for an incoming connection.  A peer
449
-started with
450
-.B tcp\-client
451
-will attempt to connect, and if that fails, will sleep for 5
452
-seconds (adjustable via the
453
-.B \-\-connect\-retry
454
-option) and try again infinite or up to N retries (adjustable via the
455
-.B \-\-connect\-retry\-max
456
-option).  Both TCP client and server will simulate
457
-a SIGUSR1 restart signal if either side resets the connection.
458
-
459
-OpenVPN is designed to operate optimally over UDP, but TCP capability is provided
460
-for situations where UDP cannot be used.
461
-In comparison with UDP, TCP will usually be
462
-somewhat less efficient and less robust when used over unreliable or congested
463
-networks.
464
-
465
-This article outlines some of problems with tunneling IP over TCP:
466
-
467
-.I http://sites.inka.de/sites/bigred/devel/tcp\-tcp.html
468
-
469
-There are certain cases, however, where using TCP may be advantageous from
470
-a security and robustness perspective, such as tunneling non\-IP or
471
-application\-level UDP protocols, or tunneling protocols which don't
472
-possess a built\-in reliability layer.
473
-.\"*********************************************************
474
-.TP
475
-.B \-\-connect\-retry n [max]
476
-Wait
477
-.B n
478
-seconds  between connection attempts (default=5). Repeated reconnection
479
-attempts are slowed down after 5 retries per remote by doubling the wait
480
-time after each unsuccessful attempt. The optional argument
481
-.B max
482
-specifies the maximum value of wait time in seconds at which it gets
483
-capped (default=300).
484
-.\"*********************************************************
485
-.TP
486
-.B \-\-connect\-retry\-max n
487
-.B n
488
-specifies the number of times each
489
-.B \-\-remote
490
-or
491
-.B <connection>
492
-entry is tried. Specifying
493
-.B n
494
-as one would try each entry exactly once. A successful connection
495
-resets the counter. (default=unlimited).
496
-.\"*********************************************************
497
-.TP
498
-.B \-\-show\-proxy\-settings
499
-Show sensed HTTP or SOCKS proxy settings. Currently, only Windows clients
500
-support this option.
501
-.\"*********************************************************
502
-.TP
503
-.B \-\-http\-proxy server port [authfile|'auto'|'auto\-nct'] [auth\-method]
504
-Connect to remote host through an HTTP proxy at address
505
-.B server
506
-and port
507
-.B port.
508
-If HTTP Proxy\-Authenticate is required,
509
-.B authfile
510
-is a file containing a username and password on 2 lines, or
511
-"stdin" to prompt from console. Its content can also be specified
512
-in the config file with the
513
-.B \-\-http\-proxy\-user\-pass
514
-option. (See section on inline files)
515
-
516
-.B auth\-method
517
-should be one of "none", "basic", or "ntlm".
518
-
519
-HTTP Digest authentication is supported as well, but only via
520
-the
521
-.B auto
522
-or
523
-.B auto\-nct
524
-flags (below).
525
-
526
-The
527
-.B auto
528
-flag causes OpenVPN to automatically determine the
529
-.B auth\-method
530
-and query stdin or the management interface for
531
-username/password credentials, if required.  This flag
532
-exists on OpenVPN 2.1 or higher.
533
-
534
-The
535
-.B auto\-nct
536
-flag (no clear\-text auth) instructs OpenVPN to automatically
537
-determine the authentication method, but to reject weak
538
-authentication protocols such as HTTP Basic Authentication.
539
-.\"*********************************************************
540
-.TP
541
-.B \-\-http\-proxy\-option type [parm]
542
-Set extended HTTP proxy options.
543
-Repeat to set multiple options.
544
-
545
-.B VERSION version \-\-
546
-Set HTTP version number to
547
-.B version
548
-(default=1.0).
549
-
550
-.B AGENT user\-agent \-\-
551
-Set HTTP "User\-Agent" string to
552
-.B user\-agent.
553
-
554
-.B CUSTOM\-HEADER name content \-\-
555
-Adds the custom Header with
556
-.B name
557
-as name and
558
-.B content
559
-as the content of the custom HTTP header.
560
-.\"*********************************************************
561
-.TP
562
-.B \-\-socks\-proxy server [port] [authfile]
563
-Connect to remote host through a Socks5 proxy at address
564
-.B server
565
-and port
566
-.B port
567
-(default=1080).
568
-.B authfile
569
-(optional) is a file containing a username and password on 2 lines, or
570
-"stdin" to prompt from console.
571
-.\"*********************************************************
572
-.TP
573
-.B \-\-resolv\-retry n
574
-If hostname resolve fails for
575
-.B \-\-remote,
576
-retry resolve for
577
-.B n
578
-seconds before failing.
579
-
580
-Set
581
-.B n
582
-to "infinite" to retry indefinitely.
583
-
584
-By default,
585
-.B \-\-resolv\-retry infinite
586
-is enabled.  You can disable by setting n=0.
587
-.\"*********************************************************
588
-.TP
589
-.B \-\-float
590
-Allow remote peer to change its IP address and/or port number, such as due to
591
-DHCP (this is the default if
592
-.B \-\-remote
593
-is not used).
594
-.B \-\-float
595
-when specified with
596
-.B \-\-remote
597
-allows an OpenVPN session to initially connect to a peer
598
-at a known address, however if packets arrive from a new
599
-address and pass all authentication tests, the new address
600
-will take control of the session.  This is useful when
601
-you are connecting to a peer which holds a dynamic address
602
-such as a dial\-in user or DHCP client.
603
-
604
-Essentially,
605
-.B \-\-float
606
-tells OpenVPN to accept authenticated packets
607
-from any address, not only the address which was specified in the
608
-.B \-\-remote
609
-option.
610
-.\"*********************************************************
611
-.TP
612
-.B \-\-ipchange cmd
613
-Run command
614
-.B cmd
615
-when our remote ip\-address is initially authenticated or
616
-changes.
617
-
618
-.B cmd
619
-consists of a path to script (or executable program), optionally
620
-followed by arguments. The path and arguments may be single\- or double\-quoted
621
-and/or escaped using a backslash, and should be separated by one or more spaces.
622
-
623
-When
624
-.B cmd
625
-is executed two arguments are appended after any arguments specified in
626
-.B cmd
627
-, as follows:
628
-
629
-.B cmd ip_address port_number
630
-
631
-Don't use
632
-.B \-\-ipchange
633
-in
634
-.B \-\-mode server
635
-mode.  Use a
636
-.B \-\-client\-connect
637
-script instead.
638
-
639
-See the "Environmental Variables" section below for
640
-additional parameters passed as environmental variables.
641
-
642
-If you are running in a dynamic IP address environment where
643
-the IP addresses of either peer could change without notice,
644
-you can use this script, for example, to edit the
645
-.I /etc/hosts
646
-file with the current address of the peer.  The script will
647
-be run every time the remote peer changes its IP address.
648
-
649
-Similarly if
650
-.I our
651
-IP address changes due to DHCP, we should configure
652
-our IP address change script (see man page for
653
-.BR dhcpcd (8)
654
-) to deliver a
655
-.B SIGHUP
656
-or
657
-.B SIGUSR1
658
-signal to OpenVPN.  OpenVPN will then
659
-reestablish a connection with its most recently authenticated
660
-peer on its new IP address.
661
-.\"*********************************************************
662
-.TP
663
-.B \-\-port port
664
-TCP/UDP port number or port name for both local and remote (sets both
665
-.B \-\-lport
666
-and
667
-.B \-\-rport
668
-options to given port).  The current
669
-default of 1194 represents the official IANA port number
670
-assignment for OpenVPN and has been used since version 2.0\-beta17.
671
-Previous versions used port 5000 as the default.
672
-.\"*********************************************************
673
-.TP
674
-.B \-\-lport port
675
-Set local TCP/UDP port number or name.  Cannot be used together with
676
-.B \-\-nobind
677
-option.
678
-.\"*********************************************************
679
-.TP
680
-.B \-\-rport port
681
-Set TCP/UDP port number or name used by the
682
-.B \-\-remote
683
-option. The port can also be set directly using the
684
-.B \-\-remote
685
-option.
686
-.\"*********************************************************
687
-.TP
688
-.B \-\-bind [ipv6only]
689
-Bind to local address and port. This is the default unless any of 
690
-.B \-\-proto tcp\-client
691
-,
692
-.B \-\-http\-proxy
693
-or
694
-.B \-\-socks\-proxy
695
-are used.
696
-
697
-If the
698
-.B ipv6only
699
-keyword is present OpenVPN will bind only to IPv6 (as opposed
700
-to IPv6 and IPv4) when a IPv6 socket is opened.
701
-
702
-.\"*********************************************************
703
-.TP
704
-.B \-\-nobind
705
-Do not bind to local address and port.  The IP stack will allocate
706
-a dynamic port for returning packets.  Since the value of the dynamic port
707
-could not be known in advance by a peer, this option is only suitable for
708
-peers which will be initiating connections by using the
709
-.B \-\-remote
710
-option.
711
-.\"*********************************************************
712
-.TP
713
-.B \-\-dev tunX | tapX | null
714
-TUN/TAP virtual network device (
715
-.B X
716
-can be omitted for a dynamic device.)
717
-
718
-See examples section below
719
-for an example on setting up a TUN device.
720
-
721
-You must use either tun devices on both ends of the connection
722
-or tap devices on both ends.  You cannot mix them, as they
723
-represent different underlying network layers.
724
-
725
-.B tun
726
-devices encapsulate IPv4 or IPv6 (OSI Layer 3) while
727
-.B tap
728
-devices encapsulate Ethernet 802.3 (OSI Layer 2).
729
-.\"*********************************************************
730
-.TP
731
-.B \-\-dev\-type device\-type
732
-Which device type are we using?
733
-.B device\-type
734
-should be
735
-.B tun
736
-(OSI Layer 3)
737
-or
738
-.B tap
739
-(OSI Layer 2).
740
-Use this option only if the TUN/TAP device used with
741
-.B \-\-dev
742
-does not begin with
743
-.B tun
744
-or
745
-.B tap.
746
-.\"*********************************************************
747
-.TP
748
-.B \-\-topology mode
749
-Configure virtual addressing topology when running in
750
-.B \-\-dev tun
751
-mode.  This directive has no meaning in
752
-.B \-\-dev tap
753
-mode, which always uses a
754
-.B subnet
755
-topology.
756
-
757
-If you set this directive on the server, the
758
-.B \-\-server
759
-and
760
-.B \-\-server\-bridge
761
-directives will automatically push your chosen topology setting to clients
762
-as well.  This directive can also be manually pushed to clients.  Like the
763
-.B \-\-dev
764
-directive, this directive must always be compatible between client and server.
765
-
766
-.B mode
767
-can be one of:
768
-
769
-.B net30 \-\-
770
-Use a point\-to\-point topology, by allocating one /30 subnet per client.
771
-This is designed to allow point\-to\-point semantics when some
772
-or all of the connecting clients might be Windows systems.  This is the
773
-default on OpenVPN 2.0.
774
-
775
-.B p2p \-\-
776
-Use a point\-to\-point topology where the remote endpoint of the client's
777
-tun interface always points to the local endpoint of the server's tun interface.
778
-This mode allocates a single IP address per connecting client.
779
-Only use
780
-when none of the connecting clients are Windows systems.  This mode
781
-is functionally equivalent to the
782
-.B \-\-ifconfig\-pool\-linear
783
-directive which is available in OpenVPN 2.0, is deprecated and will be
784
-removed in OpenVPN 2.5
785
-
786
-.B subnet \-\-
787
-Use a subnet rather than a point\-to\-point topology by
788
-configuring the tun interface with a local IP address and subnet mask,
789
-similar to the topology used in
790
-.B \-\-dev tap
791
-and ethernet bridging mode.
792
-This mode allocates a single IP address per connecting client and works on
793
-Windows as well.  Only available when server and clients are OpenVPN 2.1 or
794
-higher, or OpenVPN 2.0.x which has been manually patched with the
795
-.B \-\-topology
796
-directive code.  When used on Windows, requires version 8.2 or higher
797
-of the TAP\-Win32 driver.  When used on *nix, requires that the tun
798
-driver supports an
799
-.BR ifconfig (8)
800
-command which sets a subnet instead of a remote endpoint IP address.
801
-
802
-This option exists in OpenVPN 2.1 or higher.
803
-
804
-Note: Using
805
-.B \-\-topology subnet
806
-changes the interpretation of the arguments of
807
-.B \-\-ifconfig
808
-to mean "address netmask", no longer "local remote".
809
-.\"*********************************************************
810
-.TP
811
-.B \-\-dev\-node node
812
-Explicitly set the device node rather than using
813
-/dev/net/tun, /dev/tun, /dev/tap, etc.  If OpenVPN
814
-cannot figure out whether
815
-.B node
816
-is a TUN or TAP device based on the name, you should
817
-also specify
818
-.B \-\-dev\-type tun
819
-or
820
-.B \-\-dev\-type tap.
821
-
822
-Under Mac OS X this option can be used to specify the default tun
823
-implementation. Using
824
-.B \-\-dev\-node utun
825
-forces usage of the native Darwin tun kernel support. Use
826
-.B \-\-dev\-node utunN
827
-to select a specific utun instance. To force using the tun.kext (/dev/tunX) use
828
-.B \-\-dev\-node tun\fR.
829
-When not specifying a
830
-.B \-\-dev\-node
831
-option openvpn will first try to open utun, and fall back to tun.kext.
832
-
833
-On Windows systems, select the TAP\-Win32 adapter which
834
-is named
835
-.B node
836
-in the Network Connections Control Panel or the
837
-raw GUID of the adapter enclosed by braces.
838
-The
839
-.B \-\-show\-adapters
840
-option under Windows can also be used
841
-to enumerate all available TAP\-Win32
842
-adapters and will show both the network
843
-connections control panel name and the GUID for
844
-each TAP\-Win32 adapter.
845
-.TP
846
-.B \-\-lladdr address
847
-Specify the link layer address, more commonly known as the MAC address.
848
-Only applied to TAP devices.
849
-.\"*********************************************************
850
-.TP
851
-.B \-\-iproute cmd
852
-Set alternate command to execute instead of default iproute2 command.
853
-May be used in order to execute OpenVPN in unprivileged environment.
854
-.\"*********************************************************
855
-.TP
856
-.B \-\-ifconfig l rn
857
-Set TUN/TAP adapter parameters. 
858
-.B l
859
-is the IP address of the local VPN endpoint.
860
-For TUN devices in point\-to\-point mode,
861
-.B rn
862
-is the IP address of the remote VPN endpoint.
863
-For TAP devices, or TUN devices used with
864
-.B \-\-topology subnet,
865
-.B rn
866
-is the subnet mask of the virtual network segment
867
-which is being created or connected to.
868
-
869
-For TUN devices, which facilitate virtual
870
-point\-to\-point IP connections (when used in
871
-.B \-\-topology net30
872
-or
873
-.B p2p
874
-mode),
875
-the proper usage of
876
-.B \-\-ifconfig
877
-is to use two private IP addresses
878
-which are not a member of any
879
-existing subnet which is in use.
880
-The IP addresses may be consecutive
881
-and should have their order reversed
882
-on the remote peer.  After the VPN
883
-is established, by pinging
884
-.B rn,
885
-you will be pinging across the VPN.
886
-
887
-For TAP devices, which provide
888
-the ability to create virtual
889
-ethernet segments, or TUN devices in
890
-.B \-\-topology subnet
891
-mode (which create virtual "multipoint networks"),
892
-.B \-\-ifconfig
893
-is used to set an IP address and
894
-subnet mask just as a physical
895
-ethernet adapter would be
896
-similarly configured.  If you are
897
-attempting to connect to a remote
898
-ethernet bridge, the IP address
899
-and subnet should be set to values
900
-which would be valid on the
901
-the bridged ethernet segment (note
902
-also that DHCP can be used for the
903
-same purpose).
904
-
905
-This option, while primarily a proxy for the
906
-.BR ifconfig (8)
907
-command, is designed to simplify TUN/TAP
908
-tunnel configuration by providing a
909
-standard interface to the different
910
-ifconfig implementations on different
911
-platforms.
912
-
913
-.B \-\-ifconfig
914
-parameters which are IP addresses can
915
-also be specified as a DNS or /etc/hosts
916
-file resolvable name.
917
-
918
-For TAP devices,
919
-.B \-\-ifconfig
920
-should not be used if the TAP interface will be
921
-getting an IP address lease from a DHCP
922
-server.
923
-.\"*********************************************************
924
-.TP
925
-.B \-\-ifconfig\-noexec
926
-Don't actually execute ifconfig/netsh commands, instead
927
-pass
928
-.B \-\-ifconfig
929
-parameters to scripts using environmental variables.
930
-.\"*********************************************************
931
-.TP
932
-.B \-\-ifconfig\-nowarn
933
-Don't output an options consistency check warning
934
-if the
935
-.B \-\-ifconfig
936
-option on this side of the
937
-connection doesn't match the remote side.  This is useful
938
-when you want to retain the overall benefits of the
939
-options consistency check (also see
940
-.B \-\-disable\-occ
941
-option) while only disabling the ifconfig component of
942
-the check.
943
-
944
-For example,
945
-if you have a configuration where the local host uses
946
-.B \-\-ifconfig
947
-but the remote host does not, use
948
-.B \-\-ifconfig\-nowarn
949
-on the local host.
950
-
951
-This option will also silence warnings about potential
952
-address conflicts which occasionally annoy more experienced
953
-users by triggering "false positive" warnings.
954
-.\"*********************************************************
955
-.TP
956
-.B \-\-route network/IP [netmask] [gateway] [metric]
957
-Add route to routing table after connection is established.
958
-Multiple routes can be specified.  Routes will be
959
-automatically torn down in reverse order prior to
960
-TUN/TAP device close.
961
-
962
-This option is intended as
963
-a convenience proxy for the
964
-.BR route (8)
965
-shell command,
966
-while at the same time providing portable semantics
967
-across OpenVPN's platform space.
968
-
969
-.B netmask
970
-default \-\- 255.255.255.255
971
-
972
-.B gateway
973
-default \-\- taken from
974
-.B \-\-route\-gateway
975
-or the second parameter to
976
-.B \-\-ifconfig
977
-when
978
-.B \-\-dev tun
979
-is specified.
980
-
981
-.B metric
982
-default \-\- taken from
983
-.B \-\-route\-metric
984
-otherwise 0.
985
-
986
-The default can be specified by leaving an option blank or setting
987
-it to "default".
988
-
989
-The
990
-.B network
991
-and
992
-.B gateway
993
-parameters can
994
-also be specified as a DNS or /etc/hosts
995
-file resolvable name, or as one of three special keywords:
996
-
997
-.B vpn_gateway
998
-\-\- The remote VPN endpoint address
999
-(derived either from
1000
-.B \-\-route\-gateway
1001
-or the second parameter to
1002
-.B \-\-ifconfig
1003
-when
1004
-.B \-\-dev tun
1005
-is specified).
1006
-
1007
-.B net_gateway
1008
-\-\- The pre\-existing IP default gateway, read from the routing
1009
-table (not supported on all OSes).
1010
-
1011
-.B remote_host
1012
-\-\- The
1013
-.B \-\-remote
1014
-address if OpenVPN is being run in client mode, and is undefined in server mode.
1015
-.\"*********************************************************
1016
-.TP
1017
-.B \-\-route\-gateway gw|'dhcp'
1018
-Specify a default gateway
1019
-.B gw
1020
-for use with
1021
-.B \-\-route.
1022
-
1023
-If
1024
-.B dhcp
1025
-is specified as the parameter,
1026
-the gateway address will be extracted from a DHCP
1027
-negotiation with the OpenVPN server\-side LAN.
1028
-.\"*********************************************************
1029
-.TP
1030
-.B \-\-route\-metric m
1031
-Specify a default metric
1032
-.B m
1033
-for use with
1034
-.B \-\-route.
1035
-.\"*********************************************************
1036
-.TP
1037
-.B \-\-route\-delay [n] [w]
1038
-Delay
1039
-.B n
1040
-seconds (default=0) after connection
1041
-establishment, before adding routes. If
1042
-.B n
1043
-is 0, routes will be added immediately upon connection
1044
-establishment.  If
1045
-.B \-\-route\-delay
1046
-is omitted, routes will be added immediately after TUN/TAP device
1047
-open and
1048
-.B \-\-up
1049
-script execution, before any
1050
-.B \-\-user
1051
-or 
1052
-.B \-\-group
1053
-privilege downgrade (or
1054
-.B \-\-chroot
1055
-execution.)
1056
-
1057
-This option is designed to be useful in scenarios where DHCP is
1058
-used to set
1059
-tap adapter addresses.  The delay will give the DHCP handshake
1060
-time to complete before routes are added.
1061
-
1062
-On Windows,
1063
-.B \-\-route\-delay
1064
-tries to be more intelligent by waiting
1065
-.B w
1066
-seconds (w=30 by default)
1067
-for the TAP\-Win32 adapter to come up before adding routes.
1068
-.\"*********************************************************
1069
-.TP
1070
-.B \-\-route\-up cmd
1071
-Run command
1072
-.B cmd
1073
-after routes are added, subject to
1074
-.B \-\-route\-delay.
1075
-
1076
-.B cmd
1077
-consists of a path to script (or executable program), optionally
1078
-followed by arguments. The path and arguments may be single\- or double\-quoted
1079
-and/or escaped using a backslash, and should be separated by one or more spaces.
1080
-
1081
-See the "Environmental Variables" section below for
1082
-additional parameters passed as environmental variables.
1083
-.\"*********************************************************
1084
-.TP
1085
-.B \-\-route\-pre\-down cmd
1086
-Run command
1087
-.B cmd
1088
-before routes are removed upon disconnection.
1089
-
1090
-.B cmd
1091
-consists of a path to script (or executable program), optionally
1092
-followed by arguments. The path and arguments may be single\- or double\-quoted
1093
-and/or escaped using a backslash, and should be separated by one or more spaces.
1094
-
1095
-See the "Environmental Variables" section below for
1096
-additional parameters passed as environmental variables.
1097
-.\"*********************************************************
1098
-.TP
1099
-.B \-\-route\-noexec
1100
-Don't add or remove routes automatically.  Instead pass routes to
1101
-.B \-\-route\-up
1102
-script using environmental variables.
1103
-.\"*********************************************************
1104
-.TP
1105
-.B \-\-route\-nopull
1106
-When used with
1107
-.B \-\-client
1108
-or
1109
-.B \-\-pull,
1110
-accept options pushed by server EXCEPT for routes, block\-outside\-dns and dhcp
1111
-options like DNS servers.
1112
-
1113
-When used on the client, this option effectively bars the
1114
-server from adding routes to the client's routing table,
1115
-however note that this option still allows the server
1116
-to set the TCP/IP properties of the client's TUN/TAP interface.
1117
-.\"*********************************************************
1118
-.TP
1119
-.B \-\-allow\-pull\-fqdn
1120
-Allow client to pull DNS names from server (rather than being limited
1121
-to IP address) for
1122
-.B \-\-ifconfig,
1123
-.B \-\-route,
1124
-and
1125
-.B \-\-route\-gateway.
1126
-.\"*********************************************************
1127
-.TP
1128
-.B \-\-client\-nat snat|dnat network netmask alias
1129
-This pushable client option sets up a stateless one\-to\-one NAT
1130
-rule on packet addresses (not ports), and is useful in cases
1131
-where routes or ifconfig settings pushed to the client would
1132
-create an IP numbering conflict.
1133
-
1134
-.B network/netmask
1135
-(for example 192.168.0.0/255.255.0.0)
1136
-defines the local view of a resource from the client perspective, while
1137
-.B alias/netmask
1138
-(for example 10.64.0.0/255.255.0.0)
1139
-defines the remote view from the server perspective.
1140
-
1141
-Use
1142
-.B snat
1143
-(source NAT) for resources owned by the client and
1144
-.B dnat
1145
-(destination NAT) for remote resources.
1146
-
1147
-Set
1148
-.B \-\-verb 6
1149
-for debugging info showing the transformation of src/dest
1150
-addresses in packets.
1151
-.\"*********************************************************
1152
-.TP
1153
-.B \-\-redirect\-gateway flags...
1154
-Automatically execute routing commands to cause all outgoing IP traffic
1155
-to be redirected over the VPN.  This is a client\-side option.
1156
-
1157
-This option performs three steps:
1158
-
1159
-.B (1)
1160
-Create a static route for the
1161
-.B \-\-remote
1162
-address which forwards to the pre\-existing default gateway.
1163
-This is done so that
1164
-.B (3)
1165
-will not create a routing loop.
1166
-
1167
-.B (2)
1168
-Delete the default gateway route.
1169
-
1170
-.B (3)
1171
-Set the new default gateway to be the VPN endpoint address (derived either from
1172
-.B \-\-route\-gateway
1173
-or the second parameter to
1174
-.B \-\-ifconfig
1175
-when
1176
-.B \-\-dev tun
1177
-is specified).
1178
-
1179
-When the tunnel is torn down, all of the above steps are reversed so
1180
-that the original default route is restored.
1181
-
1182
-Option flags:
1183
-
1184
-.B local \-\-
1185
-Add the
1186
-.B local
1187
-flag if both OpenVPN peers are directly connected via a common subnet,
1188
-such as with wireless.  The
1189
-.B local
1190
-flag will cause step
1191
-.B 1
1192
-above to be omitted.
1193
-
1194
-.B autolocal \-\-
1195
-Try to automatically determine whether to enable
1196
-.B local
1197
-flag above.
1198
-
1199
-.B def1 \-\-
1200
-Use this flag to override
1201
-the default gateway by using 0.0.0.0/1 and 128.0.0.0/1
1202
-rather than 0.0.0.0/0.  This has the benefit of overriding
1203
-but not wiping out the original default gateway. 
1204
-
1205
-.B bypass\-dhcp \-\-
1206
-Add a direct route to the DHCP server (if it is non\-local) which
1207
-bypasses the tunnel
1208
-(Available on Windows clients, may not be available
1209
-on non\-Windows clients).
1210
-
1211
-.B bypass\-dns \-\-
1212
-Add a direct route to the DNS server(s) (if they are non\-local) which
1213
-bypasses the tunnel
1214
-(Available on Windows clients, may not be available
1215
-on non\-Windows clients).
1216
-
1217
-.B block\-local \-\-
1218
-Block access to local LAN when the tunnel is active, except for
1219
-the LAN gateway itself.  This is accomplished by routing the local
1220
-LAN (except for the LAN gateway address) into the tunnel.
1221
-
1222
-.B ipv6 \-\-
1223
-Redirect IPv6 routing into the tunnel.  This works similar to the
1224
-.B def1
1225
-flag, that is, more specific IPv6 routes are added (2000::/4, 3000::/4),
1226
-covering the whole IPv6 unicast space.
1227
-
1228
-.B !ipv4 \-\-
1229
-Do not redirect IPv4 traffic \- typically used in the flag pair
1230
-.B "ipv6 !ipv4"
1231
-to redirect IPv6\-only.
1232
-.\"*********************************************************
1233
-.TP
1234
-.B \-\-link\-mtu n
1235
-Sets an upper bound on the size of UDP packets which are sent
1236
-between OpenVPN peers.  It's best not to set this parameter unless
1237
-you know what you're doing.
1238
-.\"*********************************************************
1239
-.\"*********************************************************
1240
-.TP
1241
-.B \-\-redirect\-private [flags]
1242
-Like \-\-redirect\-gateway, but omit actually changing the default
1243
-gateway.  Useful when pushing private subnets.
1244
-.\"*********************************************************
1245
-.TP
1246
-.B \-\-block\-ipv6
1247
-On the client, instead of sending IPv6 packets over the VPN tunnel, all
1248
-IPv6 packets are answered with an ICMPv6 no route host message. On the
1249
-server, all IPv6 packets from clients are answered with an ICMPv6
1250
-no route to host message. This options is intended for cases when IPv6
1251
-should be blocked and other options are not available.
1252
-\.B \-\-block\-ipv6
1253
-will use the remote IPv6 as source address of the ICMPv6 packets if set,
1254
-otherwise will use fe80::7 as source address.
1255
-
1256
-For this option to make sense you actually have to route traffic to the tun
1257
-interface. The following example config block would send all IPv6 traffic to
1258
-OpenVPN and answer all requests with no route to host, effectively blocking
1259
-IPv6.
1260
-
1261
-# client config
1262
-.br
1263
-.B \-\-ifconfig-ipv6
1264
-fd15:53b6:dead::2/64  fd15:53b6:dead::1
1265
-.br
1266
-.B \-\-redirect\-gateway
1267
-ipv6
1268
-.br
1269
-.B \-\-block\-ipv6
1270
-
1271
-# Server config, push a "valid" ipv6 config to the client and block
1272
-# on the server
1273
-.br
1274
-.B \-\-push
1275
-"ifconfig-ipv6 fd15:53b6:dead::2/64  fd15:53b6:dead::1"
1276
-.br
1277
-.B \-\-push
1278
-"redirect\-gateway ipv6"
1279
-.br
1280
-.B \-\-block\-ipv6
1281
-.\"*********************************************************
1282
-.TP
1283
-.B \-\-tun\-mtu n
1284
-Take the TUN device MTU to be
1285
-.B n
1286
-and derive the link MTU
1287
-from it (default=1500).  In most cases, you will probably want to
1288
-leave this parameter set to its default value.
1289
-
1290
-The MTU (Maximum Transmission Units) is
1291
-the maximum datagram size in bytes that can be sent unfragmented
1292
-over a particular network path.  OpenVPN requires that packets
1293
-on the control or data channels be sent unfragmented.
1294
-
1295
-MTU problems often manifest themselves as connections which
1296
-hang during periods of active usage.
1297
-
1298
-It's best to use the
1299
-.B \-\-fragment
1300
-and/or
1301
-.B \-\-mssfix
1302
-options to deal with MTU sizing issues.
1303
-.\"*********************************************************
1304
-.TP
1305
-.B \-\-tun\-mtu\-extra n
1306
-Assume that the TUN/TAP device might return as many as
1307
-.B n
1308
-bytes more than the
1309
-.B \-\-tun\-mtu
1310
-size on read.  This parameter defaults to 0, which is sufficient for
1311
-most TUN devices.  TAP devices may introduce additional overhead in excess
1312
-of the MTU size, and a setting of 32 is the default when TAP devices are used.
1313
-This parameter only controls internal OpenVPN buffer sizing,
1314
-so there is no transmission overhead associated with using a larger value.
1315
-.\"*********************************************************
1316
-.TP
1317
-.B \-\-mtu\-disc type
1318
-Should we do Path MTU discovery on TCP/UDP channel?  Only supported on OSes such
1319
-as Linux that supports the necessary system call to set.
1320
-
1321
-.B 'no'
1322
-\-\- Never send DF (Don't Fragment) frames
1323
-.br
1324
-.B 'maybe'
1325
-\-\- Use per\-route hints
1326
-.br
1327
-.B 'yes'
1328
-\-\- Always DF (Don't Fragment)
1329
-.br
1330
-.\"*********************************************************
1331
-.TP
1332
-.B \-\-mtu\-test
1333
-To empirically measure MTU on connection startup,
1334
-add the
1335
-.B \-\-mtu\-test
1336
-option to your configuration.
1337
-OpenVPN will send ping packets of various sizes
1338
-to the remote peer and measure the largest packets
1339
-which were successfully received.  The
1340
-.B \-\-mtu\-test
1341
-process normally takes about 3 minutes to complete.
1342
-.\"*********************************************************
1343
-.TP
1344
-.B \-\-fragment max
1345
-Enable internal datagram fragmentation so
1346
-that no UDP datagrams are sent which
1347
-are larger than
1348
-.B max
1349
-bytes.
1350
-
1351
-The
1352
-.B max
1353
-parameter is interpreted in the same way as the
1354
-.B \-\-link\-mtu
1355
-parameter, i.e. the UDP packet size after encapsulation
1356
-overhead has been added in, but not including
1357
-the UDP header itself.
1358
-
1359
-The
1360
-.B \-\-fragment
1361
-option only makes sense when you are using the UDP protocol (
1362
-.B \-\-proto udp
1363
-).
1364
-
1365
-.B \-\-fragment
1366
-adds 4 bytes of overhead per datagram.
1367
-
1368
-See the
1369
-.B \-\-mssfix
1370
-option below for an important related option to
1371
-.B \-\-fragment.
1372
-
1373
-It should also be noted that this option is not meant to replace
1374
-UDP fragmentation at the IP stack level.  It is only meant as a
1375
-last resort when path MTU discovery is broken.  Using this option
1376
-is less efficient than fixing path MTU discovery for your IP link and
1377
-using native IP fragmentation instead.
1378
-
1379
-Having said that, there are circumstances where using OpenVPN's
1380
-internal fragmentation capability may be your only option, such
1381
-as tunneling a UDP multicast stream which requires fragmentation.
1382
-.\"*********************************************************
1383
-.TP
1384
-.B \-\-mssfix max
1385
-Announce to TCP sessions running over the tunnel that they should limit
1386
-their send packet sizes such that after OpenVPN has encapsulated them,
1387
-the resulting UDP packet size that OpenVPN sends to its peer will not
1388
-exceed
1389
-.B max
1390
-bytes. The default value is
1391
-.B 1450.
1392
-
1393
-The
1394
-.B max
1395
-parameter is interpreted in the same way as the
1396
-.B \-\-link\-mtu
1397
-parameter, i.e. the UDP packet size after encapsulation
1398
-overhead has been added in, but not including
1399
-the UDP header itself. Resulting packet would be at most 28
1400
-bytes larger for IPv4 and 48 bytes for IPv6 (20/40 bytes for IP
1401
-header and 8 bytes for UDP header). Default value of 1450 allows
1402
-IPv4 packets to be transmitted over a link with MTU 1473 or higher
1403
-without IP level fragmentation.
1404
-
1405
-The
1406
-.B \-\-mssfix
1407
-option only makes sense when you are using the UDP protocol
1408
-for OpenVPN peer\-to\-peer communication, i.e.
1409
-.B \-\-proto udp.
1410
-
1411
-.B \-\-mssfix
1412
-and
1413
-.B \-\-fragment
1414
-can be ideally used together, where
1415
-.B \-\-mssfix
1416
-will try to keep TCP from needing
1417
-packet fragmentation in the first place,
1418
-and if big packets come through anyhow
1419
-(from protocols other than TCP),
1420
-.B \-\-fragment
1421
-will internally fragment them.
1422
-
1423
-Both
1424
-.B \-\-fragment
1425
-and
1426
-.B \-\-mssfix
1427
-are designed to work around cases where Path MTU discovery
1428
-is broken on the network path between OpenVPN peers.
1429
-
1430
-The usual symptom of such a breakdown is an OpenVPN
1431
-connection which successfully starts, but then stalls
1432
-during active usage.
1433
-
1434
-If
1435
-.B \-\-fragment
1436
-and
1437
-.B \-\-mssfix
1438
-are used together,
1439
-.B \-\-mssfix
1440
-will take its default
1441
-.B max
1442
-parameter from the
1443
-.B \-\-fragment max
1444
-option.
1445
-
1446
-Therefore, one could lower the maximum UDP packet size
1447
-to 1300 (a good first try for solving MTU\-related
1448
-connection problems) with the following options:
1449
-
1450
-.B \-\-tun\-mtu 1500 \-\-fragment 1300 \-\-mssfix
1451
-.\"*********************************************************
1452
-.TP
1453
-.B \-\-sndbuf size
1454
-Set the TCP/UDP socket send buffer size.
1455
-Defaults to operation system default.
1456
-.\"*********************************************************
1457
-.TP
1458
-.B \-\-rcvbuf size
1459
-Set the TCP/UDP socket receive buffer size.
1460
-Defaults to operation system default.
1461
-.\"*********************************************************
1462
-.TP
1463
-.B \-\-mark value
1464
-Mark encrypted packets being sent with value. The mark value can be
1465
-matched in policy routing and packetfilter rules. This option is
1466
-only supported in Linux and does nothing on other operating systems.
1467
-.\"*********************************************************
1468
-.TP
1469
-.B \-\-socket\-flags flags...
1470
-Apply the given flags to the OpenVPN transport socket.
1471
-Currently, only
1472
-.B TCP_NODELAY
1473
-is supported.
1474
-
1475
-The
1476
-.B TCP_NODELAY
1477
-socket flag is useful in TCP mode, and causes the kernel
1478
-to send tunnel packets immediately over the TCP connection without
1479
-trying to group several smaller packets into a larger packet.
1480
-This can result in a considerably improvement in latency.
1481
-
1482
-This option is pushable from server to client, and should be used
1483
-on both client and server for maximum effect.
1484
-.\"*********************************************************
1485
-.TP
1486
-.B \-\-txqueuelen n
1487
-(Linux only) Set the TX queue length on the TUN/TAP interface.
1488
-Currently defaults to 100.
1489
-.\"*********************************************************
1490
-.TP
1491
-.B \-\-shaper n
1492
-Limit bandwidth of outgoing tunnel data to
1493
-.B n
1494
-bytes per second on the TCP/UDP port.
1495
-Note that this will only work if mode is set to p2p.
1496
-If you want to limit the bandwidth
1497
-in both directions, use this option on both peers.
1498
-
1499
-OpenVPN uses the following algorithm to implement
1500
-traffic shaping: Given a shaper rate of
1501
-.I n
1502
-bytes per second, after a datagram write of
1503
-.I b
1504
-bytes is queued on the TCP/UDP port, wait a minimum of
1505
-.I (b / n)
1506
-seconds before queuing the next write.
1507
-
1508
-It should be noted that OpenVPN supports multiple
1509
-tunnels between the same two peers, allowing you
1510
-to construct full\-speed and reduced bandwidth tunnels
1511
-at the same time,
1512
-routing low\-priority data such as off\-site backups
1513
-over the reduced bandwidth tunnel, and other data
1514
-over the full\-speed tunnel.
1515
-
1516
-Also note that for low bandwidth tunnels
1517
-(under 1000 bytes per second), you should probably
1518
-use lower MTU values as well (see above), otherwise
1519
-the packet latency will grow so large as to trigger
1520
-timeouts in the TLS layer and TCP connections running
1521
-over the tunnel.
1522
-
1523
-OpenVPN allows
1524
-.B n
1525
-to be between 100 bytes/sec and 100 Mbytes/sec.
1526
-.\"*********************************************************
1527
-.TP
1528
-.B \-\-inactive n [bytes]
1529
-Causes OpenVPN to exit after
1530
-.B n
1531
-seconds of inactivity on the TUN/TAP device. The time length of
1532
-inactivity is measured since the last incoming or outgoing tunnel
1533
-packet.  The default value is 0 seconds, which disables this feature.
1534
-
1535
-If the optional
1536
-.B bytes
1537
-parameter is included,
1538
-exit if less than
1539
-.B bytes
1540
-of combined in/out traffic are produced on the tun/tap device
1541
-in
1542
-.B n
1543
-seconds.
1544
-
1545
-In any case, OpenVPN's internal ping packets (which are just
1546
-keepalives) and TLS control packets are not considered
1547
-"activity", nor are they counted as traffic, as they are used
1548
-internally by OpenVPN and are not an indication of actual user
1549
-activity.
1550
-.\"*********************************************************
1551
-.TP
1552
-.B \-\-ping n
1553
-Ping remote over the TCP/UDP control channel
1554
-if no packets have been sent for at least
1555
-.B n
1556
-seconds (specify
1557
-.B \-\-ping
1558
-on both peers to cause ping packets to be sent in both directions since
1559
-OpenVPN ping packets are not echoed like IP ping packets).
1560
-When used in one of OpenVPN's secure modes (where
1561
-.B \-\-secret, \-\-tls\-server,
1562
-or
1563
-.B \-\-tls\-client
1564
-is specified), the ping packet
1565
-will be cryptographically secure.
1566
-
1567
-This option has two intended uses:
1568
-
1569
-(1) Compatibility
1570
-with stateful firewalls.  The periodic ping will ensure that
1571
-a stateful firewall rule which allows OpenVPN UDP packets to
1572
-pass will not time out.
1573
-
1574
-(2) To provide a basis for the remote to test the existence
1575
-of its peer using the
1576
-.B \-\-ping\-exit
1577
-option.
1578
-.\"*********************************************************
1579
-.TP
1580
-.B \-\-ping\-exit n
1581
-Causes OpenVPN to exit after
1582
-.B n
1583
-seconds pass without reception of a ping
1584
-or other packet from remote.
1585
-This option can be combined with
1586
-.B \-\-inactive, \-\-ping,
1587
-and
1588
-.B \-\-ping\-exit
1589
-to create a two\-tiered inactivity disconnect.
1590
-
1591
-For example,
1592
-
1593
-.B openvpn [options...] \-\-inactive 3600 \-\-ping 10 \-\-ping\-exit 60
1594
-
1595
-when used on both peers will cause OpenVPN to exit within 60
1596
-seconds if its peer disconnects, but will exit after one
1597
-hour if no actual tunnel data is exchanged.
1598
-.\"*********************************************************
1599
-.TP
1600
-.B \-\-ping\-restart n
1601
-Similar to
1602
-.B \-\-ping\-exit,
1603
-but trigger a
1604
-.B SIGUSR1
1605
-restart after
1606
-.B n
1607
-seconds pass without reception of a ping
1608
-or other packet from remote.
1609
-
1610
-This option is useful in cases
1611
-where the remote peer has a dynamic IP address and
1612
-a low\-TTL DNS name is used to track the IP address using
1613
-a service such as
1614
-.I http://dyndns.org/
1615
-+ a dynamic DNS client such
1616
-as
1617
-.B ddclient.
1618
-
1619
-If the peer cannot be reached, a restart will be triggered, causing
1620
-the hostname used with
1621
-.B \-\-remote
1622
-to be re\-resolved (if
1623
-.B \-\-resolv\-retry
1624
-is also specified).
1625
-
1626
-In server mode,
1627
-.B \-\-ping\-restart, \-\-inactive,
1628
-or any other type of internally generated signal will always be
1629
-applied to
1630
-individual client instance objects, never to whole server itself.
1631
-Note also in server mode that any internally generated signal
1632
-which would normally cause a restart, will cause the deletion
1633
-of the client instance object instead.
1634
-
1635
-In client mode, the
1636
-.B \-\-ping\-restart
1637
-parameter is set to 120 seconds by default.  This default will
1638
-hold until the client pulls a replacement value from the server, based on
1639
-the
1640
-.B \-\-keepalive
1641
-setting in the server configuration.
1642
-To disable the 120 second default, set
1643
-.B \-\-ping\-restart 0
1644
-on the client.
1645
-
1646
-See the signals section below for more information
1647
-on
1648
-.B SIGUSR1.
1649
-
1650
-Note that the behavior of
1651
-.B SIGUSR1
1652
-can be modified by the
1653
-.B \-\-persist\-tun, \-\-persist\-key, \-\-persist\-local\-ip,
1654
-and
1655
-.B \-\-persist\-remote\-ip
1656
-options.
1657
-
1658
-Also note that
1659
-.B \-\-ping\-exit
1660
-and
1661
-.B \-\-ping\-restart
1662
-are mutually exclusive and cannot be used together.
1663
-.\"*********************************************************
1664
-.TP
1665
-.B \-\-keepalive interval timeout
1666
-A helper directive designed to simplify the expression of
1667
-.B \-\-ping
1668
-and
1669
-.B \-\-ping\-restart.
1670
-
1671
-This option can be used on both client and server side, but it is
1672
-enough to add this on the server side as it will push appropriate
1673
-.B \-\-ping
1674
-and
1675
-.B \-\-ping\-restart
1676
-options to the client.  If used on both server and client,
1677
-the values pushed from server will override the client local values.
1678
-
1679
-The
1680
-.B timeout
1681
-argument will be twice as long on the server side.  This ensures that
1682
-a timeout is detected on client side before the server side drops
1683
-the connection.
1684
-
1685
-For example,
1686
-.B \-\-keepalive 10 60
1687
-expands as follows:
1688
-
1689
-.nf
1690
-.ft 3
1691
-.in +4
1692
- if mode server:
1693
-   ping 10                    # Argument: interval
1694
-   ping\-restart 120           # Argument: timeout*2
1695
-   push "ping 10"             # Argument: interval
1696
-   push "ping\-restart 60"     # Argument: timeout
1697
- else
1698
-   ping 10                    # Argument: interval
1699
-   ping\-restart 60            # Argument: timeout
1700
-.in -4
1701
-.ft
1702
-.fi
1703
-.\"*********************************************************
1704
-.TP
1705
-.B \-\-ping\-timer\-rem
1706
-Run the
1707
-.B \-\-ping\-exit
1708
-/
1709
-.B \-\-ping\-restart
1710
-timer only if we have a remote address.  Use this option if you are
1711
-starting the daemon in listen mode (i.e. without an explicit
1712
-.B \-\-remote
1713
-peer), and you don't want to start clocking timeouts until a remote
1714
-peer connects.
1715
-.\"*********************************************************
1716
-.TP
1717
-.B \-\-persist\-tun
1718
-Don't close and reopen TUN/TAP device or run up/down scripts
1719
-across
1720
-.B SIGUSR1
1721
-or
1722
-.B \-\-ping\-restart
1723
-restarts.
1724
-
1725
-.B SIGUSR1
1726
-is a restart signal similar to
1727
-.B SIGHUP,
1728
-but which offers finer\-grained control over
1729
-reset options.
1730
-.\"*********************************************************
1731
-.TP
1732
-.B \-\-persist\-key
1733
-Don't re\-read key files across
1734
-.B SIGUSR1
1735
-or
1736
-.B \-\-ping\-restart.
1737
-
1738
-This option can be combined with
1739
-.B \-\-user nobody
1740
-to allow restarts triggered by the
1741
-.B SIGUSR1
1742
-signal.
1743
-Normally if you drop root privileges in OpenVPN,
1744
-the daemon cannot be restarted since it will now be unable to re\-read protected
1745
-key files.
1746
-
1747
-This option solves the problem by persisting keys across
1748
-.B SIGUSR1
1749
-resets, so they don't need to be re\-read.
1750
-.\"*********************************************************
1751
-.TP
1752
-.B \-\-persist\-local\-ip
1753
-Preserve initially resolved local IP address and port number
1754
-across
1755
-.B SIGUSR1
1756
-or
1757
-.B \-\-ping\-restart
1758
-restarts.
1759
-.\"*********************************************************
1760
-.TP
1761
-.B \-\-persist\-remote\-ip
1762
-Preserve most recently authenticated remote IP address and port number
1763
-across
1764
-.B SIGUSR1
1765
-or
1766
-.B \-\-ping\-restart
1767
-restarts.
1768
-.\"*********************************************************
1769
-.TP
1770
-.B \-\-mlock
1771
-Disable paging by calling the POSIX mlockall function.
1772
-Requires that OpenVPN be initially run as root (though
1773
-OpenVPN can subsequently downgrade its UID using the
1774
-.B \-\-user
1775
-option).
1776
-
1777
-Using this option ensures that key material and tunnel
1778
-data are never written to disk due to virtual
1779
-memory paging operations which occur under most
1780
-modern operating systems.  It ensures that even if an
1781
-attacker was able to crack the box running OpenVPN, he
1782
-would not be able to scan the system swap file to
1783
-recover previously used
1784
-ephemeral keys, which are used for a period of time
1785
-governed by the
1786
-.B \-\-reneg
1787
-options (see below), then are discarded.
1788
-
1789
-The downside
1790
-of using
1791
-.B \-\-mlock
1792
-is that it will reduce the amount of physical
1793
-memory available to other applications.
1794
-.\"*********************************************************
1795
-.TP
1796
-.B \-\-up cmd
1797
-Run command
1798
-.B cmd
1799
-after successful TUN/TAP device open
1800
-(pre
1801
-.B \-\-user
1802
-UID change).
1803
-
1804
-.B cmd
1805
-consists of a path to script (or executable program), optionally
1806
-followed by arguments. The path and arguments may be single\- or double\-quoted
1807
-and/or escaped using a backslash, and should be separated by one or more spaces.
1808
-
1809
-The up command is useful for specifying route
1810
-commands which route IP traffic destined for
1811
-private subnets which exist at the other
1812
-end of the VPN connection into the tunnel.
1813
-
1814
-For
1815
-.B \-\-dev tun
1816
-execute as:
1817
-
1818
-.B cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init | restart ]
1819
-
1820
-For
1821
-.B \-\-dev tap
1822
-execute as:
1823
-
1824
-.B cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init | restart ]
1825
-
1826
-See the "Environmental Variables" section below for
1827
-additional parameters passed as environmental variables.
1828
-
1829
-Note that if
1830
-.B cmd
1831
-includes arguments, all OpenVPN\-generated arguments will be appended
1832
-to them to build an argument list with which the executable will be
1833
-called.
1834
-
1835
-Typically,
1836
-.B cmd
1837
-will run a script to add routes to the tunnel.
1838
-
1839
-Normally the up script is called after the TUN/TAP device is opened.
1840
-In this context, the last command line parameter passed to the script
1841
-will be
1842
-.I init.
1843
-If the
1844
-.B \-\-up\-restart
1845
-option is also used, the up script will be called for restarts as
1846
-well.  A restart is considered to be a partial reinitialization
1847
-of OpenVPN where the TUN/TAP instance is preserved (the
1848
-.B \-\-persist\-tun
1849
-option will enable such preservation).  A restart
1850
-can be generated by a SIGUSR1 signal, a
1851
-.B \-\-ping\-restart
1852
-timeout, or a connection reset when the TCP protocol is enabled
1853
-with the
1854
-.B \-\-proto
1855
-option.  If a restart occurs, and
1856
-.B \-\-up\-restart
1857
-has been specified, the up script will be called with
1858
-.I restart
1859
-as the last parameter.
1860
-
1861
-NOTE: on restart, OpenVPN will not pass the full set of environment
1862
-variables to the script.  Namely, everything related to routing and
1863
-gateways will not be passed, as nothing needs to be done anyway \- all
1864
-the routing setup is already in place.  Additionally, the up\-restart
1865
-script will run with the downgraded UID/GID settings (if configured).
1866
-
1867
-The following standalone example shows how the
1868
-.B \-\-up
1869
-script can be called in both an initialization and restart context.
1870
-(NOTE: for security reasons, don't run the following example unless UDP port
1871
-9999 is blocked by your firewall.  Also, the example will run indefinitely,
1872
-so you should abort with control\-c).
1873
-
1874
-.B openvpn \-\-dev tun \-\-port 9999 \-\-verb 4 \-\-ping\-restart 10 \-\-up 'echo up' \-\-down 'echo down' \-\-persist\-tun \-\-up\-restart
1875
-
1876
-Note that OpenVPN also provides the
1877
-.B \-\-ifconfig
1878
-option to automatically ifconfig the TUN device,
1879
-eliminating the need to define an
1880
-.B \-\-up
1881
-script, unless you also want to configure routes
1882
-in the
1883
-.B \-\-up
1884
-script.
1885
-
1886
-If
1887
-.B \-\-ifconfig
1888
-is also specified, OpenVPN will pass the ifconfig local
1889
-and remote endpoints on the command line to the
1890
-.B \-\-up
1891
-script so that they can be used to configure routes such as:
1892
-
1893
-.B route add \-net 10.0.0.0 netmask 255.255.255.0 gw $5
1894
-.\"*********************************************************
1895
-.TP
1896
-.B \-\-up\-delay
1897
-Delay TUN/TAP open and possible
1898
-.B \-\-up
1899
-script execution
1900
-until after TCP/UDP connection establishment with peer.
1901
-
1902
-In
1903
-.B \-\-proto udp
1904
-mode, this option normally requires the use of
1905
-.B \-\-ping
1906
-to allow connection initiation to be sensed in the absence
1907
-of tunnel data, since UDP is a "connectionless" protocol.
1908
-
1909
-On Windows, this option will delay the TAP\-Win32 media state
1910
-transitioning to "connected" until connection establishment,
1911
-i.e. the receipt of the first authenticated packet from the peer.
1912
-.\"*********************************************************
1913
-.TP
1914
-.B \-\-down cmd
1915
-Run command
1916
-.B cmd
1917
-after TUN/TAP device close
1918
-(post
1919
-.B \-\-user
1920
-UID change and/or
1921
-.B \-\-chroot
1922
-).
1923
-.B cmd
1924
-consists of a path to script (or executable program), optionally
1925
-followed by arguments. The path and arguments may be single\- or double\-quoted
1926
-and/or escaped using a backslash, and should be separated by one or more spaces.
1927
-
1928
-Called with the same parameters and environmental
1929
-variables as the
1930
-.B \-\-up
1931
-option above.
1932
-
1933
-Note that if you reduce privileges by using
1934
-.B \-\-user
1935
-and/or
1936
-.B \-\-group,
1937
-your
1938
-.B \-\-down
1939
-script will also run at reduced privilege.
1940
-.\"*********************************************************
1941
-.TP
1942
-.B \-\-down\-pre
1943
-Call
1944
-.B \-\-down
1945
-cmd/script before, rather than after, TUN/TAP close.
1946
-.\"*********************************************************
1947
-.TP
1948
-.B \-\-up\-restart
1949
-Enable the
1950
-.B \-\-up
1951
-and
1952
-.B \-\-down
1953
-scripts to be called for restarts as well as initial program start.
1954
-This option is described more fully above in the
1955
-.B \-\-up
1956
-option documentation.
1957
-.\"*********************************************************
1958
-.TP
1959
-.B \-\-setenv name value
1960
-Set a custom environmental variable
1961
-.B name=value
1962
-to pass to script.
1963
-.\"*********************************************************
1964
-.TP
1965
-.B \-\-setenv FORWARD_COMPATIBLE 1
1966
-Relax config file syntax checking so that unknown directives
1967
-will trigger a warning but not a fatal error,
1968
-on the assumption that a given unknown directive might be valid
1969
-in future OpenVPN versions.
1970
-
1971
-This option should be used with caution, as there are good security
1972
-reasons for having OpenVPN fail if it detects problems in a
1973
-config file.  Having said that, there are valid reasons for wanting
1974
-new software features to gracefully degrade when encountered by
1975
-older software versions.
1976
-
1977
-It is also possible to tag a single directive so as not to trigger
1978
-a fatal error if the directive isn't recognized.  To do this,
1979
-prepend the following before the directive:
1980
-.B setenv opt
1981
-
1982
-Versions prior to OpenVPN 2.3.3 will always ignore options set with the
1983
-.B setenv opt
1984
-directive.
1985
-
1986
-See also
1987
-.B \-\-ignore\-unknown\-option
1988
-.\"*********************************************************
1989
-.TP
1990
-.B \-\-setenv\-safe name value
1991
-Set a custom environmental variable
1992
-.B OPENVPN_name=value
1993
-to pass to script.
1994
-
1995
-This directive is designed to be pushed by the server to clients,
1996
-and the prepending of "OPENVPN_" to the environmental variable
1997
-is a safety precaution to prevent a LD_PRELOAD style attack
1998
-from a malicious or compromised server.
1999
-.\"*********************************************************
2000
-.TP
2001
-.B \-\-ignore\-unknown\-option opt1 opt2 opt3 ... optN
2002
-When one of options
2003
-.B opt1 ... optN
2004
-is encountered in the configuration file the configuration
2005
-file parsing does not fail if this OpenVPN version does not
2006
-support the option. Multiple
2007
-.B \-\-ignore\-unknown\-option
2008
-options can be given to support a larger number of options to ignore.
2009
-
2010
-This option should be used with caution, as there are good security
2011
-reasons for having OpenVPN fail if it detects problems in a
2012
-config file. Having said that, there are valid reasons for wanting
2013
-new software features to gracefully degrade when encountered by
2014
-older software versions.
2015
-
2016
-.B \-\-ignore\-unknown\-option
2017
-is available since OpenVPN 2.3.3.
2018
-.\"*********************************************************
2019
-.TP
2020
-.B \-\-script\-security level
2021
-This directive offers policy\-level control over OpenVPN's usage of external programs
2022
-and scripts.  Lower
2023
-.B level
2024
-values are more restrictive, higher values are more permissive.  Settings for
2025
-.B level:
2026
-
2027
-.B 0 \-\-
2028
-Strictly no calling of external programs.
2029
-.br
2030
-.B 1 \-\-
2031
-(Default) Only call built\-in executables such as ifconfig, ip, route, or netsh.
2032
-.br
2033
-.B 2 \-\-
2034
-Allow calling of built\-in executables and user\-defined scripts.
2035
-.br
2036
-.B 3 \-\-
2037
-Allow passwords to be passed to scripts via environmental variables (potentially unsafe).
2038
-
2039
-OpenVPN releases before v2.3 also supported a
2040
-.B method
2041
-flag which indicated how OpenVPN should call external commands and scripts.  This
2042
-could be either
2043
-.B execve
2044
-or 
2045
-.B system. 
2046
-As of OpenVPN 2.3, this flag is no longer accepted.  In most *nix environments the execve()
2047
-approach has been used without any issues.
2048
-
2049
-Some directives such as \-\-up allow options to be passed to the external
2050
-script. In these cases make sure the script name does not contain any spaces or
2051
-the configuration parser will choke because it can't determine where the script
2052
-name ends and script options start.
2053
-
2054
-To run scripts in Windows in earlier OpenVPN
2055
-versions you needed to either add a full path to the script interpreter which can parse the
2056
-script or use the
2057
-.B system
2058
-flag to run these scripts.  As of OpenVPN 2.3 it is now a strict requirement to have
2059
-full path to the script interpreter when running non\-executables files.
2060
-This is not needed for executable files, such as .exe, .com, .bat or .cmd files.  For
2061
-example, if you have a Visual Basic script, you must use this syntax now:
2062
-
2063
-.nf
2064
-.ft 3
2065
-.in +4
2066
-\-\-up 'C:\\\\Windows\\\\System32\\\\wscript.exe C:\\\\Program\\ Files\\\\OpenVPN\\\\config\\\\my\-up\-script.vbs'
2067
-.in -4
2068
-.ft
2069
-.fi
2070
-
2071
-Please note the single quote marks and the escaping of the backslashes (\\) and
2072
-the space character.
2073
-
2074
-The reason the support for the
2075
-.B system
2076
-flag was removed is due to the security implications with shell expansions
2077
-when executing scripts via the system() call.
2078
-.\"*********************************************************
2079
-.TP
2080
-.B \-\-disable\-occ
2081
-Don't output a warning message if option inconsistencies are detected between
2082
-peers.  An example of an option inconsistency would be where one peer uses
2083
-.B \-\-dev tun
2084
-while the other peer uses
2085
-.B \-\-dev tap.
2086
-
2087
-Use of this option is discouraged, but is provided as
2088
-a temporary fix in situations where a recent version of OpenVPN must
2089
-connect to an old version.
2090
-.\"*********************************************************
2091
-.TP
2092
-.B \-\-user user
2093
-Change the user ID of the OpenVPN process to
2094
-.B user
2095
-after initialization, dropping privileges in the process.
2096
-This option is useful to protect the system
2097
-in the event that some hostile party was able to gain control of
2098
-an OpenVPN session.  Though OpenVPN's security features make
2099
-this unlikely, it is provided as a second line of defense.
2100
-
2101
-By setting
2102
-.B user
2103
-to
2104
-.I nobody
2105
-or somebody similarly unprivileged, the hostile party would be
2106
-limited in what damage they could cause.  Of course once
2107
-you take away privileges, you cannot return them
2108
-to an OpenVPN session.  This means, for example, that if
2109
-you want to reset an OpenVPN daemon with a
2110
-.B SIGUSR1
2111
-signal
2112
-(for example in response
2113
-to a DHCP reset), you should make use of one or more of the
2114
-.B \-\-persist
2115
-options to ensure that OpenVPN doesn't need to execute any privileged
2116
-operations in order to restart (such as re\-reading key files
2117
-or running
2118
-.BR ifconfig
2119
-on the TUN device).
2120
-.\"*********************************************************
2121
-.TP
2122
-.B \-\-group group
2123
-Similar to the
2124
-.B \-\-user
2125
-option,
2126
-this option changes the group ID of the OpenVPN process to
2127
-.B group
2128
-after initialization.
2129
-.\"*********************************************************
2130
-.TP
2131
-.B \-\-cd dir
2132
-Change directory to
2133
-.B dir
2134
-prior to reading any files such as
2135
-configuration files, key files, scripts, etc.
2136
-.B dir
2137
-should be an absolute path, with a leading "/",
2138
-and without any references
2139
-to the current directory such as "." or "..".
2140
-
2141
-This option is useful when you are running
2142
-OpenVPN in 
2143
-.B \-\-daemon
2144
-mode, and you want to consolidate all of
2145
-your OpenVPN control files in one location.
2146
-.\"*********************************************************
2147
-.TP
2148
-.B \-\-chroot dir
2149
-Chroot to
2150
-.B dir
2151
-after initialization.  
2152
-.B \-\-chroot
2153
-essentially redefines
2154
-.B dir
2155
-as being the top
2156
-level directory tree (/).  OpenVPN will therefore
2157
-be unable to access any files outside this tree.
2158
-This can be desirable from a security standpoint.
2159
-
2160
-Since the chroot operation is delayed until after
2161
-initialization, most OpenVPN options that reference
2162
-files will operate in a pre\-chroot context.
2163
-
2164
-In many cases, the
2165
-.B dir
2166
-parameter can point to an empty directory, however
2167
-complications can result when scripts or restarts
2168
-are executed after the chroot operation.
2169
-
2170
-Note: The SSL library will probably need /dev/urandom to be available inside
2171
-the chroot directory
2172
-.B dir.
2173
-This is because SSL libraries occasionally need to collect fresh random.  Newer
2174
-linux kernels and some BSDs implement a getrandom() or getentropy() syscall
2175
-that removes the need for /dev/urandom to be available.
2176
-.\"*********************************************************
2177
-.TP
2178
-.B \-\-setcon context
2179
-Apply SELinux
2180
-.B context
2181
-after initialization. This
2182
-essentially provides the ability to restrict OpenVPN's
2183
-rights to only network I/O operations, thanks to
2184
-SELinux. This goes further than
2185
-.B \-\-user
2186
-and
2187
-.B \-\-chroot
2188
-in that those two, while being great security features,
2189
-unfortunately do not protect against privilege escalation
2190
-by exploitation of a vulnerable system call. You can of
2191
-course combine all three, but please note that since
2192
-setcon requires access to /proc you will have to provide
2193
-it inside the chroot directory (e.g. with mount \-\-bind).
2194
-
2195
-Since the setcon operation is delayed until after
2196
-initialization, OpenVPN can be restricted to just
2197
-network\-related system calls, whereas by applying the
2198
-context before startup (such as the OpenVPN one provided
2199
-in the SELinux Reference Policies) you will have to
2200
-allow many things required only during initialization.
2201
-
2202
-Like with chroot, complications can result when scripts
2203
-or restarts are executed after the setcon operation,
2204
-which is why you should really consider using the
2205
-.B \-\-persist\-key
2206
-and
2207
-.B \-\-persist\-tun
2208
-options.
2209
-.\"*********************************************************
2210
-.TP
2211
-.B \-\-daemon [progname]
2212
-Become a daemon after all initialization functions are completed.
2213
-This option will cause all message and error output to
2214
-be sent to the syslog file (such as /var/log/messages),
2215
-except for the output of scripts and
2216
-ifconfig commands,
2217
-which will go to /dev/null unless otherwise redirected.
2218
-The syslog redirection occurs immediately at the point
2219
-that
2220
-.B \-\-daemon
2221
-is parsed on the command line even though
2222
-the daemonization point occurs later.  If one of the
2223
-.B \-\-log
2224
-options is present, it will supersede syslog
2225
-redirection.
2226
-
2227
-The optional
2228
-.B progname
2229
-parameter will cause OpenVPN to report its program name
2230
-to the system logger as
2231
-.B progname.
2232
-This can be useful in linking OpenVPN messages
2233
-in the syslog file with specific tunnels.
2234
-When unspecified,
2235
-.B progname
2236
-defaults to "openvpn".
2237
-
2238
-When OpenVPN is run with the
2239
-.B \-\-daemon
2240
-option, it will try to delay daemonization until the majority of initialization
2241
-functions which are capable of generating fatal errors are complete.  This means
2242
-that initialization scripts can test the return status of the
2243
-openvpn command for a fairly reliable indication of whether the command
2244
-has correctly initialized and entered the packet forwarding event loop.
2245
-
2246
-In OpenVPN, the vast majority of errors which occur after initialization are non\-fatal.
2247
-
2248
-Note: as soon as OpenVPN has daemonized, it can not ask for usernames,
2249
-passwords, or key pass phrases anymore.  This has certain consequences,
2250
-namely that using a password\-protected private key will fail unless the
2251
-.B \-\-askpass
2252
-option is used to tell OpenVPN to ask for the pass phrase (this
2253
-requirement is new in v2.3.7, and is a consequence of calling daemon()
2254
-before initializing the crypto layer).
2255
-
2256
-Further, using
2257
-.B \-\-daemon
2258
-together with
2259
-.B \-\-auth\-user\-pass
2260
-(entered on console) and
2261
-.B \-\-auth\-nocache
2262
-will fail as soon as key renegotiation (and reauthentication) occurs.
2263
-.\"*********************************************************
2264
-.TP
2265
-.B \-\-syslog [progname]
2266
-Direct log output to system logger, but do not become a daemon.
2267
-See
2268
-.B \-\-daemon
2269
-directive above for description of
2270
-.B progname
2271
-parameter.
2272
-.TP
2273
-.B \-\-errors\-to\-stderr
2274
-Output errors to stderr instead of stdout unless log output is redirected by one of the
2275
-.B \-\-log
2276
-options.
2277
-.\"*********************************************************
2278
-.TP
2279
-.B \-\-passtos
2280
-Set the TOS field of the tunnel packet to what the payload's TOS is.
2281
-.\"*********************************************************
2282
-.TP
2283
-.B \-\-inetd [wait|nowait] [progname]
2284
-Use this option when OpenVPN is being run from the inetd or
2285
-.BR xinetd(8)
2286
-server.
2287
-
2288
-The
2289
-.B wait/nowait
2290
-option must match what is specified in the inetd/xinetd
2291
-config file.  The
2292
-.B nowait
2293
-mode can only be used with
2294
-.B \-\-proto tcp\-server.
2295
-The default is
2296
-.B wait.
2297
-The
2298
-.B nowait
2299
-mode can be used to instantiate the OpenVPN daemon as a classic TCP server,
2300
-where client connection requests are serviced on a single
2301
-port number.  For additional information on this kind of configuration,
2302
-see the OpenVPN FAQ:
2303
-.I http://openvpn.net/faq.html#oneport
2304
-
2305
-This option precludes the use of
2306
-.B \-\-daemon, \-\-local,
2307
-or
2308
-.B \-\-remote.
2309
-Note that this option causes message and error output to be handled in the same
2310
-way as the
2311
-.B \-\-daemon
2312
-option.  The optional
2313
-.B progname
2314
-parameter is also handled exactly as in
2315
-.B \-\-daemon.
2316
-
2317
-Also note that in
2318
-.B wait
2319
-mode, each OpenVPN tunnel requires a separate TCP/UDP port and
2320
-a separate inetd or xinetd entry.  See the OpenVPN 1.x HOWTO for an example
2321
-on using OpenVPN with xinetd:
2322
-.I http://openvpn.net/1xhowto.html
2323
-.\"*********************************************************
2324
-.TP
2325
-.B \-\-log file
2326
-Output logging messages to
2327
-.B file,
2328
-including output to stdout/stderr which
2329
-is generated by called scripts.
2330
-If
2331
-.B file
2332
-already exists it will be truncated.
2333
-This option takes effect
2334
-immediately when it is parsed in the command line
2335
-and will supersede syslog output if
2336
-.B \-\-daemon
2337
-or
2338
-.B \-\-inetd
2339
-is also specified.
2340
-This option is persistent over the entire course of
2341
-an OpenVPN instantiation and will not be reset by SIGHUP,
2342
-SIGUSR1, or
2343
-.B \-\-ping\-restart.
2344
-
2345
-Note that on Windows, when OpenVPN is started as a service,
2346
-logging occurs by default without the need to specify
2347
-this option.
2348
-.\"*********************************************************
2349
-.TP
2350
-.B \-\-log\-append file
2351
-Append logging messages to
2352
-.B file.
2353
-If
2354
-.B file
2355
-does not exist, it will be created.
2356
-This option behaves exactly like
2357
-.B \-\-log
2358
-except that it appends to rather
2359
-than truncating the log file.
2360
-.\"*********************************************************
2361
-.TP
2362
-.B \-\-suppress\-timestamps
2363
-Avoid writing timestamps to log messages, even when they
2364
-otherwise would be prepended. In particular, this applies to
2365
-log messages sent to stdout.
2366
-.\"*********************************************************
2367
-.TP
2368
-.B \-\-machine\-readable\-output
2369
-Always write timestamps and message flags to log messages, even when they
2370
-otherwise would not be prefixed. In particular, this applies to
2371
-log messages sent to stdout.
2372
-.\"*********************************************************
2373
-.TP
2374
-.B \-\-writepid file
2375
-Write OpenVPN's main process ID to
2376
-.B file.
2377
-.\"*********************************************************
2378
-.TP
2379
-.B \-\-nice n
2380
-Change process priority after initialization
2381
-(
2382
-.B n
2383
-greater than 0 is lower priority,
2384
-.B n
2385
-less than zero is higher priority).
2386
-.\"*********************************************************
2387
-.\".TP
2388
-.\".B \-\-nice\-work n
2389
-.\"Change priority of background TLS work thread.  The TLS thread
2390
-.\"feature is enabled when OpenVPN is built
2391
-.\"with pthread support, and you are running OpenVPN
2392
-.\"in TLS mode (i.e. with
2393
-.\".B \-\-tls\-client
2394
-.\"or
2395
-.\".B \-\-tls\-server
2396
-.\"specified).
2397
-.\"
2398
-.\"Using a TLS thread offloads the CPU\-intensive process of SSL/TLS\-based
2399
-.\"key exchange to a background thread so that it does not become
2400
-.\"a latency bottleneck in the tunnel packet forwarding process.
2401
-.\"
2402
-.\"The parameter
2403
-.\".B n
2404
-.\"is interpreted exactly as with the
2405
-.\".B \-\-nice
2406
-.\"option above, but in relation to the work thread rather
2407
-.\"than the main thread.
2408
-.\"*********************************************************
2409
-.TP
2410
-.B \-\-fast\-io
2411
-(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding
2412
-a call to poll/epoll/select prior to the write operation.  The purpose
2413
-of such a call would normally be to block until the device
2414
-or socket is ready to accept the write.  Such blocking is unnecessary
2415
-on some platforms which don't support write blocking on UDP sockets
2416
-or TUN/TAP devices.  In such cases, one can optimize the event loop
2417
-by avoiding the poll/epoll/select call, improving CPU efficiency
2418
-by 5% to 10%.
2419
-
2420
-This option can only be used on non\-Windows systems, when
2421
-.B \-\-proto udp
2422
-is specified, and when
2423
-.B \-\-shaper
2424
-is NOT specified.
2425
-.\"*********************************************************
2426
-.TP
2427
-.B \-\-multihome
2428
-Configure a multi\-homed UDP server.  This option needs to be used when
2429
-a server has more than one IP address (e.g. multiple interfaces, or
2430
-secondary IP addresses), and is not using
2431
-.B \-\-local
2432
-to force binding to one specific address only.  This option will
2433
-add some extra lookups to the packet path to ensure that the UDP reply
2434
-packets are always sent from the address that the client is
2435
-talking to. This is not supported on all platforms, and it adds more
2436
-processing, so it's not enabled by default.
2437
-
2438
-Note: this option is only relevant for UDP servers.
2439
-
2440
-Note 2: if you do an IPv6+IPv4 dual\-stack bind on a Linux machine with
2441
-multiple IPv4 address, connections to IPv4 addresses will not work
2442
-right on kernels before 3.15, due to missing kernel support for the
2443
-IPv4\-mapped case (some distributions have ported this to earlier kernel
2444
-versions, though).
2445
-.\"*********************************************************
2446
-.TP
2447
-.B \-\-echo [parms...]
2448
-Echo
2449
-.B parms
2450
-to log output.
2451
-
2452
-Designed to be used to send messages to a controlling application
2453
-which is receiving the OpenVPN log output.
2454
-.\"*********************************************************
2455
-.TP
2456
-.B \-\-remap\-usr1 signal
2457
-Control whether internally or externally
2458
-generated SIGUSR1 signals are remapped to
2459
-SIGHUP (restart without persisting state) or
2460
-SIGTERM (exit).
2461
-
2462
-.B signal
2463
-can be set to "SIGHUP" or "SIGTERM".  By default, no remapping
2464
-occurs.
2465
-.\"*********************************************************
2466
-.TP
2467
-.B \-\-verb n
2468
-Set output verbosity to
2469
-.B n
2470
-(default=1).  Each level shows all info from the previous levels.
2471
-Level 3 is recommended if you want a good summary
2472
-of what's happening without being swamped by output.
2473
-
2474
-.B 0 \-\-
2475
-No output except fatal errors.
2476
-.br
2477
-.B 1 to 4 \-\-
2478
-Normal usage range.
2479
-.br
2480
-.B 5 \-\-
2481
-Output
2482
-.B R
2483
-and
2484
-.B W
2485
-characters to the console for each packet read and write, uppercase is
2486
-used for TCP/UDP packets and lowercase is used for TUN/TAP packets.
2487
-.br
2488
-.B 6 to 11 \-\-
2489
-Debug info range (see errlevel.h for additional
2490
-information on debug levels).
2491
-.\"*********************************************************
2492
-.TP
2493
-.B \-\-status file [n]
2494
-Write operational status to
2495
-.B file
2496
-every
2497
-.B n
2498
-seconds.
2499
-
2500
-Status can also be written to the syslog by sending a
2501
-.B SIGUSR2
2502
-signal.
2503
-
2504
-With multi\-client capability enabled on a server, the status file includes a
2505
-list of clients and a routing table. The output format can be controlled by the
2506
-.B \-\-status\-version
2507
-option in that case.
2508
-
2509
-For clients or instances running in point\-to\-point mode, it will contain the
2510
-traffic statistics.
2511
-.\"*********************************************************
2512
-.TP
2513
-.B \-\-status\-version [n]
2514
-Set the status file format version number to
2515
-.B n\fR.
2516
-
2517
-This only affects the status file on servers with multi\-client capability
2518
-enabled.
2519
-
2520
-.B 1
2521
-\-\- traditional format (default). The client list contains the following
2522
-fields comma\-separated: Common Name, Real Address, Bytes Received, Bytes Sent,
2523
-Connected Since.
2524
-.br
2525
-.B 2
2526
-\-\- a more reliable format for external processing. Compared to version 1, the
2527
-client list contains some additional fields: Virtual Address, Virtual IPv6
2528
-Address, Username, Client ID, Peer ID, Data Channel Cipher.
2529
-Future versions may extend the number of fields.
2530
-.br
2531
-.B 3
2532
-\-\- identical to 2, but fields are tab\-separated.
2533
-
2534
-.\"*********************************************************
2535
-.TP
2536
-.B \-\-mute n
2537
-Log at most
2538
-.B n
2539
-consecutive messages in the same category.  This is useful to
2540
-limit repetitive logging of similar message types.
2541
-.\"*********************************************************
2542
-.TP
2543
-.B \-\-compress [algorithm]
2544
-Enable a compression algorithm.
2545
-
2546
-The
2547
-.B algorithm
2548
-parameter may be "lzo", "lz4", "lz4\-v2", "stub", "stub\-v2" or empty.
2549
-LZO and LZ4 are different compression algorithms, with LZ4 generally
2550
-offering the best performance with least CPU usage.
2551
-For backwards compatibility with OpenVPN versions before v2.4, use "lzo"
2552
-(which is identical to the older option "\-\-comp\-lzo yes").
2553
-
2554
-The "lz4\-v2" and "stub\-v2" variants implement a better framing that does not add
2555
-overhead when packets cannot be compressed. All other variants always add one extra
2556
-framing byte compared to no compression framing.
2557
-
2558
-If the
2559
-.B algorithm
2560
-parameter is "stub", "stub\-v2", or empty, compression will be turned off, but
2561
-the packet framing for compression will still be enabled, allowing a different
2562
-setting to be pushed later. Additionally, "stub" and "stub\-v2" will disable
2563
-announcing lzo and lz4 compression support via "IV_" variables to the server.
2564
-
2565
-
2566
-.B Security Considerations
2567
-
2568
-Compression and encryption is a tricky combination.  If an attacker knows or is
2569
-able to control (parts of) the plaintext of packets that contain secrets, the
2570
-attacker might be able to extract the secret if compression is enabled.  See
2571
-e.g. the CRIME and BREACH attacks on TLS and VORACLE on VPNs which also leverage
2572
-compression to break encryption.  If you are not entirely sure that the above does
2573
-not apply to your traffic, you are advised to *not* enable compression.
2574
-
2575
-.\"*********************************************************
2576
-.TP
2577
-.B \-\-allow\-compression [mode]
2578
-As described in
2579
-\.B \-\-compress
2580
-option, compression is potentially dangerous option. This option allows
2581
-controlling the behaviour of OpenVPN when compression is used and allowed.
2582
-.B mode
2583
-may be "yes", "no", or "asym" (default).
2584
-
2585
-With allow\-compression set to "no", OpenVPN will refuse any non stub
2586
-compression. With "yes" OpenVPN will send and receive compressed packets.
2587
-With "asym", the default, OpenVPN will only decompress (downlink) packets but
2588
-not compress (uplink) packets. This also allows migrating to disable compression
2589
-when changing both server and client configurations to remove compression at the
2590
-same time is not a feasible option.
2591
-
2592
-The default of asym has been chosen to maximise compatibility with existing
2593
-configuration while at the same time phasing out compression in existing
2594
-deployment by disabling compression on the uplink, effectively completely disabling
2595
-compression if both client and server are upgraded.
2596
-
2597
-.\"*********************************************************
2598
-.TP
2599
-.B \-\-comp\-lzo [mode]
2600
-.B DEPRECATED
2601
-This option will be removed in a future OpenVPN release.  Use the
2602
-newer
2603
-.B \-\-compress
2604
-instead.
2605
-
2606
-Use LZO compression \-\- may add up to 1 byte per
2607
-packet for incompressible data.
2608
-.B mode
2609
-may be "yes", "no", or "adaptive" (default).
2610
-
2611
-In a server mode setup, it is possible to selectively turn
2612
-compression on or off for individual clients.
2613
-
2614
-First, make sure the client\-side config file enables selective
2615
-compression by having at least one
2616
-.B \-\-comp\-lzo
2617
-directive, such as
2618
-.B \-\-comp\-lzo no.
2619
-This will turn off compression by default,
2620
-but allow a future directive push from the server to
2621
-dynamically change the
2622
-on/off/adaptive setting.
2623
-
2624
-Next in a
2625
-.B \-\-client\-config\-dir
2626
-file, specify the compression setting for the client,
2627
-for example:
2628
-
2629
-.nf
2630
-.ft 3
2631
-.in +4
2632
-comp\-lzo yes
2633
-push "comp\-lzo yes"
2634
-.in -4
2635
-.ft
2636
-.fi
2637
-
2638
-The first line sets the
2639
-.B comp\-lzo
2640
-setting for the server
2641
-side of the link, the second sets the client side.
2642
-.\"*********************************************************
2643
-.TP
2644
-.B \-\-comp\-noadapt
2645
-When used in conjunction with
2646
-.B \-\-comp\-lzo,
2647
-this option will disable OpenVPN's adaptive compression algorithm.
2648
-Normally, adaptive compression is enabled with
2649
-.B \-\-comp\-lzo.
2650
-
2651
-Adaptive compression tries to optimize the case where you have
2652
-compression enabled, but you are sending predominantly incompressible
2653
-(or pre\-compressed) packets over the tunnel, such as an FTP or rsync transfer
2654
-of a large, compressed file.  With adaptive compression,
2655
-OpenVPN will periodically sample the compression process to measure its
2656
-efficiency.  If the data being sent over the tunnel is already compressed,
2657
-the compression efficiency will be very low, triggering openvpn to disable
2658
-compression for a period of time until the next re\-sample test.
2659
-.\"*********************************************************
2660
-.TP
2661
-.B \-\-management socket\-name unix [pw\-file] \ \ \ \ \ (recommended)
2662
-.TQ
2663
-.B \-\-management IP port [pw\-file]
2664
-Enable a management server on a
2665
-.B socket\-name
2666
-Unix socket on those platforms supporting it, or on
2667
-a designated TCP port.
2668
-
2669
-.B pw\-file
2670
-, if specified, is a password file where the password must be on first line.
2671
-Instead of a filename it can use the keyword stdin which will prompt the user
2672
-for a password to use when OpenVPN is starting.
2673
-
2674
-For unix sockets, the  default  behaviour  is to create a unix domain socket
2675
-that may be connected to by any process.  Use the
2676
-.B \-\-management\-client\-user
2677
-and
2678
-.B \-\-management\-client\-group
2679
-directives to restrict access.
2680
-
2681
-The management interface provides a special mode where the TCP management link
2682
-can operate over the tunnel itself.  To enable this mode, set IP to
2683
-.B tunnel.
2684
-Tunnel mode will cause the  management interface to listen for a
2685
-TCP connection on the local VPN address of the TUN/TAP interface.
2686
-
2687
-.B BEWARE
2688
-of enabling the management interface over TCP.  In  these cases you should
2689
-.I ALWAYS
2690
-make use of
2691
-.B pw\-file
2692
-to password protect the management interface.  Any user who can connect to this
2693
-TCP
2694
-.B IP:port
2695
-will be able to manage and control (and interfere with) the OpenVPN process.
2696
-It is also strongly recommended to set IP to 127.0.0.1 (localhost) to restrict
2697
-accessibility of the management server to local clients.
2698
-
2699
-While the management port is designed for  programmatic control of OpenVPN by
2700
-other applications, it is possible to telnet to the port, using a telnet client
2701
-in "raw" mode.  Once  connected, type "help" for a list of commands.
2702
-
2703
-For detailed documentation on the management interface, see the
2704
-.I management\-notes.txt
2705
-file in the management folder of the OpenVPN source distribution.
2706
-
2707
-.TP
2708
-.B \-\-management\-client
2709
-Management interface will connect as a TCP/unix domain client to
2710
-.B IP:port
2711
-specified by
2712
-.B \-\-management
2713
-rather than listen as a TCP server or on a unix domain socket.
2714
-
2715
-If the client connection fails to connect or is disconnected,
2716
-a SIGTERM signal will be generated causing OpenVPN to quit.
2717
-.\"*********************************************************
2718
-.TP
2719
-.B \-\-management\-query\-passwords
2720
-Query management channel for private key password and
2721
-.B \-\-auth\-user\-pass
2722
-username/password.  Only query the management channel
2723
-for inputs which ordinarily would have been queried from the
2724
-console.
2725
-.\"*********************************************************
2726
-.TP
2727
-.B \-\-management\-query\-proxy
2728
-Query management channel for proxy server information for a specific
2729
-.B \-\-remote
2730
-(client\-only).
2731
-.\"*********************************************************
2732
-.TP
2733
-.B \-\-management\-query\-remote
2734
-Allow management interface to override
2735
-.B \-\-remote
2736
-directives (client\-only).
2737
-.\"*********************************************************
2738
-.TP
2739
-.B \-\-management\-external\-key [nopadding] [pkcs1]
2740
-Allows usage for external private key file instead of
2741
-.B \-\-key
2742
-option (client\-only). The optional parameters
2743
-.B nopadding
2744
-and
2745
-.B pkcs1
2746
-signal support for different padding algorithms. See
2747
-doc/mangement-notes.txt for a complete description of this
2748
-feature.
2749
-.\"*********************************************************
2750
-.TP
2751
-.B \-\-management\-external\-cert certificate\-hint
2752
-Allows usage for external certificate instead of
2753
-.B \-\-cert
2754
-option (client\-only).
2755
-.B certificate\-hint
2756
-is an arbitrary string which is passed to a management
2757
-interface client as an argument of NEED\-CERTIFICATE notification.
2758
-Requires \-\-management\-external\-key.
2759
-.\"*********************************************************
2760
-.TP
2761
-.B \-\-management\-forget\-disconnect
2762
-Make OpenVPN forget passwords when management session
2763
-disconnects.
2764
-
2765
-This directive does not affect the
2766
-.B \-\-http\-proxy
2767
-username/password.  It is always cached.
2768
-.\"*********************************************************
2769
-.TP
2770
-.B \-\-management\-hold
2771
-Start OpenVPN in a hibernating state, until a client
2772
-of the management interface explicitly starts it
2773
-with the
2774
-.B hold release
2775
-command.
2776
-.\"*********************************************************
2777
-.TP
2778
-.B \-\-management\-signal
2779
-Send SIGUSR1 signal to OpenVPN if management session disconnects.
2780
-This is useful when you wish to disconnect an OpenVPN session on
2781
-user logoff. For \-\-management\-client this option is not needed since
2782
-a disconnect will always generate a SIGTERM.
2783
-.\"*********************************************************
2784
-.TP
2785
-.B \-\-management\-log\-cache n
2786
-Cache the most recent
2787
-.B n
2788
-lines of log file history for usage
2789
-by the management channel.
2790
-.\"*********************************************************
2791
-.TP
2792
-.B \-\-management\-up\-down
2793
-Report tunnel up/down events to management interface.
2794
-.B 
2795
-.\"*********************************************************
2796
-.TP
2797
-.B \-\-management\-client\-auth
2798
-Gives management interface client the responsibility
2799
-to authenticate clients after their client certificate
2800
-has been verified.  See management\-notes.txt in OpenVPN
2801
-distribution for detailed notes.
2802
-.\"*********************************************************
2803
-.TP
2804
-.B \-\-management\-client\-pf
2805
-Management interface clients must specify a packet
2806
-filter file for each connecting client.  See management\-notes.txt
2807
-in OpenVPN distribution for detailed notes.
2808
-.\"*********************************************************
2809
-.TP
2810
-.B \-\-management\-client\-user u
2811
-When the management interface is listening on a unix domain socket,
2812
-only allow connections from user
2813
-.B u.
2814
-.\"*********************************************************
2815
-.TP
2816
-.B \-\-management\-client\-group g
2817
-When the management interface is listening on a unix domain socket,
2818
-only allow connections from group
2819
-.B g.
2820
-.\"*********************************************************
2821
-.TP
2822
-.B \-\-plugin module\-pathname [init\-string]
2823
-Load plug\-in module from the file
2824
-.B module\-pathname,
2825
-passing
2826
-.B init\-string
2827
-as an argument
2828
-to the module initialization function.  Multiple
2829
-plugin modules may be loaded into one OpenVPN
2830
-process.
2831
-
2832
-The
2833
-.B module\-pathname
2834
-argument can be just a filename or a filename with a relative
2835
-or absolute path.  The format of the filename and path defines
2836
-if the plug\-in will be loaded from a default plug\-in directory
2837
-or outside this directory.
2838
-
2839
-.nf
2840
-.ft 3
2841
-.in +4
2842
-.B \-\-plugin path\ \ \ \ \ \ \ \ Effective directory used
2843
-====================================================
2844
- myplug.so            DEFAULT_DIR/myplug.so
2845
- subdir/myplug.so     DEFAULT_DIR/subdir/myplug.so
2846
- ./subdir/myplug.so   CWD/subdir/myplug.so
2847
- /usr/lib/my/plug.so  /usr/lib/my/plug.so
2848
-.in -4
2849
-.fi
2850
-
2851
-DEFAULT_DIR is replaced by the default plug\-in directory,
2852
-which is configured at the build time of OpenVPN.  CWD is the
2853
-current directory where OpenVPN was started or the directory
2854
-OpenVPN have switched into via the
2855
-.B \-\-cd
2856
-option before the
2857
-.B \-\-plugin
2858
-option.
2859
-
2860
-For more information and examples on how to build OpenVPN
2861
-plug\-in modules, see the README file in the
2862
-.B plugin
2863
-folder of the OpenVPN source distribution.
2864
-
2865
-If you are using an RPM install of OpenVPN, see
2866
-/usr/share/openvpn/plugin.  The documentation is
2867
-in
2868
-.B doc
2869
-and the actual plugin modules are in
2870
-.B lib.
2871
-
2872
-Multiple plugin modules can be cascaded, and modules can be
2873
-used in tandem with scripts.  The modules will be called by
2874
-OpenVPN in the order that they are declared in the config
2875
-file.  If both a plugin and script are configured for the same
2876
-callback, the script will be called last.  If the
2877
-return code of the module/script controls an authentication
2878
-function (such as tls\-verify, auth\-user\-pass\-verify, or
2879
-client\-connect), then
2880
-every module and script must return success (0) in order for
2881
-the connection to be authenticated.
2882
-.\"*********************************************************
2883
-.TP
2884
-.B \-\-keying\-material\-exporter label len
2885
-Save Exported Keying Material [RFC5705] of len bytes (must be
2886
-between 16 and 4095 bytes) using label in environment
2887
-(exported_keying_material) for use by plugins in
2888
-OPENVPN_PLUGIN_TLS_FINAL callback.
2889
-
2890
-Note that exporter labels have the potential to collide with existing PRF
2891
-labels. In order to prevent this, labels MUST begin with "EXPORTER".
2892
-
2893
-.\"*********************************************************
2894
-.SS Server Mode
2895
-Starting with OpenVPN 2.0, a multi\-client TCP/UDP server mode
2896
-is supported, and can be enabled with the
2897
-.B \-\-mode server
2898
-option.  In server mode, OpenVPN will listen on a single
2899
-port for incoming client connections.  All client
2900
-connections will be routed through a single tun or tap
2901
-interface.  This mode is designed for scalability and should
2902
-be able to support hundreds or even thousands of clients
2903
-on sufficiently fast hardware.  SSL/TLS authentication must
2904
-be used in this mode.
2905
-.\"*********************************************************
2906
-.TP
2907
-.B \-\-server network netmask ['nopool']
2908
-A helper directive designed to simplify the configuration
2909
-of OpenVPN's server mode.  This directive will set up an
2910
-OpenVPN server which will allocate addresses to clients
2911
-out of the given network/netmask.  The server itself
2912
-will take the ".1" address of the given network
2913
-for use as the server\-side endpoint of the local
2914
-TUN/TAP interface.
2915
-
2916
-For example,
2917
-.B \-\-server 10.8.0.0 255.255.255.0
2918
-expands as follows:
2919
-
2920
-.nf
2921
-.ft 3
2922
-.in +4
2923
- mode server
2924
- tls\-server
2925
- push "topology [topology]"
2926
-
2927
- if dev tun AND (topology == net30 OR topology == p2p):
2928
-   ifconfig 10.8.0.1 10.8.0.2
2929
-   if !nopool:
2930
-     ifconfig\-pool 10.8.0.4 10.8.0.251
2931
-   route 10.8.0.0 255.255.255.0
2932
-   if client\-to\-client:
2933
-     push "route 10.8.0.0 255.255.255.0"
2934
-   else if topology == net30:
2935
-     push "route 10.8.0.1"
2936
-
2937
- if dev tap OR (dev tun AND topology == subnet):
2938
-   ifconfig 10.8.0.1 255.255.255.0
2939
-   if !nopool:
2940
-     ifconfig\-pool 10.8.0.2 10.8.0.253 255.255.255.0
2941
-   push "route\-gateway 10.8.0.1"
2942
-   if route\-gateway unset:
2943
-     route\-gateway 10.8.0.2
2944
-
2945
-.in -4
2946
-.ft
2947
-.fi
2948
-
2949
-Don't use
2950
-.B \-\-server
2951
-if you are ethernet bridging.  Use
2952
-.B \-\-server\-bridge
2953
-instead.
2954
-.\"*********************************************************
2955
-.TP
2956
-.B \-\-server\-bridge gateway netmask pool\-start\-IP pool\-end\-IP
2957
-.TP
2958
-.B \-\-server\-bridge ['nogw']
2959
-
2960
-A helper directive similar to
2961
-.B \-\-server
2962
-which is designed to simplify the configuration
2963
-of OpenVPN's server mode in ethernet bridging configurations.
2964
-
2965
-If
2966
-.B \-\-server\-bridge
2967
-is used without any parameters, it will enable a DHCP\-proxy
2968
-mode, where connecting OpenVPN clients will receive an IP
2969
-address for their TAP adapter from the DHCP server running
2970
-on the OpenVPN server\-side LAN.
2971
-Note that only clients that support
2972
-the binding of a DHCP client with the TAP adapter (such as
2973
-Windows) can support this mode.  The optional 
2974
-.B nogw
2975
-flag (advanced) indicates that gateway information should not be
2976
-pushed to the client.
2977
-
2978
-To configure ethernet bridging, you 
2979
-must first use your OS's bridging capability
2980
-to bridge the TAP interface with the ethernet
2981
-NIC interface.  For example, on Linux this is done
2982
-with the
2983
-.B brctl
2984
-tool, and with Windows XP it is done in the Network
2985
-Connections Panel by selecting the ethernet and
2986
-TAP adapters and right\-clicking on "Bridge Connections".
2987
-
2988
-Next you you must manually set the
2989
-IP/netmask on the bridge interface.  The
2990
-.B gateway
2991
-and
2992
-.B netmask
2993
-parameters to
2994
-.B \-\-server\-bridge
2995
-can be set to either the IP/netmask of the
2996
-bridge interface, or the IP/netmask of the
2997
-default gateway/router on the bridged
2998
-subnet.
2999
-
3000
-Finally, set aside a IP range in the bridged
3001
-subnet,
3002
-denoted by
3003
-.B pool\-start\-IP
3004
-and
3005
-.B pool\-end\-IP,
3006
-for OpenVPN to allocate to connecting
3007
-clients.
3008
-
3009
-For example,
3010
-.B server\-bridge 10.8.0.4 255.255.255.0 10.8.0.128 10.8.0.254
3011
-expands as follows:
3012
-
3013
-.nf
3014
-.ft 3
3015
-.in +4
3016
-mode server
3017
-tls\-server
3018
-
3019
-ifconfig\-pool 10.8.0.128 10.8.0.254 255.255.255.0
3020
-push "route\-gateway 10.8.0.4"
3021
-.in -4
3022
-.ft
3023
-.fi
3024
-
3025
-In another example,
3026
-.B \-\-server\-bridge
3027
-(without parameters) expands as follows:
3028
-
3029
-.nf
3030
-.ft 3
3031
-.in +4
3032
-mode server
3033
-tls\-server
3034
-
3035
-push "route\-gateway dhcp"
3036
-.in -4
3037
-.ft
3038
-.fi
3039
-
3040
-Or
3041
-.B \-\-server\-bridge nogw
3042
-expands as follows:
3043
-
3044
-.nf
3045
-.ft 3
3046
-.in +4
3047
-mode server
3048
-tls\-server
3049
-.in -4
3050
-.ft
3051
-.fi
3052
-.\"*********************************************************
3053
-.TP
3054
-.B \-\-push "option"
3055
-Push a config file option back to the client for remote
3056
-execution.  Note that
3057
-.B
3058
-option
3059
-must be enclosed in double quotes ("").  The client must specify
3060
-.B \-\-pull
3061
-in its config file.  The set of options which can be
3062
-pushed is limited by both feasibility and security.
3063
-Some options such as those which would execute scripts
3064
-are banned, since they would effectively allow a compromised
3065
-server to execute arbitrary code on the client.
3066
-Other options such as TLS or MTU parameters
3067
-cannot be pushed because the client needs to know
3068
-them before the connection to the server can be initiated.
3069
-
3070
-This is a partial list of options which can currently be pushed:
3071
-.B \-\-route, \-\-route\-gateway, \-\-route\-delay, \-\-redirect\-gateway,
3072
-.B \-\-ip\-win32, \-\-dhcp\-option,
3073
-.B \-\-inactive, \-\-ping, \-\-ping\-exit, \-\-ping\-restart,
3074
-.B \-\-setenv,
3075
-.B \-\-auth\-token,
3076
-.B \-\-persist\-key, \-\-persist\-tun, \-\-echo,
3077
-.B \-\-comp\-lzo,
3078
-.B \-\-socket\-flags,
3079
-.B \-\-sndbuf, \-\-rcvbuf
3080
-.\"*********************************************************
3081
-.TP
3082
-.B \-\-push\-reset
3083
-Don't inherit the global push list for a specific client instance.
3084
-Specify this option in a client\-specific context such
3085
-as with a
3086
-.B \-\-client\-config\-dir
3087
-configuration file.  This option will ignore
3088
-.B \-\-push
3089
-options at the global config file level.
3090
-.\"*********************************************************
3091
-.TP
3092
-.B \-\-push\-remove opt
3093
-selectively remove all
3094
-.B \-\-push
3095
-options matching "opt" from the option list for a client.  "opt" is matched
3096
-as a substring against the whole option string to\-be\-pushed to the client, so
3097
-.B \-\-push\-remove route
3098
-would remove all
3099
-.B \-\-push route ...
3100
-and
3101
-.B \-\-push route\-ipv6 ...
3102
-statements, while
3103
-.B \-\-push\-remove 'route\-ipv6 2001:'
3104
-would only remove IPv6 routes for 2001:... networks.
3105
-
3106
-.B \-\-push\-remove
3107
-can only be used in a client\-specific context, like in a
3108
-.B \-\-client\-config\-dir
3109
-file, or
3110
-.B \-\-client\-connect
3111
-script or plugin \-\- similar to
3112
-.B \-\-push\-reset,
3113
-just more selective.
3114
-
3115
-NOTE: to
3116
-.I change
3117
-an option,
3118
-.B \-\-push\-remove
3119
-can be used to first remove the old value, and then add a new
3120
-.B \-\-push
3121
-option with the new value.
3122
-
3123
-NOTE2: due to implementation details, 'ifconfig' and 'ifconfig-ipv6'
3124
-can only be removed with an exact match on the option ("push-remove ifconfig"),
3125
-no substring matching and no matching on the IPv4/IPv6 address argument
3126
-is possible.
3127
-.\"*********************************************************
3128
-.TP
3129
-.B \-\-push\-peer\-info
3130
-Push additional information about the client to server.
3131
-The following data is always pushed to the server:
3132
-
3133
-IV_VER=<version> \-\- the client OpenVPN version
3134
-
3135
-IV_PLAT=[linux|solaris|openbsd|mac|netbsd|freebsd|win] \-\- the client OS platform
3136
-
3137
-IV_LZO_STUB=1 \-\- if client was built with LZO stub capability
3138
-
3139
-IV_LZ4=1 \-\- if the client supports LZ4 compressions.
3140
-
3141
-IV_PROTO=2 \-\- if the client supports peer\-id floating mechanism
3142
-
3143
-IV_NCP=2 \-\- negotiable ciphers, client supports
3144
-.B \-\-cipher
3145
-pushed by the server, a value of 2 or greater indicates client
3146
-supports AES\-GCM\-128 and AES\-GCM\-256.
3147
-
3148
-IV_CIPHERS=<ncp\-ciphers> \-\- the client pushes the list of configured
3149
-ciphers with the
3150
-\.B -\-\ncp\-ciphers
3151
-option to the server.
3152
-
3153
-IV_GUI_VER=<gui_id> <version> \-\- the UI version of a UI if one is
3154
-running, for example "de.blinkt.openvpn 0.5.47" for the
3155
-Android app.
3156
-
3157
-When
3158
-.B \-\-push\-peer\-info
3159
-is enabled the additional information consists of the following data:
3160
-
3161
-IV_HWADDR=<mac address> \-\- the MAC address of clients default gateway
3162
-
3163
-IV_SSL=<version string> \-\- the ssl version used by the client, e.g. "OpenSSL 1.0.2f 28 Jan 2016".
3164
-
3165
-IV_PLAT_VER=x.y \- the version of the operating system, e.g. 6.1 for Windows 7.
3166
-
3167
-UV_<name>=<value> \-\- client environment variables whose names start with "UV_"
3168
-.\"*********************************************************
3169
-.TP
3170
-.B \-\-disable
3171
-Disable a particular client (based on the common name)
3172
-from connecting.  Don't use this option to disable a client
3173
-due to key or password compromise.  Use a CRL (certificate
3174
-revocation list) instead (see the
3175
-.B \-\-crl\-verify
3176
-option).
3177
-
3178
-This option must be associated with a specific client instance,
3179
-which means that it must be specified either in a client
3180
-instance config file using
3181
-.B \-\-client\-config\-dir
3182
-or dynamically generated using a
3183
-.B \-\-client\-connect
3184
-script.
3185
-.\"*********************************************************
3186
-.TP
3187
-.B \-\-ifconfig\-pool start\-IP end\-IP [netmask]
3188
-Set aside a pool of subnets to be
3189
-dynamically allocated to connecting clients, similar
3190
-to a DHCP server.  For tun\-style
3191
-tunnels, each client will be given a /30 subnet (for
3192
-interoperability with Windows clients).  For tap\-style
3193
-tunnels, individual addresses will be allocated, and the
3194
-optional
3195
-.B netmask
3196
-parameter will also be pushed to clients.
3197
-
3198
-.\"*********************************************************
3199
-.TP
3200
-.B \-\-ifconfig\-pool\-persist file [seconds]
3201
-Persist/unpersist ifconfig\-pool
3202
-data to
3203
-.B file,
3204
-at
3205
-.B seconds
3206
-intervals (default=600), as well as on program startup and
3207
-shutdown.
3208
-
3209
-The goal of this option is to provide a long\-term association
3210
-between clients (denoted by their common name) and the virtual
3211
-IP address assigned to them from the ifconfig\-pool.
3212
-Maintaining a long\-term
3213
-association is good for clients because it allows them
3214
-to effectively use the
3215
-.B \-\-persist\-tun
3216
-option.
3217
-
3218
-.B file
3219
-is a comma\-delimited ASCII file, formatted as
3220
-<Common\-Name>,<IP\-address>.
3221
-
3222
-If
3223
-.B seconds
3224
-= 0,
3225
-.B file
3226
-will be treated as read\-only.  This is useful if
3227
-you would like to treat
3228
-.B file
3229
-as a configuration file.
3230
-
3231
-Note that the entries in this file are treated by OpenVPN as
3232
-suggestions only, based on past associations between
3233
-a common name and IP address.  They do not guarantee that the given common
3234
-name will always receive the given IP address.  If you want guaranteed
3235
-assignment, use
3236
-.B \-\-ifconfig\-push
3237
-
3238
-.\"*********************************************************
3239
-.TP
3240
-.B \-\-ifconfig\-pool\-linear
3241
-.B DEPRECATED
3242
-This option will be removed in OpenVPN 2.5
3243
-
3244
-Modifies the
3245
-.B \-\-ifconfig\-pool
3246
-directive to
3247
-allocate individual TUN interface addresses for
3248
-clients rather than /30 subnets.  NOTE:  This option
3249
-is incompatible with Windows clients.
3250
-
3251
-This option is deprecated, and should be replaced with
3252
-.B \-\-topology p2p
3253
-which is functionally equivalent.
3254
-.\"*********************************************************
3255
-.TP
3256
-.B \-\-ifconfig\-push local remote\-netmask [alias]
3257
-Push virtual IP endpoints for client tunnel,
3258
-overriding the \-\-ifconfig\-pool dynamic allocation.
3259
-
3260
-The parameters
3261
-.B local
3262
-and
3263
-.B remote\-netmask
3264
-are set according to the
3265
-.B \-\-ifconfig
3266
-directive which you want to execute on the client machine to
3267
-configure the remote end of the tunnel.  Note that the parameters
3268
-.B local
3269
-and
3270
-.B remote\-netmask
3271
-are from the perspective of the client, not the server.  They may be
3272
-DNS names rather than IP addresses, in which case they will be resolved
3273
-on the server at the time of client connection.
3274
-
3275
-The optional
3276
-.B alias
3277
-parameter may be used in cases where NAT causes the client view
3278
-of its local endpoint to differ from the server view.  In this case
3279
-.B local/remote\-netmask
3280
-will refer to the server view while
3281
-.B alias/remote\-netmask
3282
-will refer to the client view.
3283
-
3284
-This option must be associated with a specific client instance,
3285
-which means that it must be specified either in a client
3286
-instance config file using
3287
-.B \-\-client\-config\-dir
3288
-or dynamically generated using a
3289
-.B \-\-client\-connect
3290
-script.
3291
-
3292
-Remember also to include a
3293
-.B \-\-route
3294
-directive in the main OpenVPN config file which encloses
3295
-.B local,
3296
-so that the kernel will know to route it
3297
-to the server's TUN/TAP interface.
3298
-
3299
-OpenVPN's internal client IP address selection algorithm works as
3300
-follows:
3301
-
3302
-.B 1
3303
-\-\- Use
3304
-.B \-\-client\-connect script
3305
-generated file for static IP (first choice).
3306
-.br
3307
-.B 2
3308
-\-\- Use
3309
-.B \-\-client\-config\-dir
3310
-file for static IP (next choice).
3311
-.br
3312
-.B 3
3313
-\-\- Use
3314
-.B \-\-ifconfig\-pool
3315
-allocation for dynamic IP (last choice).
3316
-.br
3317
-.\"*********************************************************
3318
-.TP
3319
-.B \-\-iroute network [netmask]
3320
-Generate an internal route to a specific
3321
-client. The
3322
-.B netmask
3323
-parameter, if omitted, defaults to 255.255.255.255.
3324
-
3325
-This directive can be used to route a fixed subnet from
3326
-the server to a particular client, regardless
3327
-of where the client is connecting from.  Remember
3328
-that you must also add the route to the system
3329
-routing table as well (such as by using the
3330
-.B \-\-route
3331
-directive).  The reason why two routes are needed
3332
-is that the
3333
-.B \-\-route
3334
-directive routes the packet from the kernel
3335
-to OpenVPN.  Once in OpenVPN, the
3336
-.B \-\-iroute
3337
-directive routes to the specific client.
3338
-
3339
-This option must be specified either in a client
3340
-instance config file using
3341
-.B \-\-client\-config\-dir
3342
-or dynamically generated using a
3343
-.B \-\-client\-connect
3344
-script.
3345
-
3346
-The
3347
-.B \-\-iroute
3348
-directive also has an important interaction with
3349
-.B \-\-push
3350
-"route ...".
3351
-.B \-\-iroute
3352
-essentially defines a subnet which is owned by a
3353
-particular client (we will call this client A).
3354
-If you would like other clients to be able to reach A's
3355
-subnet, you can use
3356
-.B \-\-push
3357
-"route ..."
3358
-together with
3359
-.B \-\-client\-to\-client
3360
-to effect this.  In order for all clients to see
3361
-A's subnet, OpenVPN must push this route to all clients
3362
-EXCEPT for A, since the subnet is already owned by A.
3363
-OpenVPN accomplishes this by not
3364
-not pushing a route to a client
3365
-if it matches one of the client's iroutes.
3366
-.\"*********************************************************
3367
-.TP
3368
-.B \-\-client\-to\-client
3369
-Because the OpenVPN server mode handles multiple clients
3370
-through a single tun or tap interface, it is effectively
3371
-a router.  The
3372
-.B \-\-client\-to\-client
3373
-flag tells OpenVPN to internally route client\-to\-client
3374
-traffic rather than pushing all client\-originating traffic
3375
-to the TUN/TAP interface.
3376
-
3377
-When this option is used, each client will "see" the other
3378
-clients which are currently connected.  Otherwise, each
3379
-client will only see the server.  Don't use this option
3380
-if you want to firewall tunnel traffic using
3381
-custom, per\-client rules.
3382
-.\"*********************************************************
3383
-.TP
3384
-.B \-\-duplicate\-cn
3385
-Allow multiple clients with the same common name to concurrently connect.
3386
-In the absence of this option, OpenVPN will disconnect a client instance
3387
-upon connection of a new client having the same common name.
3388
-.\"*********************************************************
3389
-.TP
3390
-.B \-\-client\-connect cmd
3391
-Run
3392
-.B command cmd
3393
-on client connection.
3394
-
3395
-.B cmd
3396
-consists of a path to script (or executable program), optionally
3397
-followed by arguments. The path and arguments may be single\- or double\-quoted
3398
-and/or escaped using a backslash, and should be separated by one or more spaces.
3399
-
3400
-The command is passed the common name
3401
-and IP address of the just\-authenticated client
3402
-as environmental variables (see environmental variable section
3403
-below).  The command is also passed
3404
-the pathname of a freshly created temporary file as the last argument
3405
-(after any arguments specified in
3406
-.B cmd
3407
-), to be used by the command
3408
-to pass dynamically generated config file directives back to OpenVPN.
3409
-
3410
-If the script wants to generate a dynamic config file
3411
-to be applied on the server when the client connects,
3412
-it should write it to the file named by the last argument.
3413
-
3414
-See the
3415
-.B \-\-client\-config\-dir
3416
-option below for options which
3417
-can be legally used in a dynamically generated config file.
3418
-
3419
-Note that the return value of
3420
-.B script
3421
-is significant.  If
3422
-.B script
3423
-returns a non\-zero error status, it will cause the client
3424
-to be disconnected.
3425
-.\"*********************************************************
3426
-.TP
3427
-.B \-\-client\-disconnect cmd
3428
-Like
3429
-.B \-\-client\-connect
3430
-but called on client instance shutdown.  Will not be called
3431
-unless the
3432
-.B \-\-client\-connect
3433
-script and plugins (if defined)
3434
-were previously called on this instance with
3435
-successful (0) status returns.
3436
-
3437
-The exception to this rule is if the
3438
-.B \-\-client\-disconnect
3439
-command or plugins are cascaded, and at least one client\-connect
3440
-function succeeded, then ALL of the client\-disconnect functions for
3441
-scripts and plugins will be called on client instance object deletion,
3442
-even in cases where some of the related client\-connect functions returned
3443
-an error status.
3444
-
3445
-The
3446
-.B \-\-client\-disconnect
3447
-command is passed the same pathname as the corresponding
3448
-.B \-\-client\-connect
3449
-command as its last argument. (after any arguments specified in
3450
-.B cmd
3451
-).
3452
-.B 
3453
-.\"*********************************************************
3454
-.TP
3455
-.B \-\-client\-config\-dir dir
3456
-Specify a directory
3457
-.B dir
3458
-for custom client config files.  After
3459
-a connecting client has been authenticated, OpenVPN will
3460
-look in this directory for a file having the same name
3461
-as the client's X509 common name.  If a matching file
3462
-exists, it will be opened and parsed for client\-specific
3463
-configuration options.  If no matching file is found, OpenVPN
3464
-will instead try to open and parse a default file called
3465
-"DEFAULT", which may be provided but is not required. Note that
3466
-the configuration files must be readable by the OpenVPN process
3467
-after it has dropped it's root privileges.
3468
-
3469
-This file can specify a fixed IP address for a given
3470
-client using
3471
-.B \-\-ifconfig\-push,
3472
-as well as fixed subnets owned by the client using
3473
-.B \-\-iroute.
3474
-
3475
-One of the useful properties of this option is that it
3476
-allows client configuration files to be conveniently
3477
-created, edited, or removed while the server is live,
3478
-without needing to restart the server.
3479
-
3480
-The following
3481
-options are legal in a client\-specific context:
3482
-.B \-\-push, \-\-push\-reset, \-\-push\-remove, \-\-iroute,
3483
-.B \-\-ifconfig\-push, \-\-vlan\-pvid
3484
-and
3485
-.B \-\-config.
3486
-.\"*********************************************************
3487
-.TP
3488
-.B \-\-ccd\-exclusive
3489
-Require, as a
3490
-condition of authentication, that a connecting client has a
3491
-.B \-\-client\-config\-dir
3492
-file.
3493
-.\"*********************************************************
3494
-.TP
3495
-.B \-\-tmp\-dir dir
3496
-Specify a directory
3497
-.B dir
3498
-for temporary files.  This directory will be used by
3499
-openvpn processes and script to communicate temporary
3500
-data with openvpn main process. Note that
3501
-the directory must be writable by the OpenVPN process
3502
-after it has dropped it's root privileges.
3503
-
3504
-This directory will be used by in the following cases:
3505
-
3506
-*
3507
-.B \-\-client\-connect
3508
-scripts to dynamically generate client\-specific
3509
-configuration files.
3510
-
3511
-*
3512
-.B OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY
3513
-plugin hook to return success/failure via auth_control_file
3514
-when using deferred auth method
3515
-
3516
-*
3517
-.B OPENVPN_PLUGIN_ENABLE_PF
3518
-plugin hook to pass filtering rules via pf_file
3519
-.\"*********************************************************
3520
-.TP
3521
-.B \-\-hash\-size r v
3522
-Set the size of the real address hash table to
3523
-.B r
3524
-and the virtual address table to
3525
-.B v.
3526
-By default, both tables are sized at 256 buckets.
3527
-.\"*********************************************************
3528
-.TP
3529
-.B \-\-bcast\-buffers n
3530
-Allocate
3531
-.B n
3532
-buffers for broadcast datagrams (default=256).
3533
-.\"*********************************************************
3534
-.TP
3535
-.B \-\-tcp\-queue\-limit n
3536
-Maximum number of output packets queued before TCP (default=64).
3537
-
3538
-When OpenVPN is tunneling data from a TUN/TAP device to a
3539
-remote client over a TCP connection, it is possible that the TUN/TAP device
3540
-might produce data at a faster rate than the TCP connection
3541
-can support.  When the number of output packets queued before sending to
3542
-the TCP socket reaches this limit for a given client connection,
3543
-OpenVPN will start to drop outgoing packets directed
3544
-at this client.
3545
-.\"*********************************************************
3546
-.TP
3547
-.B \-\-tcp\-nodelay
3548
-This macro sets the TCP_NODELAY socket flag on the server
3549
-as well as pushes it to connecting clients.  The TCP_NODELAY
3550
-flag disables the Nagle algorithm on TCP sockets causing
3551
-packets to be transmitted immediately with low latency,
3552
-rather than waiting a short period of time in order
3553
-to aggregate several packets into a larger containing
3554
-packet.  In VPN applications over TCP, TCP_NODELAY
3555
-is generally a good latency optimization.
3556
-
3557
-The macro expands as follows:
3558
-
3559
-.nf
3560
-.ft 3
3561
-.in +4
3562
- if mode server:
3563
-   socket\-flags TCP_NODELAY
3564
-   push "socket\-flags TCP_NODELAY"
3565
-.in -4
3566
-.ft
3567
-.fi
3568
-.\"*********************************************************
3569
-.TP
3570
-.B \-\-max\-clients n
3571
-Limit server to a maximum of
3572
-.B n
3573
-concurrent clients.
3574
-.\"*********************************************************
3575
-.TP
3576
-.B \-\-max\-routes\-per\-client n
3577
-Allow a maximum of
3578
-.B n
3579
-internal routes per client (default=256).
3580
-This is designed to
3581
-help contain DoS attacks where an authenticated client floods the
3582
-server with packets appearing to come from many unique MAC addresses,
3583
-forcing the server to deplete
3584
-virtual memory as its internal routing table expands.
3585
-This directive can be used in a
3586
-.B \-\-client\-config\-dir
3587
-file or auto\-generated by a
3588
-.B \-\-client\-connect
3589
-script to override the global value for a particular client.
3590
-
3591
-Note that this
3592
-directive affects OpenVPN's internal routing table, not the
3593
-kernel routing table.
3594
-.\"*********************************************************
3595
-.TP
3596
-.B \-\-stale\-routes\-check n [t]
3597
-Remove routes haven't had activity for
3598
-.B n
3599
-seconds (i.e. the ageing time).
3600
-
3601
-This check is ran every
3602
-.B t
3603
-seconds (i.e. check interval).
3604
-
3605
-If
3606
-.B t
3607
-is not present it defaults to
3608
-.B n
3609
-
3610
-This option helps to keep the dynamic routing table small.
3611
-See also
3612
-.B \-\-max\-routes\-per\-client
3613
-.\"*********************************************************
3614
-.TP
3615
-.B \-\-connect\-freq n sec
3616
-Allow a maximum of
3617
-.B n
3618
-new connections per
3619
-.B sec 
3620
-seconds from clients.  This is designed to contain DoS attacks which flood
3621
-the server with connection requests using certificates which
3622
-will ultimately fail to authenticate.
3623
-
3624
-This is an imperfect solution however, because in a real
3625
-DoS scenario, legitimate connections might also be refused.
3626
-
3627
-For the best protection against DoS attacks in server mode,
3628
-use
3629
-.B \-\-proto udp
3630
-and either
3631
-.B \-\-tls\-auth
3632
-or
3633
-.B \-\-tls\-crypt\fR.
3634
-.\"*********************************************************
3635
-.TP
3636
-.B \-\-learn\-address cmd
3637
-Run command
3638
-.B cmd
3639
-to validate client virtual addresses or routes.
3640
-
3641
-.B cmd
3642
-consists of a path to script (or executable program), optionally
3643
-followed by arguments. The path and arguments may be single\- or double\-quoted
3644
-and/or escaped using a backslash, and should be separated by one or more spaces.
3645
-
3646
-Three arguments will be appended to any arguments in
3647
-.B cmd
3648
-as follows:
3649
-
3650
-.B [1] operation \-\-
3651
-"add", "update", or "delete" based on whether or not
3652
-the address is being added to, modified, or deleted from
3653
-OpenVPN's internal routing table.
3654
-.br
3655
-.B [2] address \-\-
3656
-The address being learned or unlearned.  This can be
3657
-an IPv4 address such as "198.162.10.14", an IPv4 subnet
3658
-such as "198.162.10.0/24", or an ethernet MAC address (when
3659
-.B \-\-dev tap
3660
-is being used) such as "00:FF:01:02:03:04".
3661
-.br
3662
-.B [3] common name \-\-
3663
-The common name on the certificate associated with the
3664
-client linked to this address.  Only present for "add"
3665
-or "update" operations, not "delete".
3666
-
3667
-On "add" or "update" methods, if the script returns
3668
-a failure code (non\-zero), OpenVPN will reject the address
3669
-and will not modify its internal routing table.
3670
-
3671
-Normally, the
3672
-.B cmd
3673
-script will use the information provided above to set
3674
-appropriate firewall entries on the VPN TUN/TAP interface.
3675
-Since OpenVPN provides the association between virtual IP
3676
-or MAC address and the client's authenticated common name,
3677
-it allows a user\-defined script to configure firewall access
3678
-policies with regard to the client's high\-level common name,
3679
-rather than the low level client virtual addresses.
3680
-.\"*********************************************************
3681
-.TP
3682
-.B \-\-auth\-user\-pass\-verify cmd method
3683
-Require the client to provide a username/password (possibly
3684
-in addition to a client certificate) for authentication.
3685
-
3686
-OpenVPN will run
3687
-.B command cmd
3688
-to validate the username/password
3689
-provided by the client.
3690
-
3691
-.B cmd
3692
-consists of a path to script (or executable program), optionally
3693
-followed by arguments. The path and arguments may be single\- or double\-quoted
3694
-and/or escaped using a backslash, and should be separated by one or more spaces.
3695
-
3696
-If
3697
-.B method
3698
-is set to "via\-env", OpenVPN will call
3699
-.B script
3700
-with the environmental variables
3701
-.B username
3702
-and
3703
-.B password
3704
-set to the username/password strings provided by the client.
3705
-Be aware that this method is insecure on some platforms which
3706
-make the environment of a process publicly visible to other
3707
-unprivileged processes.
3708
-
3709
-If
3710
-.B method
3711
-is set to "via\-file", OpenVPN will write the username and
3712
-password to the first two lines of a temporary file.  The filename
3713
-will be passed as an argument to
3714
-.B script,
3715
-and the file will be automatically deleted by OpenVPN after
3716
-the script returns.  The location of the temporary file is
3717
-controlled by the
3718
-.B \-\-tmp\-dir
3719
-option, and will default to the current directory if unspecified.
3720
-For security, consider setting 
3721
-.B \-\-tmp\-dir
3722
-to a volatile storage medium such as
3723
-.B /dev/shm
3724
-(if available) to prevent the username/password file from touching the hard drive.
3725
-
3726
-The script should examine the username
3727
-and password,
3728
-returning a success exit code (0) if the
3729
-client's authentication request is to be accepted, or a failure
3730
-code (1) to reject the client.
3731
-
3732
-This directive is designed to enable a plugin\-style interface
3733
-for extending OpenVPN's authentication capabilities.
3734
-
3735
-To protect against a client passing a maliciously formed
3736
-username or password string, the username string must
3737
-consist only of these characters: alphanumeric, underbar
3738
-('_'), dash ('\-'), dot ('.'), or at ('@').  The password
3739
-string can consist of any printable characters except for
3740
-CR or LF.  Any illegal characters in either the username
3741
-or password string will be converted to underbar ('_').
3742
-
3743
-Care must be taken by any user\-defined scripts to avoid
3744
-creating a security vulnerability in the way that these
3745
-strings are handled.  Never use these strings in such a way
3746
-that they might be escaped or evaluated by a shell interpreter.
3747
-
3748
-For a sample script that performs PAM authentication, see
3749
-.B sample\-scripts/auth\-pam.pl
3750
-in the OpenVPN source distribution.
3751
-.\"*********************************************************
3752
-.TP
3753
-.B \-\-auth\-gen\-token [lifetime] [external-auth]
3754
-After successful user/password authentication, the OpenVPN
3755
-server will with this option generate a temporary
3756
-authentication token and push that to client.  On the following
3757
-renegotiations, the OpenVPN client will pass this token instead
3758
-of the users password.  On the server side the server will do
3759
-the token authentication internally and it will NOT do any
3760
-additional authentications against configured external
3761
-user/password authentication mechanisms.
3762
-
3763
-The tokens implemented by this mechanism include a initial timestamp
3764
-and a renew timestamp and are secured by HMAC.
3765
-
3766
-The
3767
-.B lifetime
3768
-argument defines how long the generated token is valid.  The
3769
-lifetime is defined in seconds.  If lifetime is not set
3770
-or it is set to 0, the token will never expire.
3771
-
3772
-The token will expire either after the configured lifetime of the token 
3773
-is reached or after not being renewed for more than 2 *
3774
-.B reneg\-sec
3775
-seconds.  Clients will be sent renewed tokens on every
3776
-TLS renogiation to keep the client's token updated.  This is done
3777
-to invalidate a token if a client is disconnected for a sufficently long
3778
-time, while at the same time permitting much longer token lifetimes for 
3779
-active clients.
3780
-
3781
-This feature is useful for environments which is configured
3782
-to use One Time Passwords (OTP) as part of the user/password
3783
-authentications and that authentication mechanism does not
3784
-implement any auth\-token support.
3785
-
3786
-When the external-auth keyword is present the normal authentication
3787
-method will always be called even if auth-token succeeds. Normally other
3788
-authentications method are skipped if auth-token verification suceeds or
3789
-fails.
3790
-
3791
-This option postpones this decision to the external authentication methods
3792
-and check the validity of the account and do other checks.
3793
-
3794
-In this mode the environment will have a session_id variable
3795
-that hold the session id from auth-gen-token. Also a environment
3796
-variable session_state is present. This variable tells whether the
3797
-auth-token has succeeded or not. It can have the following values:
3798
-
3799
- - Initial:                    No token from client.
3800
- - Authenticated:              Token is valid and not expired
3801
- - Expired:                    Token is valid but has expired
3802
- - Invalid                     Token is invalid (failed HMAC or wrong length)
3803
- - AuthenticatedEmptyUser/ExpiredEmptyUser
3804
-   The token is not valid with the username send from the client
3805
-   but would be valid (or expired) if we assume an empty username was used
3806
-   instead. These two cases are a workaround for behaviour in OpenVPN3. If
3807
-   this workaround is not needed these two cases should be handled in the
3808
-   same way as Invalid.
3809
-
3810
-.B Warning:
3811
-Use this feature only if you want your authentication method called on
3812
-every verification. Since the external authentication is called it needs
3813
-to also indicate a success or failure of the authentication. It is strongly
3814
-recommended to return an authentication failure in the case of the
3815
-Invalid/Expired auth-token with the external-auth option unless the client
3816
-could authenticate in another acceptable way (e.g. client certificate),
3817
-otherwise returning success will lead to authentication bypass (as does
3818
-returning success on a wrong password from a script).
3819
-
3820
-.\"*********************************************************
3821
-.TP
3822
-.B \-\-auth\-gen\-token\-secret [file]
3823
-Specifies a file that hold a secret for the HMAC used in
3824
-.B \-\-auth\-gen\-token
3825
-If not present OpenVPN will generate a random secret on startup. This file
3826
-should be used if auth-token should valid after restarting a server or if
3827
-client should be able to roam between multiple OpenVPN server with their
3828
-auth\-token.
3829
-
3830
-.\"*********************************************************
3831
-.TP
3832
-.B \-\-opt\-verify
3833
-Clients that connect with options that are incompatible
3834
-with those of the server will be disconnected.
3835
-
3836
-Options that will be compared for compatibility include
3837
-dev\-type, link\-mtu, tun\-mtu, proto, ifconfig,
3838
-comp\-lzo, fragment, keydir, cipher, auth, keysize, secret,
3839
-no\-replay, no\-iv, tls\-auth, key\-method, tls\-server, and tls\-client.
3840
-
3841
-This option requires that
3842
-.B \-\-disable\-occ
3843
-NOT be used.
3844
-.\"*********************************************************
3845
-.TP
3846
-.B \-\-auth\-user\-pass\-optional
3847
-Allow connections by clients that do not specify a username/password.
3848
-Normally, when
3849
-.B \-\-auth\-user\-pass\-verify
3850
-or
3851
-.B \-\-management\-client\-auth
3852
-is specified (or an authentication plugin module), the
3853
-OpenVPN server daemon will require connecting clients to specify a
3854
-username and password.  This option makes the submission of a username/password
3855
-by clients optional, passing the responsibility to the user\-defined authentication
3856
-module/script to accept or deny the client based on other factors
3857
-(such as the setting of X509 certificate fields).  When this option is used,
3858
-and a connecting client does not submit a username/password, the user\-defined
3859
-authentication module/script will see the username and password as being set
3860
-to empty strings ("").  The authentication module/script MUST have logic
3861
-to detect this condition and respond accordingly.
3862
-.\"*********************************************************
3863
-.TP
3864
-.B \-\-client\-cert\-not\-required
3865
-.B DEPRECATED
3866
-This option will be removed in OpenVPN 2.5
3867
-
3868
-Don't require client certificate, client will authenticate
3869
-using username/password only.  Be aware that using this directive
3870
-is less secure than requiring certificates from all clients.
3871
-
3872
-.B Please note:
3873
-This is replaced by
3874
-.B \-\-verify\-client\-cert
3875
-which allows for more flexibility. The option
3876
-.B \-\-verify\-client\-cert none
3877
-is functionally equivalent to
3878
-.B \-\-client\-cert\-not\-required
3879
-.
3880
-
3881
-.\"*********************************************************
3882
-.TP
3883
-.B \-\-verify\-client\-cert none|optional|require
3884
-Specify whether the client is required to supply a valid certificate.
3885
-
3886
-Possible options are
3887
-
3888
-.B none
3889
-: a client certificate is not required. the client need to authenticate
3890
-using username/password only.  Be aware that using this directive
3891
-is less secure than requiring certificates from all clients.
3892
-
3893
-If you use this directive, the
3894
-entire responsibility of authentication will rest on your
3895
-.B \-\-auth\-user\-pass\-verify
3896
-script, so keep in mind that bugs in your script
3897
-could potentially compromise the security of your VPN.
3898
-
3899
-.B \-\-verify\-client\-cert none
3900
-is functionally equivalent to
3901
-.B \-\-client\-cert\-not\-required.
3902
-
3903
-.B optional
3904
-: a client may present a certificate but it is not required to do so.
3905
-When using this directive, you should also use a
3906
-.B \-\-auth\-user\-pass\-verify
3907
-script to ensure that clients are authenticated using a
3908
-certificate, a username and password, or possibly even both.
3909
-
3910
-Again, the entire responsibility of authentication will rest on your
3911
-.B \-\-auth\-user\-pass\-verify
3912
-script, so keep in mind that bugs in your script
3913
-could potentially compromise the security of your VPN.
3914
-
3915
-.B require
3916
-: this is the default option. A client is required to present a
3917
-certificate, otherwise VPN access is refused.
3918
-
3919
-If you don't use this directive (or use
3920
-.B \-\-verify\-client\-cert require
3921
-) but you also specify an
3922
-.B \-\-auth\-user\-pass\-verify
3923
-script, then OpenVPN will perform double authentication.  The
3924
-client certificate verification AND the
3925
-.B \-\-auth\-user\-pass\-verify
3926
-script will need to succeed in order for a client to be
3927
-authenticated and accepted onto the VPN.
3928
-.\"*********************************************************
3929
-.TP
3930
-.B \-\-username\-as\-common\-name
3931
-For
3932
-.B \-\-auth\-user\-pass\-verify
3933
-authentication, use
3934
-the authenticated username as the common name,
3935
-rather than the common name from the client cert.
3936
-.\"*********************************************************
3937
-.TP
3938
-.B \-\-port\-share host port [dir]
3939
-When run in TCP server mode, share the OpenVPN port with
3940
-another application, such as an HTTPS server.  If OpenVPN
3941
-senses a connection to its port which is using a non\-OpenVPN
3942
-protocol, it will proxy the connection to the server at
3943
-.B host:port.
3944
-Currently only designed to work with HTTP/HTTPS,
3945
-though it would be theoretically possible to extend to
3946
-other protocols such as ssh.
3947
-
3948
-.B dir
3949
-specifies an optional directory where a temporary file with name N
3950
-containing content C will be dynamically generated for each proxy
3951
-connection, where N is the source IP:port of the client connection
3952
-and C is the source IP:port of the connection to the proxy
3953
-receiver.  This directory can be used as a dictionary by
3954
-the proxy receiver to determine the origin of the connection.
3955
-Each generated file will be automatically deleted when the proxied
3956
-connection is torn down.
3957
-
3958
-Not implemented on Windows.
3959
-.\"*********************************************************
3960
-.TP
3961
-.B \-\-vlan\-tagging
3962
-Server-only option. Turns the OpenVPN server instance into a switch that
3963
-understands VLAN\-tagging, based on IEEE 802.1Q.
3964
-
3965
-The server TAP device and each of the connecting clients is seen as a port of the
3966
-switch. All client ports are in untagged mode and the server TAP device is
3967
-VLAN-tagged, untagged or accepts both, depending on the
3968
-.B \-\-vlan\-accept setting.
3969
-
3970
-Ethernet frames with a prepended 802.1Q tag are called "tagged". If the VLAN
3971
-Identifier (VID) field in such a tag is non-zero, the frame is called
3972
-"VLAN\-tagged". If the VID is zero, but the Priority Control Point (PCP) field
3973
-is non\-zero, the frame is called "prio\-tagged". If there is no 802.1Q tag, the
3974
-frame is "untagged".
3975
-
3976
-Using the
3977
-.B \-\-vlan\-pvid v
3978
-option once per client (see \-\-client\-config\-dir), each port can be associated
3979
-with a certain VID. Packets
3980
-can only be forwarded between ports having the same VID. Therefore, clients
3981
-with differing VIDs are completely separated from one\-another, even if
3982
-.B \-\-client\-to\-client
3983
-is activated.
3984
-
3985
-The packet filtering takes place in the OpenVPN server. Clients should not
3986
-have any VLAN tagging configuration applied.
3987
-
3988
-The
3989
-.B \-\-vlan\-tagging
3990
-option is off by default. While turned off, OpenVPN
3991
-accepts any Ethernet frame and does not perform any special processing
3992
-for VLAN\-tagged packets.
3993
-
3994
-The option can only be activated in
3995
-.B \-\-dev tap mode.
3996
-
3997
-.\"*********************************************************
3998
-.TP
3999
-.B \-\-vlan\-accept all | tagged | untagged
4000
-Configure the VLAN tagging policy for the server TAP device. The following modes
4001
-are available:
4002
-
4003
-.B tagged
4004
-\-\- Admit only VLAN\-tagged frames.
4005
-Only VLAN\-tagged packets are accepted, while untagged or priority\-tagged
4006
-packets are dropped when entering the server TAP device.
4007
-
4008
-.br
4009
-.B untagged
4010
-\-\- Admit only untagged and prio\-tagged frames.
4011
-.br
4012
-VLAN\-tagged packets are not accepted, while untagged or priority\-tagged
4013
-packets entering the server TAP device are tagged with the value configured
4014
-for the global
4015
-.B \-\-vlan\-pvid
4016
-setting.
4017
-.br
4018
-.B all
4019
-(default) \-\- Admit all frames.
4020
-.br
4021
-All packets are admitted and then treated like untagged or tagged mode
4022
-respectively.
4023
-
4024
-(Note: Some vendors refer to switch ports running in
4025
-.B tagged
4026
-mode as "trunk ports" and switch ports running in
4027
-.B untagged
4028
-mode as "access ports".)
4029
-
4030
-Packets forwarded from clients to the server are VLAN\-tagged
4031
-with the originating client's PVID, unless the VID matches the
4032
-global \-\-vlan\-pvid, in which case the tag is removed.
4033
-
4034
-If no PVID is configured for a given client (see \-\-vlan\-pvid) packets
4035
-are tagged with 1 by default.
4036
-.\"*********************************************************
4037
-.TP
4038
-.B \-\-vlan\-pvid v
4039
-Specifies which VLAN identifier a "port" is associated with. Only valid when
4040
-\fB\-\-vlan\-tagging\fR is speficied.
4041
-
4042
-In the client context, the setting specifies which VLAN ID a client is
4043
-associated with. In the global context, the VLAN ID of the server TAP device is set.
4044
-The latter only makes sense for
4045
-.B \-\-vlan\-accept untagged
4046
-and
4047
-.B \-\-vlan\-accept all
4048
-modes.
4049
-
4050
-Valid values for
4051
-.B v
4052
-go from 1 through to 4094. The global value defaults to 1. If no \-\-vlan\-pvid
4053
-is specified in the client context, the global value is inherited.
4054
-
4055
-In some switch implementations, the PVID is also referred to as "Native VLAN".
4056
-.\"*********************************************************
4057
-.SS Client Mode
4058
-Use client mode when connecting to an OpenVPN server
4059
-which has
4060
-.B \-\-server, \-\-server\-bridge,
4061
-or
4062
-.B \-\-mode server
4063
-in it's configuration.
4064
-.\"*********************************************************
4065
-.TP
4066
-.B \-\-client
4067
-A helper directive designed to simplify the configuration
4068
-of OpenVPN's client mode.  This directive is equivalent to:
4069
-
4070
-.nf
4071
-.ft 3
4072
-.in +4
4073
- pull
4074
- tls\-client
4075
-.in -4
4076
-.ft
4077
-.fi
4078
-.\"*********************************************************
4079
-.TP
4080
-.B \-\-pull
4081
-This option must be used on a client which is connecting
4082
-to a multi\-client server.  It indicates to OpenVPN that it
4083
-should accept options pushed by the server, provided they
4084
-are part of the legal set of pushable options (note that the
4085
-.B \-\-pull
4086
-option is implied by
4087
-.B \-\-client
4088
-).
4089
-
4090
-In particular,
4091
-.B \-\-pull
4092
-allows the server to push routes to the client, so you should
4093
-not use
4094
-.B \-\-pull
4095
-or
4096
-.B \-\-client
4097
-in situations where you don't trust the server to have control
4098
-over the client's routing table.
4099
-.\"*********************************************************
4100
-.TP
4101
-.B \-\-pull\-filter accept|ignore|reject \fItext\fR
4102
-Filter options received from the server if the option starts with
4103
-\fItext\fR.  Runs on client. The action flag
4104
-.B accept
4105
-allows the option,
4106
-.B ignore
4107
-removes it and
4108
-.B reject
4109
-flags an error and triggers a SIGUSR1 restart.
4110
-The filters may be specified multiple times, and each filter is
4111
-applied in the order it is specified. The filtering of each
4112
-option stops as soon as a match is found. Unmatched options are accepted
4113
-by default.
4114
-
4115
-Prefix comparison is used to match \fItext\fR against the
4116
-received option so that
4117
-
4118
-.nf
4119
-.ft 3
4120
-.in +4
4121
-\-\-pull\-filter ignore "route"
4122
-.in -4
4123
-.ft
4124
-.fi
4125
-
4126
-would remove all pushed options starting with
4127
-.B route
4128
-which would include, for example,
4129
-.B route\-gateway.
4130
-Enclose \fItext\fR in quotes to embed spaces.
4131
-
4132
-.nf
4133
-.ft 3
4134
-.in +4
4135
-\-\-pull\-filter accept "route 192.168.1."
4136
-\-\-pull\-filter ignore "route "
4137
-.in -4
4138
-.ft
4139
-.fi
4140
-
4141
-would remove all routes that do not start with 192.168.1.
4142
-
4143
-This option may be used only on clients.
4144
-Note that
4145
-.B reject
4146
-may result in a repeated cycle of failure and reconnect,
4147
-unless multiple remotes are specified and connection to the next remote
4148
-succeeds. To silently ignore an option pushed by the server, use
4149
-.B ignore.
4150
-.\"*********************************************************
4151
-.TP
4152
-.B \-\-auth\-user\-pass [up]
4153
-Authenticate with server using username/password.
4154
-.B up
4155
-is a file containing username/password on 2 lines. If the
4156
-password line is missing, OpenVPN will prompt for one.
4157
-
4158
-If
4159
-.B up
4160
-is omitted, username/password will be prompted from the
4161
-console.
4162
-
4163
-The server configuration must specify an
4164
-.B \-\-auth\-user\-pass\-verify
4165
-script to verify the username/password provided by
4166
-the client.
4167
-.\"*********************************************************
4168
-.TP
4169
-.B \-\-auth\-retry type
4170
-Controls how OpenVPN responds to username/password verification
4171
-errors such as the client\-side response to an AUTH_FAILED message from the server
4172
-or verification failure of the private key password.
4173
-
4174
-Normally used to prevent auth errors from being fatal
4175
-on the client side, and to permit username/password requeries in case
4176
-of error.
4177
-
4178
-An AUTH_FAILED message is generated by the server if the client
4179
-fails
4180
-.B \-\-auth\-user\-pass
4181
-authentication, or if the server\-side
4182
-.B \-\-client\-connect
4183
-script returns an error status when the client
4184
-tries to connect.
4185
-
4186
-.B type
4187
-can be one of:
4188
-
4189
-.B none \-\-
4190
-Client will exit with a fatal error (this is the default).
4191
-.br
4192
-.B nointeract \-\-
4193
-Client will retry the connection without requerying for an
4194
-.B \-\-auth\-user\-pass
4195
-username/password.  Use this option for unattended clients.
4196
-.br
4197
-.B interact \-\-
4198
-Client will requery for an
4199
-.B \-\-auth\-user\-pass
4200
-username/password and/or private key password before attempting a reconnection.
4201
-
4202
-Note that while this option cannot be pushed, it can be controlled
4203
-from the management interface.
4204
-.\"*********************************************************
4205
-.TP
4206
-.B \-\-static\-challenge t e
4207
-Enable static challenge/response protocol using challenge text
4208
-.B t,
4209
-with
4210
-echo flag given by
4211
-.B e
4212
-(0|1).
4213
-
4214
-The echo flag indicates whether or not the user's response
4215
-to the challenge should be echoed.
4216
-
4217
-See management\-notes.txt in the OpenVPN distribution for a
4218
-description of the OpenVPN challenge/response protocol.
4219
-.\"*********************************************************
4220
-.TP
4221
-\fB\-\-server\-poll\-timeout n\fR, \fB\-\-connect\-timeout n\fR
4222
-When connecting to a remote server do not wait for more than
4223
-.B n
4224
-seconds waiting for a response before trying the next server.
4225
-The default value is 120s. This timeout includes proxy and TCP
4226
-connect timeouts.
4227
-.\"*********************************************************
4228
-.TP
4229
-.B \-\-explicit\-exit\-notify [n]
4230
-In UDP client mode or point\-to\-point mode, send server/peer an exit notification
4231
-if tunnel is restarted or OpenVPN process is exited.  In client mode, on
4232
-exit/restart, this
4233
-option will tell the server to immediately close its client instance object
4234
-rather than waiting for a timeout.  The
4235
-.B n
4236
-parameter (default=1) controls the maximum number of attempts that the client
4237
-will try to resend the exit notification message.
4238
-
4239
-In UDP server mode, send RESTART control channel command to connected clients. The
4240
-.B n
4241
-parameter (default=1) controls client behavior. With
4242
-.B n
4243
-= 1 client will attempt to reconnect
4244
-to the same server, with
4245
-.B n
4246
-= 2 client will advance to the next server.
4247
-
4248
-OpenVPN will not send any exit
4249
-notifications unless this option is enabled.
4250
-.TP
4251
-.B \-\-allow\-recursive\-routing
4252
-When this option is set, OpenVPN will not drop incoming tun packets
4253
-with same destination as host.
4254
-.\"*********************************************************
4255
-.SS Data Channel Encryption Options:
4256
-These options are meaningful for both Static & TLS\-negotiated key modes
4257
-(must be compatible between peers).
4258
-.\"*********************************************************
4259
-.TP
4260
-.B \-\-secret file [direction]
4261
-Enable Static Key encryption mode (non\-TLS).
4262
-Use pre\-shared secret
4263
-.B file
4264
-which was generated with
4265
-.B \-\-genkey.
4266
-
4267
-The optional
4268
-.B direction
4269
-parameter enables the use of 4 distinct keys
4270
-(HMAC\-send, cipher\-encrypt, HMAC\-receive, cipher\-decrypt), so that
4271
-each data flow direction has a different set of HMAC and cipher keys.
4272
-This has a number of desirable security properties including
4273
-eliminating certain kinds of DoS and message replay attacks.
4274
-
4275
-When the
4276
-.B direction
4277
-parameter is omitted, 2 keys are used bidirectionally, one for HMAC
4278
-and the other for encryption/decryption.
4279
-
4280
-The
4281
-.B direction
4282
-parameter should always be complementary on either side of the connection,
4283
-i.e. one side should use "0" and the other should use "1", or both sides
4284
-should omit it altogether.
4285
-
4286
-The
4287
-.B direction
4288
-parameter requires that
4289
-.B file
4290
-contains a 2048 bit key.  While pre\-1.5 versions of OpenVPN
4291
-generate 1024 bit key files, any version of OpenVPN which
4292
-supports the
4293
-.B direction
4294
-parameter, will also support 2048 bit key file generation
4295
-using the
4296
-.B \-\-genkey
4297
-option.
4298
-
4299
-Static key encryption mode has certain advantages,
4300
-the primary being ease of configuration.
4301
-
4302
-There are no certificates
4303
-or certificate authorities or complicated negotiation handshakes and protocols.
4304
-The only requirement is that you have a pre\-existing secure channel with
4305
-your peer (such as
4306
-.B ssh
4307
-) to initially copy the key.  This requirement, along with the
4308
-fact that your key never changes unless you manually generate a new one,
4309
-makes it somewhat less secure than TLS mode (see below).  If an attacker
4310
-manages to steal your key, everything that was ever encrypted with
4311
-it is compromised.  Contrast that to the perfect forward secrecy features of
4312
-TLS mode (using Diffie Hellman key exchange), where even if an attacker
4313
-was able to steal your private key, he would gain no information to help
4314
-him decrypt past sessions.
4315
-
4316
-Another advantageous aspect of Static Key encryption mode is that
4317
-it is a handshake\-free protocol
4318
-without any distinguishing signature or feature
4319
-(such as a header or protocol handshake sequence) 
4320
-that would mark the ciphertext packets as being
4321
-generated by OpenVPN.  Anyone eavesdropping on the wire
4322
-would see nothing
4323
-but random\-looking data.
4324
-.\"*********************************************************
4325
-.TP
4326
-.B \-\-key\-direction
4327
-Alternative way of specifying the optional direction parameter for the
4328
-.B \-\-tls\-auth
4329
-and
4330
-.B \-\-secret
4331
-options. Useful when using inline files (See section on inline files).
4332
-.\"*********************************************************
4333
-.TP
4334
-.B \-\-auth alg
4335
-Authenticate data channel packets and (if enabled)
4336
-.B tls\-auth
4337
-control channel packets with HMAC using message digest algorithm
4338
-.B alg.
4339
-(The default is
4340
-.B SHA1
4341
-).
4342
-HMAC is a commonly used message authentication algorithm (MAC) that uses
4343
-a data string, a secure hash algorithm, and a key, to produce
4344
-a digital signature.
4345
-
4346
-The OpenVPN data channel protocol uses encrypt\-then\-mac (i.e. first encrypt a
4347
-packet, then HMAC the resulting ciphertext), which prevents padding oracle
4348
-attacks.
4349
-
4350
-If an AEAD cipher mode (e.g. GCM) is chosen, the specified
4351
-.B \-\-auth
4352
-algorithm is ignored for the data channel, and the authentication method of the
4353
-AEAD cipher is used instead.  Note that
4354
-.B alg
4355
-still specifies the digest used for
4356
-.B tls\-auth\fR.
4357
-
4358
-In static\-key encryption mode, the HMAC key
4359
-is included in the key file generated by
4360
-.B \-\-genkey.
4361
-In TLS mode, the HMAC key is dynamically generated and shared
4362
-between peers via the TLS control channel.  If OpenVPN receives a packet with
4363
-a bad HMAC it will drop the packet.
4364
-HMAC usually adds 16 or 20 bytes per packet.
4365
-Set
4366
-.B alg=none
4367
-to disable authentication.
4368
-
4369
-For more information on HMAC see
4370
-.I http://www.cs.ucsd.edu/users/mihir/papers/hmac.html
4371
-.\"*********************************************************
4372
-.TP
4373
-.B \-\-cipher alg
4374
-Encrypt data channel packets with cipher algorithm
4375
-.B alg.
4376
-
4377
-The default is
4378
-.B BF\-CBC,
4379
-an abbreviation for Blowfish in Cipher Block Chaining mode.  When cipher
4380
-negotiation (NCP) is allowed, OpenVPN 2.4 and newer on both client and server
4381
-side will automatically upgrade to
4382
-.B AES\-256\-GCM.
4383
-See
4384
-.B \-\-ncp\-ciphers
4385
-and
4386
-.B \-\-ncp\-disable
4387
-for more details on NCP.
4388
-
4389
-Using
4390
-.B BF\-CBC
4391
-is no longer recommended, because of its 64\-bit block size.  This
4392
-small block size allows attacks based on collisions, as demonstrated by SWEET32.
4393
-See https://community.openvpn.net/openvpn/wiki/SWEET32 for details.  Due to
4394
-this, support for
4395
-.B BF\-CBC, DES, CAST5, IDEA
4396
-and
4397
-.B RC2
4398
-ciphers will be removed in OpenVPN 2.6.
4399
-
4400
-To see other ciphers that are available with OpenVPN, use the
4401
-.B \-\-show\-ciphers
4402
-option.
4403
-
4404
-Set
4405
-.B alg=none
4406
-to disable encryption.
4407
-
4408
-.\"*********************************************************
4409
-.TP
4410
-.B \-\-ncp\-ciphers cipher_list
4411
-Restrict the allowed ciphers to be negotiated to the ciphers in
4412
-.B cipher_list\fR.
4413
-.B cipher_list
4414
-is a colon\-separated list of ciphers, and defaults to
4415
-"AES\-256\-GCM:AES\-128\-GCM".
4416
-
4417
-For servers, the first cipher from
4418
-.B cipher_list
4419
-that is also supported by the client will be pushed to clients
4420
-that support cipher negotiation.
4421
-
4422
-Cipher negotiation is enabled in client\-server mode only.  I.e. if
4423
-.B \-\-mode
4424
-is set to 'server' (server\-side, implied by setting
4425
-.B \-\-server
4426
-), or if
4427
-.B \-\-pull
4428
-is specified (client\-side, implied by setting \-\-client).
4429
-
4430
-If both peers support and do not disable NCP, the negotiated cipher will
4431
-override the cipher specified by
4432
-.B \-\-cipher\fR.
4433
-
4434
-Additionally, to allow for more smooth transition, if NCP is enabled, OpenVPN
4435
-will inherit the cipher of the peer if that cipher is different from the local
4436
-.B \-\-cipher
4437
-setting, but the peer cipher is one of the ciphers specified in
4438
-.B \-\-ncp\-ciphers\fR.
4439
-E.g. a non\-NCP client (<=v2.3, or with \-\-ncp\-disabled set) connecting to a
4440
-NCP server (v2.4+) with "\-\-cipher BF\-CBC" and "\-\-ncp\-ciphers
4441
-AES\-256\-GCM:AES\-256\-CBC" set can either specify "\-\-cipher BF\-CBC" or
4442
-"\-\-cipher AES\-256\-CBC" and both will work.
4443
-
4444
-Note, for using NCP with a OpenVPN 2.4 peer this list must include
4445
-the AES\-256\-GCM and AES\-128\-GCM ciphers.
4446
-
4447
-This list is restricted to be 127 chars long after conversion to OpenVPN
4448
-ciphers.
4449
-.\"*********************************************************
4450
-.TP
4451
-.B \-\-ncp\-disable
4452
-Disable "negotiable crypto parameters".  This completely disables cipher
4453
-negotiation.
4454
-.\"*********************************************************
4455
-.TP
4456
-.B \-\-keysize n
4457
-.B DEPRECATED
4458
-This option will be removed in OpenVPN 2.6.
4459
-
4460
-Size of cipher key in bits (optional).
4461
-If unspecified, defaults to cipher\-specific default.  The
4462
-.B \-\-show\-ciphers
4463
-option (see below) shows all available OpenSSL ciphers,
4464
-their default key sizes, and whether the key size can
4465
-be changed.  Use care in changing a cipher's default
4466
-key size.  Many ciphers have not been extensively
4467
-cryptanalyzed with non\-standard key lengths, and a
4468
-larger key may offer no real guarantee of greater
4469
-security, or may even reduce security.
4470
-.\"*********************************************************
4471
-.TP
4472
-.B \-\-prng alg [nsl]
4473
-(Advanced) For PRNG (Pseudo\-random number generator),
4474
-use digest algorithm
4475
-.B alg
4476
-(default=sha1), and set
4477
-.B nsl
4478
-(default=16)
4479
-to the size in bytes of the nonce secret length (between 16 and 64).
4480
-
4481
-Set
4482
-.B alg=none
4483
-to disable the PRNG and use the OpenSSL RAND_bytes function
4484
-instead for all of OpenVPN's pseudo\-random number needs.
4485
-.\"*********************************************************
4486
-.TP
4487
-.B \-\-engine [engine\-name]
4488
-Enable OpenSSL hardware\-based crypto engine functionality.
4489
-
4490
-If
4491
-.B engine\-name
4492
-is specified,
4493
-use a specific crypto engine.  Use the
4494
-.B \-\-show\-engines
4495
-standalone option to list the crypto engines which are
4496
-supported by OpenSSL.
4497
-.\"*********************************************************
4498
-.TP
4499
-.B \-\-no\-replay
4500
-.B DEPRECATED
4501
-This option will be removed in OpenVPN 2.5.
4502
-
4503
-(Advanced) Disable OpenVPN's protection against replay attacks.
4504
-Don't use this option unless you are prepared to make
4505
-a tradeoff of greater efficiency in exchange for less
4506
-security.
4507
-
4508
-OpenVPN provides datagram replay protection by default.
4509
-
4510
-Replay protection is accomplished
4511
-by tagging each outgoing datagram with an identifier
4512
-that is guaranteed to be unique for the key being used.
4513
-The peer that receives the datagram will check for
4514
-the uniqueness of the identifier.  If the identifier
4515
-was already received in a previous datagram, OpenVPN
4516
-will drop the packet.  Replay protection is important
4517
-to defeat attacks such as a SYN flood attack, where
4518
-the attacker listens in the wire, intercepts a TCP
4519
-SYN packet (identifying it by the context in which
4520
-it occurs in relation to other packets), then floods
4521
-the receiving peer with copies of this packet.
4522
-
4523
-OpenVPN's replay protection is implemented in slightly
4524
-different ways, depending on the key management mode
4525
-you have selected.
4526
-
4527
-In Static Key mode
4528
-or when using an CFB or OFB mode cipher, OpenVPN uses a
4529
-64 bit unique identifier that combines a time stamp with
4530
-an incrementing sequence number.
4531
-
4532
-When using TLS mode for key exchange and a CBC cipher
4533
-mode, OpenVPN uses only a 32 bit sequence number without
4534
-a time stamp, since OpenVPN can guarantee the uniqueness
4535
-of this value for each key.  As in IPSec, if the sequence number is
4536
-close to wrapping back to zero, OpenVPN will trigger
4537
-a new key exchange.
4538
-
4539
-To check for replays, OpenVPN uses
4540
-the
4541
-.I sliding window
4542
-algorithm used
4543
-by IPSec.
4544
-.\"*********************************************************
4545
-.TP
4546
-.B \-\-replay\-window n [t]
4547
-Use a replay protection sliding\-window of size
4548
-.B n
4549
-and a time window of
4550
-.B t
4551
-seconds.
4552
-
4553
-By default
4554
-.B n
4555
-is 64 (the IPSec default) and
4556
-.B t
4557
-is 15 seconds.
4558
-
4559
-This option is only relevant in UDP mode, i.e.
4560
-when either
4561
-.B \-\-proto udp
4562
-is specified, or no
4563
-.B \-\-proto
4564
-option is specified.
4565
-
4566
-When OpenVPN tunnels IP packets over UDP, there is the possibility that
4567
-packets might be dropped or delivered out of order.  Because OpenVPN, like IPSec,
4568
-is emulating the physical network layer,
4569
-it will accept an out\-of\-order packet sequence, and
4570
-will deliver such packets in the same order they were received to
4571
-the TCP/IP protocol stack, provided they satisfy several constraints.
4572
-
4573
-.B (a)
4574
-The packet cannot be a replay (unless
4575
-.B \-\-no\-replay
4576
-is specified, which disables replay protection altogether).
4577
-
4578
-.B (b)
4579
-If a packet arrives out of order, it will only be accepted if the difference
4580
-between its sequence number and the highest sequence number received
4581
-so far is less than
4582
-.B n.
4583
-
4584
-.B (c)
4585
-If a packet arrives out of order, it will only be accepted if it arrives no later
4586
-than
4587
-.B t
4588
-seconds after any packet containing a higher sequence number.
4589
-
4590
-If you are using a network link with a large pipeline (meaning that
4591
-the product of bandwidth and latency is high), you may want to use
4592
-a larger value for
4593
-.B n.
4594
-Satellite links in particular often require this.
4595
-
4596
-If you run OpenVPN at
4597
-.B \-\-verb 4,
4598
-you will see the message "Replay\-window backtrack occurred [x]"
4599
-every time the maximum sequence number backtrack seen thus far
4600
-increases.  This can be used to calibrate
4601
-.B n.
4602
-
4603
-There is some controversy on the appropriate method of handling packet
4604
-reordering at the security layer.
4605
-
4606
-Namely, to what extent should the
4607
-security layer protect the encapsulated protocol from attacks which masquerade
4608
-as the kinds of normal packet loss and reordering that occur over IP networks?
4609
-
4610
-The IPSec and OpenVPN approach is to allow packet reordering within a certain
4611
-fixed sequence number window.
4612
-
4613
-OpenVPN adds to the IPSec model by limiting the window size in time as well as
4614
-sequence space.
4615
-
4616
-OpenVPN also adds TCP transport as an option (not offered by IPSec) in which
4617
-case OpenVPN can adopt a very strict attitude towards message deletion and
4618
-reordering:  Don't allow it.  Since TCP guarantees reliability, any packet
4619
-loss or reordering event can be assumed to be an attack.
4620
-
4621
-In this sense, it could be argued that TCP tunnel transport is preferred when
4622
-tunneling non\-IP or UDP application protocols which might be vulnerable to a
4623
-message deletion or reordering attack which falls within the normal
4624
-operational parameters of IP networks.
4625
-
4626
-So I would make the statement that one should never tunnel a non\-IP protocol
4627
-or UDP application protocol over UDP, if the protocol might be vulnerable to a
4628
-message deletion or reordering attack that falls within the normal operating
4629
-parameters of what is to be expected from the physical IP layer.  The problem
4630
-is easily fixed by simply using TCP as the VPN transport layer.
4631
-.\"*********************************************************
4632
-.TP
4633
-.B \-\-mute\-replay\-warnings
4634
-Silence the output of replay warnings, which are a common
4635
-false alarm on WiFi networks.  This option preserves
4636
-the security of the replay protection code without
4637
-the verbosity associated with warnings about duplicate
4638
-packets.
4639
-.\"*********************************************************
4640
-.TP
4641
-.B \-\-replay\-persist file
4642
-Persist replay\-protection state across sessions using
4643
-.B file
4644
-to save and reload the state.
4645
-
4646
-This option will strengthen protection against replay attacks,
4647
-especially when you are using OpenVPN in a dynamic context (such
4648
-as with
4649
-.B \-\-inetd)
4650
-when OpenVPN sessions are frequently started and stopped. 
4651
-
4652
-This option will keep a disk copy of the current replay protection
4653
-state (i.e. the most recent packet timestamp and sequence number
4654
-received from the remote peer), so that if an OpenVPN session
4655
-is stopped and restarted, it will reject any replays of packets
4656
-which were already received by the prior session.
4657
-
4658
-This option only makes sense when replay protection is enabled
4659
-(the default) and you are using either
4660
-.B \-\-secret
4661
-(shared\-secret key mode) or TLS mode with
4662
-.B \-\-tls\-auth.
4663
-.\"*********************************************************
4664
-.TP
4665
-.B \-\-no\-iv
4666
-.B DEPRECATED
4667
-This option will be removed in OpenVPN 2.5.
4668
-
4669
-(Advanced) Disable OpenVPN's use of IV (cipher initialization vector).
4670
-Don't use this option unless you are prepared to make
4671
-a tradeoff of greater efficiency in exchange for less
4672
-security.
4673
-
4674
-OpenVPN uses an IV by default, and requires it for CFB and
4675
-OFB cipher modes (which are totally insecure without it).
4676
-Using an IV is important for security when multiple
4677
-messages are being encrypted/decrypted with the same key.
4678
-
4679
-IV is implemented differently depending on the cipher mode used.
4680
-
4681
-In CBC mode, OpenVPN uses a pseudo\-random IV for each packet.
4682
-
4683
-In CFB/OFB mode, OpenVPN uses a unique sequence number and time stamp
4684
-as the IV.  In fact, in CFB/OFB mode, OpenVPN uses a datagram
4685
-space\-saving optimization that uses the unique identifier for
4686
-datagram replay protection as the IV.
4687
-.\"*********************************************************
4688
-.TP
4689
-.B \-\-use\-prediction\-resistance
4690
-Enable prediction resistance on mbed TLS's RNG.
4691
-
4692
-Enabling prediction resistance causes the RNG to reseed in each
4693
-call for random. Reseeding this often can quickly deplete the kernel
4694
-entropy pool.
4695
-
4696
-If you need this option, please consider running a daemon that adds
4697
-entropy to the kernel pool.
4698
-
4699
-.\"*********************************************************
4700
-.TP
4701
-.B \-\-test\-crypto
4702
-Do a self\-test of OpenVPN's crypto options by encrypting and
4703
-decrypting test packets using the data channel encryption options
4704
-specified above.  This option does not require a peer to function,
4705
-and therefore can be specified without
4706
-.B \-\-dev
4707
-or
4708
-.B \-\-remote.
4709
-
4710
-The typical usage of
4711
-.B \-\-test\-crypto
4712
-would be something like this:
4713
-
4714
-.B openvpn \-\-test\-crypto \-\-secret key
4715
-
4716
-or
4717
-
4718
-.B openvpn \-\-test\-crypto \-\-secret key \-\-verb 9
4719
-
4720
-This option is very useful to test OpenVPN after it has been ported to
4721
-a new platform, or to isolate problems in the compiler, OpenSSL
4722
-crypto library, or OpenVPN's crypto code.  Since it is a self\-test mode,
4723
-problems with encryption and authentication can be debugged independently
4724
-of network and tunnel issues.
4725
-.\"*********************************************************
4726
-.SS TLS Mode Options:
4727
-TLS mode is the most powerful crypto mode of OpenVPN in both security and flexibility.
4728
-TLS mode works by establishing control and
4729
-data channels which are multiplexed over a single TCP/UDP port.  OpenVPN initiates
4730
-a TLS session over the control channel and uses it to exchange cipher
4731
-and HMAC keys to protect the data channel.  TLS mode uses a robust reliability
4732
-layer over the UDP connection for all control channel communication, while
4733
-the data channel, over which encrypted tunnel data passes, is forwarded without
4734
-any mediation.  The result is the best of both worlds: a fast data channel
4735
-that forwards over UDP with only the overhead of encrypt,
4736
-decrypt, and HMAC functions,
4737
-and a control channel that provides all of the security features of TLS,
4738
-including certificate\-based authentication and Diffie Hellman forward secrecy.
4739
-
4740
-To use TLS mode, each peer that runs OpenVPN should have its own local
4741
-certificate/key pair (
4742
-.B \-\-cert
4743
-and
4744
-.B \-\-key
4745
-), signed by the root certificate which is specified
4746
-in
4747
-.B \-\-ca.
4748
-
4749
-When two OpenVPN peers connect, each presents its local certificate to the
4750
-other.  Each peer will then check that its partner peer presented a
4751
-certificate which was signed by the master root certificate as specified in
4752
-.B \-\-ca.
4753
-
4754
-If that check on both peers succeeds, then the TLS negotiation
4755
-will succeed, both OpenVPN
4756
-peers will exchange temporary session keys, and the tunnel will begin
4757
-passing data.
4758
-
4759
-The OpenVPN project provides a set of scripts for
4760
-managing RSA certificates & keys:
4761
-.I https://github.com/OpenVPN/easy\-rsa
4762
-.\"*********************************************************
4763
-.TP
4764
-.B \-\-tls\-server
4765
-Enable TLS and assume server role during TLS handshake.  Note that
4766
-OpenVPN is designed as a peer\-to\-peer application.  The designation
4767
-of client or server is only for the purpose of negotiating the TLS
4768
-control channel.
4769
-.\"*********************************************************
4770
-.TP
4771
-.B \-\-tls\-client
4772
-Enable TLS and assume client role during TLS handshake.
4773
-.\"*********************************************************
4774
-.TP
4775
-.B \-\-ca file
4776
-Certificate authority (CA) file in .pem format, also referred to as the
4777
-.I root
4778
-certificate.  This file can have multiple
4779
-certificates in .pem format, concatenated together.  You can construct your own
4780
-certificate authority certificate and private key by using a command such as:
4781
-
4782
-.B openssl req \-nodes \-new \-x509 \-keyout ca.key \-out ca.crt
4783
-
4784
-Then edit your openssl.cnf file and edit the
4785
-.B certificate
4786
-variable to point to your new root certificate
4787
-.B ca.crt.
4788
-
4789
-For testing purposes only, the OpenVPN distribution includes a sample
4790
-CA certificate (ca.crt).
4791
-Of course you should never use
4792
-the test certificates and test keys distributed with OpenVPN in a
4793
-production environment, since by virtue of the fact that
4794
-they are distributed with OpenVPN, they are totally insecure.
4795
-.\"*********************************************************
4796
-.TP
4797
-.B \-\-capath dir
4798
-Directory containing trusted certificates (CAs and CRLs).
4799
-Not available with mbed TLS.
4800
-
4801
-CAs in the capath directory are expected to be named <hash>.<n>. CRLs are
4802
-expected to be named <hash>.r<n>. See the
4803
-.B \-CApath
4804
-option of
4805
-.B openssl verify
4806
-, and the
4807
-.B \-hash
4808
-option of
4809
-.B openssl x509
4810
-,
4811
-.B openssl crl
4812
-and
4813
-.BR X509_LOOKUP_hash_dir (3)
4814
-for more information.
4815
-
4816
-Similarly to the
4817
-.B \-\-crl\-verify
4818
-option CRLs are not mandatory \- OpenVPN will log the usual warning in the logs
4819
-if the relevant CRL is missing, but the connection will be allowed.
4820
-.\"*********************************************************
4821
-.TP
4822
-.B \-\-dh file
4823
-File containing Diffie Hellman parameters
4824
-in .pem format (required for
4825
-.B \-\-tls\-server
4826
-only).
4827
-
4828
-Set
4829
-.B file=none
4830
-to disable Diffie Hellman key exchange (and use ECDH only). Note that this
4831
-requires peers to be using an SSL library that supports ECDH TLS cipher suites
4832
-(e.g. OpenSSL 1.0.1+, or mbed TLS 2.0+).
4833
-
4834
-Use
4835
-.B openssl dhparam \-out dh2048.pem 2048
4836
-to generate 2048\-bit DH parameters. Diffie Hellman parameters may be considered
4837
-public.
4838
-.\"*********************************************************
4839
-.TP
4840
-.B \-\-ecdh\-curve name
4841
-Specify the curve to use for elliptic curve Diffie Hellman. Available
4842
-curves can be listed with
4843
-.BR \-\-show\-curves .
4844
-The specified curve will only be used for ECDH TLS\-ciphers.
4845
-
4846
-This option is not supported in mbed TLS builds of OpenVPN.
4847
-.\"*********************************************************
4848
-.TP
4849
-.B \-\-cert file
4850
-Local peer's signed certificate in .pem format \-\- must be signed
4851
-by a certificate authority whose certificate is in
4852
-.B \-\-ca file.
4853
-Each peer in an OpenVPN link running in TLS mode should have its own
4854
-certificate and private key file.  In addition, each certificate should
4855
-have been signed by the key of a certificate
4856
-authority whose public key resides in the
4857
-.B \-\-ca
4858
-certificate authority file.
4859
-You can easily make your own certificate authority (see above) or pay money
4860
-to use a commercial service such as thawte.com (in which case you will be
4861
-helping to finance the world's second space tourist :).
4862
-To generate a certificate,
4863
-you can use a command such as:
4864
-
4865
-.B openssl req \-nodes \-new \-keyout mycert.key \-out mycert.csr
4866
-
4867
-If your certificate authority private key lives on another machine, copy
4868
-the certificate signing request (mycert.csr) to this other machine (this can
4869
-be done over an insecure channel such as email).  Now sign the certificate
4870
-with a command such as:
4871
-
4872
-.B openssl ca \-out mycert.crt \-in mycert.csr
4873
-
4874
-Now copy the certificate (mycert.crt)
4875
-back to the peer which initially generated the .csr file (this
4876
-can be over a public medium).
4877
-Note that the
4878
-.B openssl ca
4879
-command reads the location of the certificate authority key from its
4880
-configuration file such as
4881
-.B /usr/share/ssl/openssl.cnf
4882
-\-\- note also
4883
-that for certificate authority functions, you must set up the files
4884
-.B index.txt
4885
-(may be empty) and
4886
-.B serial
4887
-(initialize to
4888
-.B 
4889
-01
4890
-).
4891
-.\"*********************************************************
4892
-.TP
4893
-.B \-\-extra\-certs file
4894
-Specify a
4895
-.B file
4896
-containing one or more PEM certs (concatenated together)
4897
-that complete the
4898
-local certificate chain.
4899
-
4900
-This option is useful for "split" CAs, where the CA for server
4901
-certs is different than the CA for client certs.  Putting certs
4902
-in this file allows them to be used to complete the local
4903
-certificate chain without trusting them to verify the peer\-submitted
4904
-certificate, as would be the case if the certs were placed in the
4905
-.B ca
4906
-file.
4907
-.\"*********************************************************
4908
-.TP
4909
-.B \-\-key file
4910
-Local peer's private key in .pem format.  Use the private key which was generated
4911
-when you built your peer's certificate (see
4912
-.B \-\-cert file
4913
-above).
4914
-.\"*********************************************************
4915
-.TP
4916
-.B \-\-tls\-version\-min version ['or\-highest']
4917
-Sets the minimum
4918
-TLS version we will accept from the peer (default is "1.0").
4919
-Examples for version
4920
-include "1.0", "1.1", or "1.2".  If 'or\-highest' is specified
4921
-and version is not recognized, we will only accept the highest TLS
4922
-version supported by the local SSL implementation.
4923
-.\"*********************************************************
4924
-.TP
4925
-.B \-\-tls\-version\-max version
4926
-Set the maximum TLS version we will use (default is the highest version
4927
-supported).  Examples for version include "1.0", "1.1", or "1.2".
4928
-.\"*********************************************************
4929
-.TP
4930
-.B \-\-pkcs12 file
4931
-Specify a PKCS #12 file containing local private key,
4932
-local certificate, and root CA certificate.
4933
-This option can be used instead of
4934
-.B \-\-ca, \-\-cert,
4935
-and
4936
-.B \-\-key.
4937
-Not available with mbed TLS.
4938
-.\"*********************************************************
4939
-.TP
4940
-.B \-\-verify\-hash hash [algo]
4941
-Specify SHA1 or SHA256 fingerprint for level\-1 cert.  The level\-1 cert is the
4942
-CA (or intermediate cert) that signs the leaf certificate, and is
4943
-one removed from the leaf certificate in the direction of the root.
4944
-When accepting a connection from a peer, the level\-1 cert
4945
-fingerprint must match
4946
-.B hash
4947
-or certificate verification will fail.  Hash is specified
4948
-as XX:XX:... For example:
4949
-
4950
-.nf
4951
-.ft 3
4952
-.in +4
4953
-AD:B0:95:D8:09:C8:36:45:12:A9:89:C8:90:09:CB:13:72:A6:AD:16
4954
-.in -4
4955
-.ft
4956
-.fi
4957
-
4958
-The
4959
-.B algo
4960
-flag can be either SHA1 or SHA256.  If not provided, it defaults to SHA1.
4961
-.\"*********************************************************
4962
-.TP
4963
-.B \-\-pkcs11\-cert\-private [0|1]...
4964
-Set if access to certificate object should be performed after login.
4965
-Every provider has its own setting.
4966
-.\"*********************************************************
4967
-.TP
4968
-.B \-\-pkcs11\-id name
4969
-Specify the serialized certificate id to be used. The id can be gotten
4970
-by the standalone
4971
-.B \-\-show\-pkcs11\-ids
4972
-option.
4973
-.\"*********************************************************
4974
-.TP
4975
-.B \-\-pkcs11\-id\-management
4976
-Acquire PKCS#11 id from management interface. In this case a NEED\-STR 'pkcs11\-id\-request'
4977
-real\-time message will be triggered, application may use pkcs11\-id\-count command to
4978
-retrieve available number of certificates, and pkcs11\-id\-get command to retrieve certificate
4979
-id and certificate body.
4980
-.\"*********************************************************
4981
-.TP
4982
-.B \-\-pkcs11\-pin\-cache seconds
4983
-Specify how many seconds the PIN can be cached, the default is until the token is removed.
4984
-.\"*********************************************************
4985
-.TP
4986
-.B \-\-pkcs11\-protected\-authentication [0|1]...
4987
-Use PKCS#11 protected authentication path, useful for biometric and external
4988
-keypad devices.
4989
-Every provider has its own setting.
4990
-.\"*********************************************************
4991
-.TP
4992
-.B \-\-pkcs11\-providers provider...
4993
-Specify a RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) providers
4994
-to load.
4995
-This option can be used instead of
4996
-.B \-\-cert, \-\-key,
4997
-and
4998
-.B \-\-pkcs12.
4999
-
5000
-If p11\-kit is present on the system, its
5001
-.B p11\-kit\-proxy.so
5002
-module will be loaded by default if either the
5003
-.B \-\-pkcs11\-id
5004
-or
5005
-.B \-\-pkcs11\-id\-management
5006
-options are specified without
5007
-.B \-\-pkcs11\-provider
5008
-being given.
5009
-.\"*********************************************************
5010
-.TP
5011
-.B \-\-pkcs11\-private\-mode mode...
5012
-Specify which method to use in order to perform private key operations.
5013
-A different mode can be specified for each provider.
5014
-Mode is encoded as hex number, and can be a mask one of the following:
5015
-
5016
-.B 0
5017
-(default) \-\- Try to determine automatically.
5018
-.br
5019
-.B 1
5020
-\-\- Use sign.
5021
-.br
5022
-.B 2
5023
-\-\- Use sign recover.
5024
-.br
5025
-.B 4
5026
-\-\- Use decrypt.
5027
-.br
5028
-.B 8
5029
-\-\- Use unwrap.
5030
-.br
5031
-.\"*********************************************************
5032
-.TP
5033
-.B \-\-cryptoapicert select\-string
5034
-Load the certificate and private key from the
5035
-Windows Certificate System Store (Windows/OpenSSL Only).
5036
-
5037
-Use this option instead of
5038
-.B \-\-cert
5039
-and
5040
-.B \-\-key.
5041
-
5042
-This makes
5043
-it possible to use any smart card, supported by Windows, but also any
5044
-kind of certificate, residing in the Cert Store, where you have access to
5045
-the private key.  This option has been tested with a couple of different
5046
-smart cards (GemSAFE, Cryptoflex, and Swedish Post Office eID) on the
5047
-client side, and also an imported PKCS12 software certificate on the
5048
-server side.
5049
-
5050
-To select a certificate, based on a substring search in the
5051
-certificate's subject:
5052
-
5053
-.B cryptoapicert
5054
-"SUBJ:Peter Runestig"
5055
-
5056
-To select a certificate, based on certificate's thumbprint:
5057
-
5058
-.B cryptoapicert
5059
-"THUMB:f6 49 24 41 01 b4 ..."
5060
-
5061
-The thumbprint hex string can easily be copy\-and\-pasted from the Windows
5062
-Certificate Store GUI.
5063
-
5064
-.\"*********************************************************
5065
-.TP
5066
-.B \-\-key\-method m
5067
-.B DEPRECATED
5068
-This option will be removed in OpenVPN 2.5
5069
-
5070
-Use data channel key negotiation method
5071
-.B m.
5072
-The key method must match on both sides of the connection.
5073
-
5074
-After OpenVPN negotiates a TLS session, a new set of keys
5075
-for protecting the tunnel data channel is generated and
5076
-exchanged over the TLS session.
5077
-
5078
-In method 1 (the default for OpenVPN 1.x), both sides generate
5079
-random encrypt and HMAC\-send keys which are forwarded to
5080
-the other host over the TLS channel. Method 1 is
5081
-.B deprecated in OpenVPN 2.4
5082
-, and
5083
-.B will be removed in OpenVPN 2.5\fR.
5084
-
5085
-In method 2, (the default for OpenVPN 2.0)
5086
-the client generates a random key.  Both client
5087
-and server also generate some random seed material.  All key source
5088
-material is exchanged over the TLS channel. The actual
5089
-keys are generated using the TLS PRF function, taking source
5090
-entropy from both client and server.  Method 2 is designed to
5091
-closely parallel the key generation process used by TLS 1.0.
5092
-
5093
-Note that in TLS mode, two separate levels 
5094
-of keying occur:
5095
-
5096
-(1) The TLS connection is initially negotiated, with both sides
5097
-of the connection producing certificates and verifying the certificate
5098
-(or other authentication info provided) of
5099
-the other side.  The
5100
-.B \-\-key\-method
5101
-parameter has no effect on this process.
5102
-
5103
-(2) After the TLS connection is established, the tunnel session keys are
5104
-separately negotiated over the existing secure TLS channel.  Here,
5105
-.B \-\-key\-method
5106
-determines the derivation of the tunnel session keys.
5107
-.\"*********************************************************
5108
-.TP
5109
-.B \-\-tls\-cipher l
5110
-.TQ
5111
-.B \-\-tls\-ciphersuites l
5112
-A list
5113
-.B l
5114
-of allowable TLS ciphers delimited by a colon (":").
5115
-
5116
-These setting can be used to ensure that certain cipher suites are used (or
5117
-not used) for the TLS connection.  OpenVPN uses TLS to secure the control
5118
-channel, over which the keys that are used to protect the actual VPN traffic
5119
-are exchanged.
5120
-
5121
-The supplied list of ciphers is (after potential OpenSSL/IANA name translation)
5122
-simply supplied to the crypto library.  Please see the OpenSSL and/or mbed TLS
5123
-documentation for details on the cipher list interpretation.
5124
-
5125
-For OpenSSL, the
5126
-.B \-\-tls-cipher
5127
-is used for TLS 1.2 and below. For TLS 1.3 and up, the
5128
-.B \-\-tls\-ciphersuites
5129
-setting is used. mbed TLS has no TLS 1.3 support yet and only the
5130
-.B \-\-tls-cipher
5131
-setting is used.
5132
-
5133
-Use
5134
-.B \-\-show\-tls
5135
-to see a list of TLS ciphers supported by your crypto library.
5136
-
5137
-Warning!
5138
-.B \-\-tls\-cipher
5139
-and
5140
-.B \-\-tls\-ciphersuites
5141
-are expert features, which \- if used correctly \- can improve the security of
5142
-your VPN connection.  But it is also easy to unwittingly use them to carefully
5143
-align a gun with your foot, or just break your connection.  Use with care!
5144
-
5145
-The default for \-\-tls\-cipher is to use mbed TLS's default cipher list
5146
-when using mbed TLS or
5147
-"DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA" when using
5148
-OpenSSL.
5149
-
5150
-The default for \-\-tls\-ciphersuites is to use the crypto library's default.
5151
-.\"*********************************************************
5152
-.TP
5153
-.B \-\-tls\-cert\-profile profile
5154
-Set the allowed cryptographic algorithms for certificates according to
5155
-.B profile\fN.
5156
-
5157
-The following profiles are supported:
5158
-
5159
-.B legacy
5160
-(default): SHA1 and newer, RSA 2048-bit+, any elliptic curve.
5161
-
5162
-.B preferred
5163
-: SHA2 and newer, RSA 2048-bit+, any elliptic curve.
5164
-
5165
-.B suiteb
5166
-: SHA256/SHA384, ECDSA with P-256 or P-384.
5167
-
5168
-This option is only fully supported for mbed TLS builds.  OpenSSL builds use
5169
-the following approximation:
5170
-
5171
-.B legacy
5172
-(default): sets "security level 1"
5173
-
5174
-.B preferred
5175
-: sets "security level 2"
5176
-
5177
-.B suiteb
5178
-: sets "security level 3" and \-\-tls\-cipher "SUITEB128".
5179
-
5180
-OpenVPN will migrate to 'preferred' as default in the future.  Please ensure
5181
-that your keys already comply.
5182
-.\"*********************************************************
5183
-.TP
5184
-.B \-\-tls\-timeout n
5185
-Packet retransmit timeout on TLS control channel
5186
-if no acknowledgment from remote within
5187
-.B n
5188
-seconds (default=2).  When OpenVPN sends a control
5189
-packet to its peer, it will expect to receive an
5190
-acknowledgement within
5191
-.B n
5192
-seconds or it will retransmit the packet, subject
5193
-to a TCP\-like exponential backoff algorithm.  This parameter
5194
-only applies to control channel packets.  Data channel
5195
-packets (which carry encrypted tunnel data) are never
5196
-acknowledged, sequenced, or retransmitted by OpenVPN because
5197
-the higher level network protocols running on top of the tunnel
5198
-such as TCP expect this role to be left to them.
5199
-.\"*********************************************************
5200
-.TP
5201
-.B \-\-reneg\-bytes n
5202
-Renegotiate data channel key after
5203
-.B n
5204
-bytes sent or received (disabled by default with an exception, see below).
5205
-OpenVPN allows the lifetime of a key
5206
-to be expressed as a number of bytes encrypted/decrypted, a number of packets,
5207
-or a number of seconds.  A key renegotiation will be forced
5208
-if any of these three criteria are met by either peer.
5209
-
5210
-If using ciphers with cipher block sizes less than 128\-bits, \-\-reneg\-bytes is
5211
-set to 64MB by default, unless it is explicitly disabled by setting the value to
5212
-0, but this is
5213
-.B HIGHLY DISCOURAGED
5214
-as this is designed to add some protection against the SWEET32 attack vector.
5215
-For more information see the \-\-cipher option.
5216
-.\"*********************************************************
5217
-.TP
5218
-.B \-\-reneg\-pkts n
5219
-Renegotiate data channel key after
5220
-.B n
5221
-packets sent and received (disabled by default).
5222
-.\"*********************************************************
5223
-.TP
5224
-.B \-\-reneg\-sec max [min]
5225
-Renegotiate data channel key after at most
5226
-.B max
5227
-seconds (default=3600) and at least
5228
-.B min
5229
-seconds (default is 90% of
5230
-.B max
5231
-for servers, and equal to
5232
-.B max
5233
-for clients).
5234
-
5235
-The effective
5236
-.B reneg\-sec
5237
-value used is per session pseudo-uniform-randomized between
5238
-.B min
5239
-and
5240
-.B max\fR.
5241
-
5242
-With the default value of 3600 this results in an effective per session value
5243
-in the range of 3240..3600 seconds for servers, or just 3600 for clients.
5244
-
5245
-When using dual\-factor authentication, note that this default value may
5246
-cause the end user to be challenged to reauthorize once per hour.
5247
-
5248
-Also, keep in mind that this option can be used on both the client and server,
5249
-and whichever uses the lower value will be the one to trigger the renegotiation.
5250
-A common mistake is to set
5251
-.B \-\-reneg\-sec
5252
-to a higher value on either the client or server, while the other side of the connection
5253
-is still using the default value of 3600 seconds, meaning that the renegotiation will
5254
-still occur once per 3600 seconds.  The solution is to increase \-\-reneg\-sec on both the
5255
-client and server, or set it to 0 on one side of the connection (to disable), and to
5256
-your chosen value on the other side.
5257
-.\"*********************************************************
5258
-.TP
5259
-.B \-\-hand\-window n
5260
-Handshake Window \-\- the TLS\-based key exchange must finalize within
5261
-.B n
5262
-seconds
5263
-of handshake initiation by any peer (default = 60 seconds).
5264
-If the handshake fails
5265
-we will attempt to reset our connection with our peer and try again.
5266
-Even in the event of handshake failure we will still use
5267
-our expiring key for up to
5268
-.B \-\-tran\-window
5269
-seconds to maintain continuity of transmission of tunnel
5270
-data.
5271
-.\"*********************************************************
5272
-.TP
5273
-.B \-\-tran\-window n
5274
-Transition window \-\- our old key can live this many seconds
5275
-after a new a key renegotiation begins (default = 3600 seconds).
5276
-This feature allows for a graceful transition from old to new
5277
-key, and removes the key renegotiation sequence from the critical
5278
-path of tunnel data forwarding.
5279
-.\"*********************************************************
5280
-.TP
5281
-.B \-\-single\-session
5282
-After initially connecting to a remote peer, disallow any new connections.
5283
-Using this
5284
-option means that a remote peer cannot connect, disconnect, and then
5285
-reconnect.
5286
-
5287
-If the daemon is reset by a signal or
5288
-.B \-\-ping\-restart,
5289
-it will allow one new connection.
5290
-
5291
-.B \-\-single\-session
5292
-can be used with
5293
-.B \-\-ping\-exit
5294
-or
5295
-.B \-\-inactive
5296
-to create a single dynamic session that will exit when finished.
5297
-.\"*********************************************************
5298
-.TP
5299
-.B \-\-tls\-exit
5300
-Exit on TLS negotiation failure.
5301
-.\"*********************************************************
5302
-.TP
5303
-.B \-\-tls\-auth file [direction]
5304
-Add an additional layer of HMAC authentication on top of the TLS control channel
5305
-to mitigate DoS attacks and attacks on the TLS stack.
5306
-
5307
-In a nutshell,
5308
-.B \-\-tls\-auth
5309
-enables a kind of "HMAC firewall" on OpenVPN's TCP/UDP port,
5310
-where TLS control channel packets
5311
-bearing an incorrect HMAC signature can be dropped immediately without
5312
-response.
5313
-
5314
-.B file
5315
-(required) is a file in OpenVPN static key format which can be generated by
5316
-.B \-\-genkey
5317
-
5318
-Older versions (up to OpenVPN 2.3) supported a freeform passphrase file.
5319
-This is no longer supported in newer versions (v2.4+).
5320
-
5321
-See the
5322
-.B \-\-secret
5323
-option for more information on the optional
5324
-.B direction
5325
-parameter.
5326
-
5327
-.B \-\-tls\-auth
5328
-is recommended when you are running OpenVPN in a mode where
5329
-it is listening for packets from any IP address, such as when
5330
-.B \-\-remote
5331
-is not specified, or
5332
-.B \-\-remote
5333
-is specified with
5334
-.B \-\-float.
5335
-
5336
-The rationale for
5337
-this feature is as follows.  TLS requires a multi\-packet exchange
5338
-before it is able to authenticate a peer.  During this time
5339
-before authentication, OpenVPN is allocating resources (memory
5340
-and CPU) to this potential peer.  The potential peer is also
5341
-exposing many parts of OpenVPN and the OpenSSL library to the packets
5342
-it is sending.  Most successful network attacks today seek
5343
-to either exploit bugs in programs (such as buffer overflow attacks) or
5344
-force a program to consume so many resources that it becomes unusable.
5345
-Of course the first line of defense is always to produce clean,
5346
-well\-audited code.  OpenVPN has been written with buffer overflow
5347
-attack prevention as a top priority.
5348
-But as history has shown, many of the most widely used
5349
-network applications have, from time to time,
5350
-fallen to buffer overflow attacks.
5351
-
5352
-So as a second line of defense, OpenVPN offers
5353
-this special layer of authentication on top of the TLS control channel so that
5354
-every packet on the control channel is authenticated by an
5355
-HMAC signature and a unique ID for replay protection.
5356
-This signature will also help protect against DoS (Denial of Service) attacks.
5357
-An important rule of thumb in reducing vulnerability to DoS attacks is to
5358
-minimize the amount of resources a potential, but as yet unauthenticated,
5359
-client is able to consume.
5360
-
5361
-.B \-\-tls\-auth
5362
-does this by signing every TLS control channel packet with an HMAC signature,
5363
-including packets which are sent before the TLS level has had a chance
5364
-to authenticate the peer.
5365
-The result is that packets without
5366
-the correct signature can be dropped immediately upon reception,
5367
-before they have a chance to consume additional system resources
5368
-such as by initiating a TLS handshake.
5369
-.B \-\-tls\-auth
5370
-can be strengthened by adding the
5371
-.B \-\-replay\-persist
5372
-option which will keep OpenVPN's replay protection state
5373
-in a file so that it is not lost across restarts.
5374
-
5375
-It should be emphasized that this feature is optional and that the
5376
-key file used with
5377
-.B \-\-tls\-auth
5378
-gives a peer nothing more than the power to initiate a TLS
5379
-handshake.  It is not used to encrypt or authenticate any tunnel data.
5380
-
5381
-Use
5382
-.B \-\-tls\-crypt
5383
-instead if you want to use the key file to not only authenticate, but also
5384
-encrypt the TLS control channel.
5385
-.\"*********************************************************
5386
-.TP
5387
-.B \-\-tls\-crypt keyfile
5388
-
5389
-Encrypt and authenticate all control channel packets with the key from
5390
-.B keyfile.
5391
-(See
5392
-.B \-\-tls\-auth
5393
-for more background.)
5394
-
5395
-Encrypting (and authenticating) control channel packets:
5396
-.RS
5397
-.IP \[bu] 2
5398
-provides more privacy by hiding the certificate used for the TLS connection,
5399
-.IP \[bu]
5400
-makes it harder to identify OpenVPN traffic as such,
5401
-.IP \[bu]
5402
-provides "poor\-man's" post\-quantum security, against attackers who will never
5403
-know the pre\-shared key (i.e. no forward secrecy).
5404
-.RE
5405
-
5406
-.IP
5407
-In contrast to
5408
-.B \-\-tls\-auth\fR,
5409
-.B \-\-tls\-crypt
5410
-does *not* require the user to set
5411
-.B \-\-key\-direction\fR.
5412
-
5413
-.B Security Considerations
5414
-
5415
-All peers use the same
5416
-.B \-\-tls\-crypt
5417
-pre\-shared group key to authenticate and encrypt control channel messages.  To
5418
-ensure that IV collisions remain unlikely, this key should not be used to
5419
-encrypt more than 2^48 client\-to\-server or 2^48 server\-to\-client control
5420
-channel messages.  A typical initial negotiation is about 10 packets in each
5421
-direction.  Assuming both initial negotiation and renegotiations are at most
5422
-2^16 (65536) packets (to be conservative), and (re)negotiations happen each
5423
-minute for each user (24/7), this limits the tls\-crypt key lifetime to 8171
5424
-years divided by the number of users.  So a setup with 1000 users should rotate
5425
-the key at least once each eight years.  (And a setup with 8000 users each
5426
-year.)
5427
-
5428
-If IV collisions were to occur, this could result in the security of
5429
-.B \-\-tls\-crypt
5430
-degrading to the same security as using
5431
-.B \-\-tls\-auth\fR.
5432
-That is, the control channel still benefits from the extra protection against
5433
-active man\-in\-the\-middle\-attacks and DoS attacks, but may no longer offer
5434
-extra privacy and post\-quantum security on top of what TLS itself offers.
5435
-
5436
-For large setups or setups where clients are not trusted, consider using
5437
-.B \-\-tls\-crypt\-v2
5438
-instead.  That uses per\-client unique keys, and thereby improves the bounds to
5439
-\fR'rotate a client key at least once per 8000 years'.
5440
-.\"*********************************************************
5441
-.TP
5442
-.B \-\-tls\-crypt\-v2 keyfile
5443
-
5444
-Use client\-specific tls\-crypt keys.
5445
-
5446
-For clients,
5447
-.B keyfile
5448
-is a client\-specific tls\-crypt key.  Such a key can be generated using the
5449
-.B \-\-genkey tls\-crypt\-v2\-client
5450
-option.
5451
-
5452
-For servers,
5453
-.B keyfile
5454
-is used to unwrap client\-specific keys supplied by the client during connection
5455
-setup.  This key must be the same as the key used to generate the
5456
-client\-specific key (see
5457
-.B \-\-genkey tls\-crypt\-v2\-client\fR).
5458
-
5459
-On servers, this option can be used together with the
5460
-.B \-\-tls\-auth
5461
-or
5462
-.B \-\-tls\-crypt
5463
-option.  In that case, the server will detect whether the client is using
5464
-client\-specific keys, and automatically select the right mode.
5465
-.\"*********************************************************
5466
-.TP
5467
-.B \-\-tls\-crypt\-v2\-verify cmd
5468
-
5469
-Run command
5470
-.B cmd
5471
-to verify the metadata of the client\-specific tls\-crypt\-v2 key of a
5472
-connecting client.  This allows server administrators to reject client
5473
-connections, before exposing the TLS stack (including the notoriously dangerous
5474
-X.509 and ASN.1 stacks) to the connecting client.
5475
-
5476
-OpenVPN supplies the following env vars to the command:
5477
-.RS
5478
-.IP \[bu] 2
5479
-script_type is set to "tls\-crypt\-v2\-verify"
5480
-.IP \[bu]
5481
-metadata_type is set to "0" if the metadata was user supplied, or "1" if it's a
5482
-64\-bit unix timestamp representing the key creation time.
5483
-.IP \[bu]
5484
-metadata_file contains the filename of a temporary file that contains the client
5485
-metadata.
5486
-.RE
5487
-
5488
-.IP
5489
-The command can reject the connection by exiting with a non-zero exit code.
5490
-.\"*********************************************************
5491
-.TP
5492
-.B \-\-askpass [file]
5493
-Get certificate password from console or
5494
-.B file
5495
-before we daemonize.
5496
-
5497
-For the extremely
5498
-security conscious, it is possible to protect your private key with
5499
-a password.  Of course this means that every time the OpenVPN
5500
-daemon is started you must be there to type the password.  The
5501
-.B \-\-askpass
5502
-option allows you to start OpenVPN from the command line.  It will
5503
-query you for a password before it daemonizes.  To protect a private
5504
-key with a password you should omit the
5505
-.B \-nodes
5506
-option when you use the
5507
-.B openssl
5508
-command line tool to manage certificates and private keys.
5509
-
5510
-If
5511
-.B file
5512
-is specified, read the password from the first line of
5513
-.B file.
5514
-Keep in mind that storing your password in a file
5515
-to a certain extent invalidates the extra security provided by
5516
-using an encrypted key.
5517
-.\"*********************************************************
5518
-.TP
5519
-.B \-\-auth\-nocache
5520
-Don't cache
5521
-.B \-\-askpass
5522
-or
5523
-.B \-\-auth\-user\-pass
5524
-username/passwords in virtual memory.
5525
-
5526
-If specified, this directive will cause OpenVPN to immediately
5527
-forget username/password inputs after they are used.  As a result,
5528
-when OpenVPN needs a username/password, it will prompt for input
5529
-from stdin, which may be multiple times during the duration of an
5530
-OpenVPN session.
5531
-
5532
-When using \-\-auth\-nocache in combination with a user/password file
5533
-and \-\-chroot or \-\-daemon, make sure to use an absolute path.
5534
-
5535
-This directive does not affect the
5536
-.B \-\-http\-proxy
5537
-username/password.  It is always cached.
5538
-.\"*********************************************************
5539
-.TP
5540
-.B \-\-auth\-token token
5541
-This is not an option to be used directly in any configuration files,
5542
-but rather push this option from a
5543
-.B \-\-client\-connect
5544
-script or a
5545
-.B \-\-plugin
5546
-which hooks into the OPENVPN_PLUGIN_CLIENT_CONNECT or
5547
-OPENVPN_PLUGIN_CLIENT_CONNECT_V2 calls.  This option provides
5548
-a possibility to replace the clients password with an authentication
5549
-token during the lifetime of the OpenVPN client.
5550
-
5551
-Whenever the connection is renegotiated and the
5552
-.B \-\-auth\-user\-pass\-verify
5553
-script or
5554
-.B \-\-plugin
5555
-making use of the OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY hook is
5556
-triggered, it will pass over this token as the password
5557
-instead of the password the user provided.  The authentication
5558
-token can only be reset by a full reconnect where the server
5559
-can push new options to the client.  The password the user entered
5560
-is never preserved once an authentication token have been set.  If
5561
-the OpenVPN server side rejects the authentication token, the
5562
-client will receive an AUTH_FAIL and disconnect.
5563
-
5564
-The purpose of this is to enable two factor authentication
5565
-methods, such as HOTP or TOTP, to be used without needing to
5566
-retrieve a new OTP code each time the connection is renegotiated.
5567
-Another use case is to cache authentication data on the client
5568
-without needing to have the users password cached in memory
5569
-during the life time of the session.
5570
-
5571
-To make use of this feature, the
5572
-.B \-\-client\-connect
5573
-script or
5574
-.B \-\-plugin
5575
-needs to put
5576
-
5577
-.nf
5578
-.ft 3
5579
-.in +4
5580
-push "auth\-token UNIQUE_TOKEN_VALUE"
5581
-.in -4
5582
-.ft
5583
-.fi
5584
-
5585
-into the file/buffer for dynamic configuration data.  This
5586
-will then make the OpenVPN server to push this value to the
5587
-client, which replaces the local password with the
5588
-UNIQUE_TOKEN_VALUE.
5589
-
5590
-Newer clients (2.4.7+) will fall back to the original password method
5591
-after a failed auth. Older clients will keep using the token value
5592
-and react according to
5593
-.B \-\-auth-retry
5594
-.
5595
-.\"*********************************************************
5596
-.TP
5597
-.B \-\-tls\-verify cmd
5598
-Run command
5599
-.B cmd
5600
-to verify the X509 name of a
5601
-pending TLS connection that has otherwise passed all other
5602
-tests of certification (except for revocation via
5603
-.B \-\-crl\-verify
5604
-directive; the revocation test occurs after the
5605
-.B \-\-tls\-verify
5606
-test).
5607
-
5608
-.B cmd
5609
-should return 0 to allow the TLS handshake to proceed, or 1 to fail.
5610
-
5611
-.B cmd
5612
-consists of a path to script (or executable program), optionally
5613
-followed by arguments. The path and arguments may be single\- or double\-quoted
5614
-and/or escaped using a backslash, and should be separated by one or more spaces.
5615
-
5616
-When
5617
-.B cmd
5618
-is executed two arguments are appended after any arguments specified in
5619
-.B cmd
5620
-, as follows:
5621
-
5622
-.B cmd certificate_depth subject
5623
-
5624
-These arguments are, respectively, the current certificate depth and
5625
-the X509 subject distinguished name (dn) of the peer.
5626
-
5627
-This feature is useful if the peer you want to trust has a certificate
5628
-which was signed by a certificate authority who also signed many
5629
-other certificates, where you don't necessarily want to trust all of them,
5630
-but rather be selective about which
5631
-peer certificate you will accept.  This feature allows you to write a script
5632
-which will test the X509 name on a certificate and decide whether or
5633
-not it should be accepted.  For a simple perl script which will test
5634
-the common name field on the certificate, see the file
5635
-.B verify\-cn
5636
-in the OpenVPN distribution.
5637
-
5638
-See the "Environmental Variables" section below for
5639
-additional parameters passed as environmental variables.
5640
-.\"*********************************************************
5641
-.TP
5642
-.B \-\-tls\-export\-cert directory
5643
-Store the certificates the clients uses upon connection to this
5644
-directory. This will be done before \-\-tls\-verify is called.  The
5645
-certificates will use a temporary name and will be deleted when
5646
-the tls\-verify script returns.  The file name used for the certificate
5647
-is available via the peer_cert environment variable.
5648
-.\"*********************************************************
5649
-.TP
5650
-.B \-\-x509\-username\-field [ext:\]fieldname
5651
-Field in the X.509 certificate subject to be used as the username (default=CN).
5652
-Typically, this option is specified with
5653
-.B fieldname
5654
-as either of the following:
5655
-
5656
-.B \-\-x509\-username\-field
5657
-emailAddress
5658
-.br
5659
-.B \-\-x509\-username\-field ext:\fRsubjectAltName
5660
-
5661
-The first example uses the value of the "emailAddress" attribute in the
5662
-certificate's Subject field as the username.  The second example uses
5663
-the
5664
-.B ext:
5665
-prefix to signify that the X.509 extension
5666
-.B fieldname
5667
-"subjectAltName" be searched for an rfc822Name (email) field to be used
5668
-as the username.  In cases where there are multiple email addresses
5669
-in
5670
-.B ext:fieldname\fR,
5671
-the last occurrence is chosen.
5672
-
5673
-When this option is used, the
5674
-.B \-\-verify\-x509\-name
5675
-option will match against the chosen
5676
-.B fieldname
5677
-instead of the Common Name.
5678
-
5679
-Only the subjectAltName and issuerAltName X.509 extensions are supported.
5680
-
5681
-.B Please note:
5682
-This option has a feature which will convert an all\-lowercase
5683
-.B fieldname
5684
-to uppercase characters, e.g., ou \-> OU.  A mixed\-case
5685
-.B fieldname
5686
-or one having the
5687
-.B ext:
5688
-prefix will be left as\-is.  This automatic upcasing feature
5689
-is deprecated and will be removed in a future release.
5690
-.\"*********************************************************
5691
-.TP
5692
-.B \-\-verify\-x509\-name name type
5693
-Accept connections only if a host's X.509 name is equal to
5694
-.B name.
5695
-The remote host must also pass all other tests of verification.
5696
-
5697
-Which X.509 name is compared to
5698
-.B name
5699
-depends on the setting of type.
5700
-.B type
5701
-can be "subject" to match the complete subject DN (default),
5702
-"name" to match a subject RDN or "name\-prefix" to match a subject RDN prefix.
5703
-Which RDN is verified as name depends on the
5704
-.B \-\-x509\-username\-field
5705
-option. But it defaults to the common name (CN), e.g. a certificate with a
5706
-subject DN "C=KG, ST=NA, L=Bishkek, CN=Server\-1" would be matched by:
5707
-
5708
-.B \-\-verify\-x509\-name 'C=KG, ST=NA, L=Bishkek, CN=Server\-1'
5709
-and
5710
-.B \-\-verify\-x509\-name Server\-1 name
5711
-or you could use
5712
-.B \-\-verify\-x509\-name Server\- name\-prefix
5713
-if you want a client to only accept connections to "Server\-1", "Server\-2", etc.
5714
-
5715
-.B \-\-verify\-x509\-name
5716
-is a useful replacement for the
5717
-.B \-\-tls\-verify
5718
-option to verify the remote host, because
5719
-.B \-\-verify\-x509\-name
5720
-works in a
5721
-.B \-\-chroot
5722
-environment without any dependencies.
5723
-
5724
-Using a name prefix is a useful alternative to managing
5725
-a CRL (Certificate Revocation List) on the client, since it allows the client
5726
-to refuse all certificates except for those associated
5727
-with designated servers.
5728
-
5729
-.B NOTE:
5730
-Test against a name prefix only when you are using OpenVPN with
5731
-a custom CA certificate that is under your control.
5732
-Never use this option with type "name\-prefix" when your client certificates
5733
-are signed by a third party, such as a commercial web CA.
5734
-.\"*********************************************************
5735
-.TP
5736
-.B \-\-x509\-track attribute
5737
-Save peer X509
5738
-.B attribute
5739
-value in environment for use by plugins and management interface.
5740
-Prepend a '+' to
5741
-.B attribute
5742
-to save values from full cert chain.  Values will be encoded
5743
-as X509_<depth>_<attribute>=<value>.  Multiple
5744
-.B \-\-x509\-track
5745
-options can be defined to track multiple attributes.
5746
-.\"*********************************************************
5747
-.TP
5748
-.B \-\-ns\-cert\-type client|server
5749
-.B DEPRECATED
5750
-This option will be removed in OpenVPN 2.5.  Use the more modern equivalent
5751
-.B \-\-remote\-cert\-tls
5752
-instead.  This option will be removed in OpenVPN 2.5.
5753
-
5754
-Require that peer certificate was signed with an explicit
5755
-.B nsCertType
5756
-designation of "client" or "server".
5757
-
5758
-This is a useful security option for clients, to ensure that
5759
-the host they connect with is a designated server.
5760
-
5761
-See the easy\-rsa/build\-key\-server script for an example
5762
-of how to generate a certificate with the
5763
-.B nsCertType
5764
-field set to "server".
5765
-
5766
-If the server certificate's nsCertType field is set
5767
-to "server", then the clients can verify this with
5768
-.B \-\-ns\-cert\-type server.
5769
-
5770
-This is an important security precaution to protect against
5771
-a man\-in\-the\-middle attack where an authorized client
5772
-attempts to connect to another client by impersonating the server.
5773
-The attack is easily prevented by having clients verify
5774
-the server certificate using any one of
5775
-.B \-\-ns\-cert\-type, \-\-verify\-x509\-name,
5776
-or
5777
-.B \-\-tls\-verify.
5778
-.\"*********************************************************
5779
-.TP
5780
-.B \-\-remote\-cert\-ku [v...]
5781
-Require that peer certificate was signed with an explicit
5782
-.B key usage.
5783
-
5784
-If present in the certificate, the keyUsage value is validated by the TLS
5785
-library during the TLS handshake.  Specifying this option without arguments
5786
-requires this extension to be present (so the TLS library will verify it).
5787
-
5788
-If the list
5789
-.B v...
5790
-is also supplied, the keyUsage field must have
5791
-.B at least
5792
-the same bits set as the bits in
5793
-.B one of
5794
-the values supplied in the list
5795
-.B v...
5796
-
5797
-The key usage values in the list must be encoded in hex, e.g.
5798
-"\-\-remote\-cert\-ku a0"
5799
-.\"*********************************************************
5800
-.TP
5801
-.B \-\-remote\-cert\-eku oid
5802
-Require that peer certificate was signed with an explicit
5803
-.B extended key usage.
5804
-
5805
-This is a useful security option for clients, to ensure that
5806
-the host they connect to is a designated server.
5807
-
5808
-The extended key usage should be encoded in oid notation, or
5809
-OpenSSL symbolic representation.
5810
-.\"*********************************************************
5811
-.TP
5812
-.B \-\-remote\-cert\-tls client|server
5813
-Require that peer certificate was signed with an explicit
5814
-.B key usage
5815
-and
5816
-.B extended key usage
5817
-based on RFC3280 TLS rules.
5818
-
5819
-This is a useful security option for clients, to ensure that the host they
5820
-connect to is a designated server.  Or the other way around; for a server to
5821
-verify that only hosts with a client certificate can connect.
5822
-
5823
-The
5824
-.B \-\-remote\-cert\-tls client
5825
-option is equivalent to
5826
-.B
5827
-\-\-remote\-cert\-ku \-\-remote\-cert\-eku "TLS Web Client Authentication"
5828
-
5829
-The
5830
-.B \-\-remote\-cert\-tls server
5831
-option is equivalent to
5832
-.B
5833
-\-\-remote\-cert\-ku \-\-remote\-cert\-eku "TLS Web Server Authentication"
5834
-
5835
-This is an important security precaution to protect against
5836
-a man\-in\-the\-middle attack where an authorized client
5837
-attempts to connect to another client by impersonating the server.
5838
-The attack is easily prevented by having clients verify
5839
-the server certificate using any one of
5840
-.B \-\-remote\-cert\-tls, \-\-verify\-x509\-name,
5841
-or
5842
-.B \-\-tls\-verify.
5843
-.\"*********************************************************
5844
-.TP
5845
-.B \-\-crl\-verify crl ['dir']
5846
-Check peer certificate against the file
5847
-.B crl
5848
-in PEM format.
5849
-
5850
-A CRL (certificate revocation list) is used when a particular key is
5851
-compromised but when the overall PKI is still intact.
5852
-
5853
-Suppose you had a PKI consisting of a CA, root certificate, and a number of
5854
-client certificates.  Suppose a laptop computer containing a client key and
5855
-certificate was stolen.  By adding the stolen certificate to the CRL file,
5856
-you could reject any connection which attempts to use it, while preserving the
5857
-overall integrity of the PKI.
5858
-
5859
-The only time when it would be necessary to rebuild the entire PKI from scratch would be
5860
-if the root certificate key itself was compromised.
5861
-
5862
-The option is not mandatory \- if the relevant CRL is missing, OpenVPN will log
5863
-a warning in the logs \- e.g. "\fIVERIFY WARNING: depth=0, unable to get
5864
-certificate CRL\fR" \- but the connection will be allowed.
5865
-
5866
-If the optional
5867
-.B dir
5868
-flag is specified, enable a different mode where
5869
-.B crl
5870
-is a directory containing files named as revoked serial numbers
5871
-(the files may be empty, the contents are never read).  If a client
5872
-requests a connection, where the client certificate serial number
5873
-(decimal string) is the name of a file present in the directory,
5874
-it will be rejected.
5875
-
5876
-Note: As the crl file (or directory) is read every time a peer connects,
5877
-if you are dropping root privileges with
5878
-.B \-\-user,
5879
-make sure that this user has sufficient privileges to read the file.
5880
-.\"*********************************************************
5881
-.SS SSL Library information:
5882
-.\"*********************************************************
5883
-.TP
5884
-.B \-\-show\-ciphers
5885
-(Standalone)
5886
-Show all cipher algorithms to use with the
5887
-.B \-\-cipher
5888
-option.
5889
-.\"*********************************************************
5890
-.TP
5891
-.B \-\-show\-digests
5892
-(Standalone)
5893
-Show all message digest algorithms to use with the
5894
-.B \-\-auth
5895
-option.
5896
-.\"*********************************************************
5897
-.TP
5898
-.B \-\-show\-tls
5899
-(Standalone)
5900
-Show all TLS ciphers supported by the crypto library.  OpenVPN uses TLS to
5901
-secure the control channel, over which the keys that are used to protect the
5902
-actual VPN traffic are exchanged.  The TLS ciphers will be sorted from highest
5903
-preference (most secure) to lowest.
5904
-
5905
-Be aware that whether a cipher suite in this list can actually work depends on
5906
-the specific setup of both peers (e.g. both peers must support the cipher, and
5907
-an ECDSA cipher suite will not work if you are using an RSA certificate, etc.).
5908
-.\"*********************************************************
5909
-.TP
5910
-.B \-\-show\-engines
5911
-(Standalone)
5912
-Show currently available hardware\-based crypto acceleration
5913
-engines supported by the OpenSSL library.
5914
-.\"*********************************************************
5915
-.TP
5916
-.B \-\-show\-curves
5917
-(Standalone)
5918
-Show all available elliptic curves to use with the
5919
-.B \-\-ecdh\-curve
5920
-option.
5921
-.\"*********************************************************
5922
-.SS Generating key material:
5923
-.\"*********************************************************
5924
-.TP
5925
-.B \-\-genkey keytype keyfile
5926
-(Standalone)
5927
-Generate a key to be used of the type keytype. if keyfile is left out or empty
5928
-the key will be output on stdout. See the following sections for the different keytypes.
5929
-
5930
-.\"*********************************************************
5931
-.TP
5932
-.B \-\-genkey secret|tls\-crypt|tls\-auth keyfile
5933
-Generate a shared secret, for use with the
5934
-.B \-\-secret
5935
-,
5936
-.B \-\-tls\-auth
5937
-or
5938
-.B \-\-tls\-crypt
5939
-options.  Stores the key in
5940
-.B file\fR.
5941
-All three variants (secret, tls-crypt, and tls-auth) generate the same type of
5942
-key. The aliases are added for convenience.
5943
-
5944
-If using this for
5945
-.B \-\-secret
5946
-, this file must be shared with the peer over a pre\-existing secure channel
5947
-such as
5948
-.BR scp (1)\fR.
5949
-.\"*********************************************************
5950
-.TP
5951
-.B \-\-genkey tls\-crypt\-v2\-server keyfile
5952
-
5953
-Generate a \-\-tls\-crypt\-v2 server key and store the key in
5954
-.B keyfile\fR.
5955
-
5956
-.TP
5957
-.B \-\-genkey tls\-crypt\-v2\-client keyfile [metadata]
5958
-
5959
-Generate a \-\-tls\-crypt\-v2 client key, and store the key in
5960
-.B keyfile\fR.
5961
-
5962
-If supplied, include the supplied
5963
-.B metadata
5964
-in the wrapped client key.  This metadata must be supplied in base64\-encoded
5965
-form.  The metadata must be at most 735 bytes long (980 bytes in base64).
5966
-
5967
-If no metadata is supplied, OpenVPN will use a 64\-bit unix timestamp
5968
-representing the current time in UTC, encoded in network order, as metadata for
5969
-the generated key.
5970
-
5971
-A tls\-crypt\-v2 client key is wrapped using a server key.  To generate a
5972
-client key, the user must therefore supply the server key using the
5973
-.B \-\-tls\-crypt\-v2
5974
-option.
5975
-
5976
-Servers can use
5977
-.B \-\-tls\-crypt\-v2\-verify
5978
-to specify a metadata verification command.
5979
-.\"*********************************************************
5980
-.TP
5981
-.B \-\-genkey auth\-token [keyfile]
5982
-Generate a new secret that can be used
5983
-with
5984
-.B \-\-auth\-gen\-token\-secret
5985
-
5986
-.B Note:
5987
-this file should be kept secret to the server as anyone
5988
-that access to this file will be to generate auth tokens
5989
-that the OpenVPN server will accept as valid.
5990
-.\"*********************************************************
5991
-.SS TUN/TAP persistent tunnel config mode:
5992
-Available with Linux 2.4.7+.  These options comprise a standalone mode
5993
-of OpenVPN which can be used to create and delete persistent tunnels.
5994
-.\"*********************************************************
5995
-.TP
5996
-.B \-\-mktun
5997
-(Standalone)
5998
-Create a persistent tunnel on platforms which support them such
5999
-as Linux.  Normally TUN/TAP tunnels exist only for
6000
-the period of time that an application has them open.  This option
6001
-takes advantage of the TUN/TAP driver's ability to build persistent
6002
-tunnels that live through multiple instantiations of OpenVPN and die
6003
-only when they are deleted or the machine is rebooted.
6004
-
6005
-One of the advantages of persistent tunnels is that they eliminate the
6006
-need for separate
6007
-.B \-\-up
6008
-and
6009
-.B \-\-down
6010
-scripts to run the appropriate
6011
-.BR ifconfig (8)
6012
-and
6013
-.BR route (8)
6014
-commands.  These commands can be placed in the the same shell script
6015
-which starts or terminates an OpenVPN session.
6016
-
6017
-Another advantage is that open connections through the TUN/TAP\-based tunnel
6018
-will not be reset if the OpenVPN peer restarts.  This can be useful to
6019
-provide uninterrupted connectivity through the tunnel in the event of a DHCP
6020
-reset of the peer's public IP address (see the
6021
-.B \-\-ipchange
6022
-option above).
6023
-
6024
-One disadvantage of persistent tunnels is that it is harder to automatically
6025
-configure their MTU value (see
6026
-.B \-\-link\-mtu
6027
-and
6028
-.B \-\-tun\-mtu
6029
-above).
6030
-
6031
-On some platforms such as Windows, TAP\-Win32 tunnels are persistent by
6032
-default.
6033
-.\"*********************************************************
6034
-.TP
6035
-.B \-\-rmtun
6036
-(Standalone)
6037
-Remove a persistent tunnel.
6038
-.\"*********************************************************
6039
-.TP
6040
-.B \-\-dev tunX | tapX
6041
-TUN/TAP device
6042
-.\"*********************************************************
6043
-.TP
6044
-.B \-\-user user
6045
-Optional user to be owner of this tunnel.
6046
-.\"*********************************************************
6047
-.TP
6048
-.B \-\-group group
6049
-Optional group to be owner of this tunnel.
6050
-.\"*********************************************************
6051
-.SS Windows\-Specific Options:
6052
-.\"*********************************************************
6053
-.TP
6054
-.B \-\-win\-sys path
6055
-Set the Windows system directory pathname to use when looking for system
6056
-executables such as
6057
-.B route.exe
6058
-and
6059
-.B netsh.exe.
6060
-By default, if this directive is
6061
-not specified, OpenVPN will use the SystemRoot environment variable.
6062
-
6063
-This option have changed behaviour in OpenVPN 2.3.  Earlier you had to
6064
-define
6065
-.B \-\-win\-sys env
6066
-to use the SystemRoot environment variable, otherwise it defaulted to C:\\WINDOWS.
6067
-It is not needed to use the
6068
-.B env
6069
-keyword any more, and it will just be ignored. A warning is logged when this
6070
-is found in the configuration file.
6071
-.\"*********************************************************
6072
-.TP
6073
-.B \-\-ip\-win32 method
6074
-When using
6075
-.B \-\-ifconfig
6076
-on Windows, set the TAP\-Win32 adapter
6077
-IP address and netmask using
6078
-.B method.
6079
-Don't use this option unless you are also using
6080
-.B \-\-ifconfig.
6081
-
6082
-.B manual \-\-
6083
-Don't set the IP address or netmask automatically.
6084
-Instead output a message
6085
-to the console telling the user to configure the
6086
-adapter manually and indicating the IP/netmask which
6087
-OpenVPN expects the adapter to be set to.
6088
-
6089
-.B dynamic [offset] [lease\-time] \-\-
6090
-Automatically set the IP address and netmask by replying to
6091
-DHCP query messages generated by the kernel.  This mode is
6092
-probably the "cleanest" solution
6093
-for setting the TCP/IP properties since it uses the well\-known
6094
-DHCP protocol.  There are, however, two prerequisites for using
6095
-this mode: (1) The TCP/IP properties for the TAP\-Win32
6096
-adapter must be set to "Obtain an IP address automatically," and
6097
-(2) OpenVPN needs to claim an IP address in the subnet for use
6098
-as the virtual DHCP server address.  By default in
6099
-.B \-\-dev tap
6100
-mode, OpenVPN will
6101
-take the normally unused first address in the subnet.  For example,
6102
-if your subnet is 192.168.4.0 netmask 255.255.255.0, then
6103
-OpenVPN will take the IP address 192.168.4.0 to use as the
6104
-virtual DHCP server address.  In
6105
-.B \-\-dev tun
6106
-mode, OpenVPN will cause the DHCP server to masquerade as if it were
6107
-coming from the remote endpoint.  The optional offset parameter is
6108
-an integer which is > \-256 and < 256 and which defaults to \-1.
6109
-If offset is positive, the DHCP server will masquerade as the IP
6110
-address at network address + offset.
6111
-If offset is negative, the DHCP server will masquerade as the IP
6112
-address at broadcast address + offset.  The Windows
6113
-.B ipconfig /all
6114
-command can be used to show what Windows thinks the DHCP server
6115
-address is.  OpenVPN will "claim" this address, so make sure to
6116
-use a free address.  Having said that, different OpenVPN instantiations,
6117
-including different ends of the same connection, can share the same
6118
-virtual DHCP server address.  The
6119
-.B lease\-time
6120
-parameter controls the lease time of the DHCP assignment given to
6121
-the TAP\-Win32 adapter, and is denoted in seconds.
6122
-Normally a very long lease time is preferred
6123
-because it prevents routes involving the TAP\-Win32 adapter from
6124
-being lost when the system goes to sleep.  The default
6125
-lease time is one year.
6126
-
6127
-.B netsh \-\-
6128
-Automatically set the IP address and netmask using
6129
-the Windows command\-line "netsh"
6130
-command.  This method appears to work correctly on
6131
-Windows XP but not Windows 2000.
6132
-
6133
-.B ipapi \-\-
6134
-Automatically set the IP address and netmask using the
6135
-Windows IP Helper API.  This approach
6136
-does not have ideal semantics, though testing has indicated
6137
-that it works okay in practice.  If you use this option,
6138
-it is best to leave the TCP/IP properties for the TAP\-Win32
6139
-adapter in their default state, i.e. "Obtain an IP address
6140
-automatically."
6141
-
6142
-.B adaptive \-\-
6143
-(Default) Try
6144
-.B dynamic
6145
-method initially and fail over to
6146
-.B netsh
6147
-if the DHCP negotiation with the TAP\-Win32 adapter does
6148
-not succeed in 20 seconds.  Such failures have been known
6149
-to occur when certain third\-party firewall packages installed
6150
-on the client machine block the DHCP negotiation used by
6151
-the TAP\-Win32 adapter.
6152
-Note that if the
6153
-.B netsh
6154
-failover occurs, the TAP\-Win32 adapter
6155
-TCP/IP properties will be reset from DHCP to static, and this
6156
-will cause future OpenVPN startups using the
6157
-.B adaptive
6158
-mode to use
6159
-.B netsh
6160
-immediately, rather than trying
6161
-.B dynamic
6162
-first.  To "unstick" the
6163
-.B adaptive
6164
-mode from using
6165
-.B netsh,
6166
-run OpenVPN at least once using the
6167
-.B dynamic
6168
-mode to restore the TAP\-Win32 adapter TCP/IP properties
6169
-to a DHCP configuration.
6170
-.\"*********************************************************
6171
-.TP
6172
-.B \-\-route\-method m
6173
-Which method
6174
-.B m
6175
-to use for adding routes on Windows?
6176
-
6177
-.B adaptive
6178
-(default) \-\- Try IP helper API first.  If that fails, fall
6179
-back to the route.exe shell command.
6180
-.br
6181
-.B ipapi
6182
-\-\- Use IP helper API.
6183
-.br
6184
-.B exe
6185
-\-\- Call the route.exe shell command.
6186
-.\"*********************************************************
6187
-.TP
6188
-.B \-\-dhcp\-option type [parm]
6189
-Set extended TAP\-Win32 TCP/IP properties, must
6190
-be used with
6191
-.B \-\-ip\-win32 dynamic
6192
-or
6193
-.B \-\-ip\-win32 adaptive.
6194
-This option can be used to set additional TCP/IP properties
6195
-on the TAP\-Win32 adapter, and is particularly useful for
6196
-configuring an OpenVPN client to access a Samba server
6197
-across the VPN.
6198
-
6199
-.B DOMAIN name \-\-
6200
-Set Connection\-specific DNS Suffix.
6201
-
6202
-.B DNS addr \-\-
6203
-Set primary domain name server IPv4 or IPv6 address.  Repeat
6204
-this option to set secondary DNS server addresses.
6205
-
6206
-Note: DNS IPv6 servers are currently set using netsh (the existing
6207
-DHCP code can only do IPv4 DHCP, and that protocol only permits IPv4
6208
-addresses anywhere).  The option will be put into the environment, so
6209
-an
6210
-.B \-\-up
6211
-script could act upon it if needed.
6212
-
6213
-.B WINS addr \-\-
6214
-Set primary WINS server address (NetBIOS over TCP/IP Name Server).
6215
-Repeat this option to set secondary WINS server addresses.
6216
-
6217
-.B NBDD addr \-\-
6218
-Set primary NBDD server address (NetBIOS over TCP/IP Datagram Distribution Server)
6219
-Repeat this option
6220
-to set secondary NBDD server addresses.
6221
-
6222
-.B NTP addr \-\-
6223
-Set primary NTP server address (Network Time Protocol).
6224
-Repeat this option
6225
-to set secondary NTP server addresses.
6226
-
6227
-.B NBT type \-\-
6228
-Set NetBIOS over TCP/IP Node type.  Possible options:
6229
-.B 1
6230
-= b\-node (broadcasts),
6231
-.B 2
6232
-= p\-node (point\-to\-point
6233
-name queries to a WINS server),
6234
-.B 4
6235
-= m\-node (broadcast
6236
-then query name server), and
6237
-.B 8
6238
-= h\-node (query name server, then broadcast).
6239
-
6240
-.B NBS scope\-id \-\-
6241
-Set NetBIOS over TCP/IP Scope. A NetBIOS Scope ID provides an extended
6242
-naming service for the NetBIOS over TCP/IP (Known as NBT) module. The
6243
-primary purpose of a NetBIOS scope ID is to isolate NetBIOS traffic on
6244
-a single network to only those nodes with the same NetBIOS scope ID.
6245
-The NetBIOS scope ID is a character string that is appended to the NetBIOS
6246
-name. The NetBIOS scope ID on two hosts must match, or the two hosts
6247
-will not be able to communicate. The NetBIOS Scope ID also allows
6248
-computers to use the same computer name, as they have different
6249
-scope IDs. The Scope ID becomes a part of the NetBIOS name, making the name unique.
6250
-(This description of NetBIOS scopes courtesy of NeonSurge@abyss.com)
6251
-
6252
-.B DISABLE\-NBT \-\-
6253
-Disable Netbios\-over\-TCP/IP.
6254
-
6255
-Note that if
6256
-.B \-\-dhcp\-option
6257
-is pushed via
6258
-.B \-\-push
6259
-to a non\-windows client, the option will be saved in the client's
6260
-environment before the up script is called, under
6261
-the name "foreign_option_{n}".
6262
-.\"*********************************************************
6263
-.TP
6264
-.B \-\-tap\-sleep n
6265
-Cause OpenVPN to sleep for
6266
-.B n
6267
-seconds immediately after the TAP\-Win32 adapter state
6268
-is set to "connected".
6269
-
6270
-This option is intended to be used to troubleshoot problems
6271
-with the
6272
-.B \-\-ifconfig
6273
-and
6274
-.B \-\-ip\-win32
6275
-options, and is used to give
6276
-the TAP\-Win32 adapter time to come up before
6277
-Windows IP Helper API operations are applied to it.
6278
-.\"*********************************************************
6279
-.TP
6280
-.B \-\-show\-net\-up
6281
-Output OpenVPN's view of the system routing table and network
6282
-adapter list to the syslog or log file after the TUN/TAP adapter
6283
-has been brought up and any routes have been added.
6284
-.\"*********************************************************
6285
-.TP
6286
-.B \-\-block\-outside\-dns
6287
-Block DNS servers on other network adapters to prevent
6288
-DNS leaks. This option prevents any application from accessing
6289
-TCP or UDP port 53 except one inside the tunnel. It uses
6290
-Windows Filtering Platform (WFP) and works on Windows Vista or
6291
-later.
6292
-
6293
-This option is considered unknown on non\-Windows platforms
6294
-and unsupported on Windows XP, resulting in fatal error.
6295
-You may want to use
6296
-.B \-\-setenv opt
6297
-or
6298
-.B \-\-ignore\-unknown\-option
6299
-(not suitable for Windows XP) to ignore said error.
6300
-Note that pushing unknown options from server does not trigger
6301
-fatal errors.
6302
-.\"*********************************************************
6303
-.TP
6304
-.B \-\-windows\-driver
6305
-Specifies which tun driver to use. Values are
6306
-.B tap-windows6
6307
-(default) and
6308
-.B wintun.
6309
-This is Windows-only option.
6310
-"wintun" requires
6311
-.B \-\-dev tun
6312
-and the OpenVPN process to run elevated, or be invoked using
6313
-the Interactive Service.
6314
-.\"*********************************************************
6315
-.TP
6316
-.B \-\-dhcp\-renew
6317
-Ask Windows to renew the TAP adapter lease on startup.
6318
-This option is normally unnecessary, as Windows automatically
6319
-triggers a DHCP renegotiation on the TAP adapter when it
6320
-comes up, however if you set the TAP\-Win32 adapter
6321
-Media Status property to "Always Connected", you may need this
6322
-flag.
6323
-.\"*********************************************************
6324
-.TP
6325
-.B \-\-dhcp\-release
6326
-Ask Windows to release the TAP adapter lease on shutdown.
6327
-This option has no effect now, as it is enabled by default starting with OpenVPN 2.4.1.
6328
-.\"*********************************************************
6329
-.TP
6330
-.B \-\-register\-dns
6331
-Run ipconfig /flushdns and ipconfig /registerdns on connection initiation.
6332
-This is known to kick Windows into
6333
-recognizing pushed DNS servers.
6334
-.\"*********************************************************
6335
-.TP
6336
-.B \-\-pause\-exit
6337
-Put up a "press any key to continue" message on the console prior
6338
-to OpenVPN program exit.  This option is automatically used by the
6339
-Windows explorer when OpenVPN is run on a configuration
6340
-file using the right\-click explorer menu.
6341
-.\"*********************************************************
6342
-.TP
6343
-.B \-\-service exit\-event [0|1]
6344
-Should be used when OpenVPN is being automatically executed by another
6345
-program in such
6346
-a context that no interaction with the user via display or keyboard
6347
-is possible.  In general, end\-users should never need to explicitly
6348
-use this option, as it is automatically added by the OpenVPN service wrapper
6349
-when a given OpenVPN configuration is being run as a service.
6350
-
6351
-.B exit\-event
6352
-is the name of a Windows global event object, and OpenVPN will continuously
6353
-monitor the state of this event object and exit when it becomes signaled.
6354
-
6355
-The second parameter indicates the initial state of
6356
-.B exit\-event
6357
-and normally defaults to 0.
6358
-
6359
-Multiple OpenVPN processes can be simultaneously executed with the same
6360
-.B exit\-event
6361
-parameter.  In any case, the controlling process can signal
6362
-.B exit\-event,
6363
-causing all such OpenVPN processes to exit.
6364
-
6365
-When executing an OpenVPN process using the
6366
-.B \-\-service
6367
-directive, OpenVPN will probably not have a console
6368
-window to output status/error
6369
-messages, therefore it is useful to use
6370
-.B \-\-log
6371
-or
6372
-.B \-\-log\-append
6373
-to write these messages to a file.
6374
-.\"*********************************************************
6375
-.TP
6376
-.B \-\-show\-adapters
6377
-(Standalone)
6378
-Show available TAP\-Win32 adapters which can be selected using the
6379
-.B \-\-dev\-node
6380
-option.  On non\-Windows systems, the
6381
-.BR ifconfig (8)
6382
-command provides similar functionality.
6383
-.\"*********************************************************
6384
-.TP
6385
-.B \-\-allow\-nonadmin [TAP\-adapter]
6386
-(Standalone)
6387
-Set
6388
-.B TAP\-adapter
6389
-to allow access from non\-administrative accounts.  If
6390
-.B TAP\-adapter
6391
-is omitted, all TAP adapters on the system will be configured to allow
6392
-non\-admin access.
6393
-The non\-admin access setting will only persist for the length of time that
6394
-the TAP\-Win32 device object and driver remain loaded, and will need
6395
-to be re\-enabled after a reboot, or if the driver is unloaded
6396
-and reloaded.
6397
-This directive can only be used by an administrator.
6398
-.\"*********************************************************
6399
-.TP
6400
-.B \-\-show\-valid\-subnets
6401
-(Standalone)
6402
-Show valid subnets for
6403
-.B \-\-dev tun
6404
-emulation.  Since the TAP\-Win32 driver
6405
-exports an ethernet interface to Windows, and since TUN devices are
6406
-point\-to\-point in nature, it is necessary for the TAP\-Win32 driver
6407
-to impose certain constraints on TUN endpoint address selection.
6408
-
6409
-Namely, the point\-to\-point endpoints used in TUN device emulation
6410
-must be the middle two addresses of a /30 subnet (netmask 255.255.255.252).
6411
-.\"*********************************************************
6412
-.TP
6413
-.B \-\-show\-net
6414
-(Standalone)
6415
-Show OpenVPN's view of the system routing table and network
6416
-adapter list.
6417
-.\"*********************************************************
6418
-.SS PKCS#11 Standalone Options:
6419
-.\"*********************************************************
6420
-.TP
6421
-.B \-\-show\-pkcs11\-ids [provider] [cert_private]
6422
-(Standalone)
6423
-Show PKCS#11 token object list. Specify cert_private as 1
6424
-if certificates are stored as private objects.
6425
-
6426
-If p11\-kit is present on the system, the
6427
-.B provider
6428
-argument is optional; if omitted the default
6429
-.B p11\-kit\-proxy.so
6430
-module will be queried.
6431
-
6432
-.B \-\-verb
6433
-option can be used BEFORE this option to produce debugging information.
6434
-.\"*********************************************************
6435
-.SS Standalone Debug Options:
6436
-.\"*********************************************************
6437
-.TP
6438
-.B \-\-show\-gateway [v6target]
6439
-(Standalone)
6440
-Show current IPv4 and IPv6 default gateway and interface towards the
6441
-gateway (if the protocol in question is enabled).  If an IPv6 address
6442
-is passed as argument, the IPv6 route for this host is reported.
6443
-.\"*********************************************************
6444
-.SS IPv6 Related Options
6445
-.\"*********************************************************
6446
-The following options exist to support IPv6 tunneling in peer\-to\-peer
6447
-and client\-server mode.  All options are modeled after their IPv4
6448
-counterparts, so more detailed explanations given there apply here
6449
-as well (except for
6450
-.B \-\-topology
6451
-, which has no effect on IPv6).
6452
-.TP
6453
-.B \-\-ifconfig\-ipv6 ipv6addr/bits ipv6remote
6454
-configure IPv6 address
6455
-.B ipv6addr/bits
6456
-on the ``tun'' device.  The second parameter is used as route target for
6457
-.B \-\-route\-ipv6
6458
-if no gateway is specified.
6459
-.TP
6460
-.B \-\-route\-ipv6 ipv6addr/bits [gateway] [metric]
6461
-setup IPv6 routing in the system to send the specified IPv6 network
6462
-into OpenVPN's ``tun''.  The gateway parameter is only used for
6463
-IPv6 routes across ``tap'' devices, and if missing, the ``ipv6remote''
6464
-field from
6465
-.B \-\-ifconfig\-ipv6
6466
-or
6467
-.B \-\-route\-ipv6\-gateway
6468
-is used.
6469
-.TP
6470
-.B \-\-route\-ipv6\-gateway gw
6471
-Specify a default gateway
6472
-.B gw
6473
-for use with
6474
-.B \-\-route\-ipv6.
6475
-.TP
6476
-.B \-\-server\-ipv6 ipv6addr/bits
6477
-convenience\-function to enable a number of IPv6 related options at
6478
-once, namely
6479
-.B \-\-ifconfig\-ipv6, \-\-ifconfig\-ipv6\-pool
6480
-and
6481
-.B \-\-push tun\-ipv6
6482
-Is only accepted if ``\-\-mode server'' or ``\-\-server'' is set. Pushing of the
6483
-.B \-\-tun\-ipv6
6484
-directive is done for older clients which require an explicit
6485
-``\-\-tun\-ipv6'' in their configuration.
6486
-.TP
6487
-.B \-\-ifconfig\-ipv6\-pool ipv6addr/bits
6488
-Specify an IPv6 address pool for dynamic assignment to clients.  The
6489
-pool starts at
6490
-.B ipv6addr
6491
-and matches the offset determined from the start of the IPv4 pool.
6492
-.TP
6493
-.B \-\-ifconfig\-ipv6\-push ipv6addr/bits ipv6remote
6494
-for ccd/ per\-client static IPv6 interface configuration, see
6495
-.B \-\-client\-config\-dir
6496
-and
6497
-.B \-\-ifconfig\-push
6498
-for more details.
6499
-.TP
6500
-.B \-\-iroute\-ipv6 ipv6addr/bits
6501
-for ccd/ per\-client static IPv6 route configuration, see
6502
-.B \-\-iroute
6503
-for more details how to setup and use this, and how
6504
-.B \-\-iroute
6505
-and
6506
-.B \-\-route
6507
-interact.
6508
-
6509
-.\"*********************************************************
6510
-.SH SCRIPTING AND ENVIRONMENTAL VARIABLES
6511
-OpenVPN exports a series
6512
-of environmental variables for use by user\-defined scripts.
6513
-.\"*********************************************************
6514
-.SS Script Order of Execution
6515
-.\"*********************************************************
6516
-.TP
6517
-.B \-\-up
6518
-Executed after TCP/UDP socket bind and TUN/TAP open.
6519
-.\"*********************************************************
6520
-.TP
6521
-.B \-\-tls\-verify
6522
-Executed when we have a still untrusted remote peer.
6523
-.\"*********************************************************
6524
-.TP
6525
-.B \-\-ipchange
6526
-Executed after connection authentication, or remote IP address change.
6527
-.\"*********************************************************
6528
-.TP
6529
-.B \-\-client\-connect
6530
-Executed in
6531
-.B \-\-mode server
6532
-mode immediately after client authentication.
6533
-.\"*********************************************************
6534
-.TP
6535
-.B \-\-route\-up
6536
-Executed after connection authentication, either
6537
-immediately after, or some number of seconds after
6538
-as defined by the
6539
-.B \-\-route\-delay
6540
-option.
6541
-.\"*********************************************************
6542
-.TP
6543
-.B \-\-route\-pre\-down
6544
-Executed right before the routes are removed.
6545
-.\"*********************************************************
6546
-.TP
6547
-.B \-\-client\-disconnect
6548
-Executed in
6549
-.B \-\-mode server
6550
-mode on client instance shutdown.
6551
-.\"*********************************************************
6552
-.TP
6553
-.B \-\-down
6554
-Executed after TCP/UDP and TUN/TAP close.
6555
-.\"*********************************************************
6556
-.TP
6557
-.B \-\-learn\-address
6558
-Executed in
6559
-.B \-\-mode server
6560
-mode whenever an IPv4 address/route or MAC address is added to OpenVPN's
6561
-internal routing table.
6562
-.\"*********************************************************
6563
-.TP
6564
-.B \-\-auth\-user\-pass\-verify
6565
-Executed in
6566
-.B \-\-mode server
6567
-mode on new client connections, when the client is
6568
-still untrusted.
6569
-.\"*********************************************************
6570
-.SS String Types and Remapping
6571
-In certain cases, OpenVPN will perform remapping of characters
6572
-in strings.  Essentially, any characters outside the set of
6573
-permitted characters for each string type will be converted
6574
-to underbar ('_').
6575
-
6576
-.B Q:
6577
-Why is string remapping necessary?
6578
-
6579
-.B A:
6580
-It's an important security feature to prevent the malicious coding of
6581
-strings from untrusted sources to be passed as parameters to scripts,
6582
-saved in the environment, used as a common name, translated to a filename,
6583
-etc.
6584
-
6585
-.B Q:
6586
-Can string remapping be disabled?
6587
-
6588
-.B A:
6589
-Yes, by using the
6590
-.B \-\-no\-name\-remapping
6591
-option, however this should be considered an advanced option.
6592
-
6593
-Here is a brief rundown of OpenVPN's current string types and the 
6594
-permitted character class for each string:
6595
-
6596
-.B X509 Names:
6597
-Alphanumeric, underbar ('_'), dash ('\-'), dot ('.'), at
6598
-('@'), colon (':'), slash ('/'), and equal ('=').  Alphanumeric is defined 
6599
-as a character which will cause the C library isalnum() function to return 
6600
-true.
6601
-
6602
-.B Common Names:
6603
-Alphanumeric, underbar ('_'), dash ('\-'), dot ('.'), and at
6604
-('@').
6605
-
6606
-.B \-\-auth\-user\-pass username:
6607
-Same as Common Name, with one exception: starting with OpenVPN 2.0.1,
6608
-the username is passed to the OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY plugin in its raw form,
6609
-without string remapping.
6610
-
6611
-.B \-\-auth\-user\-pass password:
6612
-Any "printable" character except CR or LF.  
6613
-Printable is defined to be a character which will cause the C library 
6614
-isprint() function to return true.
6615
-
6616
-.B \-\-client\-config\-dir filename as derived from common name or username:
6617
-Alphanumeric, underbar ('_'), dash ('\-'), and dot ('.') except for "." or
6618
-".." as standalone strings.  As of v2.0.1\-rc6, the at ('@') character has
6619
-been added as well for compatibility with the common name character class.
6620
-
6621
-.B Environmental variable names:
6622
-Alphanumeric or underbar ('_').
6623
-
6624
-.B Environmental variable values:
6625
-Any printable character.
6626
-
6627
-For all cases, characters in a string which are not members of the legal 
6628
-character class for that string type will be remapped to underbar ('_').
6629
-.\"*********************************************************
6630
-.SS Environmental Variables
6631
-Once set, a variable is persisted
6632
-indefinitely until it is reset by a new value or a restart,
6633
-
6634
-As of OpenVPN 2.0\-beta12, in server mode, environmental
6635
-variables set by OpenVPN
6636
-are scoped according to the client objects
6637
-they are
6638
-associated with, so there should not be any issues with
6639
-scripts having access to stale, previously set variables
6640
-which refer to different client instances.
6641
-.\"*********************************************************
6642
-.TP
6643
-.B bytes_received
6644
-Total number of bytes received from client during VPN session.
6645
-Set prior to execution of the
6646
-.B \-\-client\-disconnect
6647
-script.
6648
-.\"*********************************************************
6649
-.TP
6650
-.B bytes_sent
6651
-Total number of bytes sent to client during VPN session.
6652
-Set prior to execution of the
6653
-.B \-\-client\-disconnect
6654
-script.
6655
-.\"*********************************************************
6656
-.TP
6657
-.B common_name
6658
-The X509 common name of an authenticated client.
6659
-Set prior to execution of
6660
-.B \-\-client\-connect, \-\-client\-disconnect,
6661
-and
6662
-.B \-\-auth\-user\-pass\-verify
6663
-scripts.
6664
-.\"*********************************************************
6665
-.TP
6666
-.B config
6667
-Name of first
6668
-.B \-\-config
6669
-file.
6670
-Set on program initiation and reset on SIGHUP.
6671
-.\"*********************************************************
6672
-.TP
6673
-.B daemon
6674
-Set to "1" if the
6675
-.B \-\-daemon
6676
-directive is specified, or "0" otherwise.
6677
-Set on program initiation and reset on SIGHUP.
6678
-.\"*********************************************************
6679
-.TP
6680
-.B daemon_log_redirect
6681
-Set to "1" if the
6682
-.B \-\-log
6683
-or
6684
-.B \-\-log\-append
6685
-directives are specified, or "0" otherwise.
6686
-Set on program initiation and reset on SIGHUP.
6687
-.\"*********************************************************
6688
-.TP
6689
-.B dev
6690
-The actual name of the TUN/TAP device, including
6691
-a unit number if it exists.
6692
-Set prior to
6693
-.B \-\-up
6694
-or
6695
-.B \-\-down
6696
-script execution.
6697
-.\"*********************************************************
6698
-.TP
6699
-.B dev_idx
6700
-On Windows, the device index of the TUN/TAP adapter (to
6701
-be used in netsh.exe calls which sometimes just do not work
6702
-right with interface names).
6703
-Set prior to
6704
-.B \-\-up
6705
-or
6706
-.B \-\-down
6707
-script execution.
6708
-.\"*********************************************************
6709
-.TP
6710
-.B foreign_option_{n}
6711
-An option pushed via
6712
-.B \-\-push
6713
-to a client which does not natively support it,
6714
-such as
6715
-.B \-\-dhcp\-option
6716
-on a non\-Windows system, will be recorded to this
6717
-environmental variable sequence prior to
6718
-.B \-\-up
6719
-script execution.
6720
-.\"*********************************************************
6721
-.TP
6722
-.B ifconfig_broadcast
6723
-The broadcast address for the virtual
6724
-ethernet segment which is derived from the
6725
-.B \-\-ifconfig
6726
-option when
6727
-.B \-\-dev tap
6728
-is used.
6729
-Set prior to OpenVPN calling the
6730
-.I ifconfig
6731
-or
6732
-.I netsh
6733
-(windows version of ifconfig) commands which
6734
-normally occurs prior to
6735
-.B \-\-up
6736
-script execution.
6737
-.\"*********************************************************
6738
-.TP
6739
-.B ifconfig_ipv6_local
6740
-The local VPN endpoint IPv6 address specified in the
6741
-.B \-\-ifconfig\-ipv6
6742
-option (first parameter).
6743
-Set prior to OpenVPN calling the
6744
-.I ifconfig
6745
-or
6746
-.I netsh
6747
-(windows version of ifconfig) commands which
6748
-normally occurs prior to
6749
-.B \-\-up
6750
-script execution.
6751
-.\"*********************************************************
6752
-.TP
6753
-.B ifconfig_ipv6_netbits
6754
-The prefix length of the IPv6 network on the VPN interface.  Derived from
6755
-the /nnn parameter of the IPv6 address in the
6756
-.B \-\-ifconfig\-ipv6
6757
-option (first parameter).
6758
-Set prior to OpenVPN calling the
6759
-.I ifconfig
6760
-or
6761
-.I netsh
6762
-(windows version of ifconfig) commands which
6763
-normally occurs prior to
6764
-.B \-\-up
6765
-script execution.
6766
-.\"*********************************************************
6767
-.TP
6768
-.B ifconfig_ipv6_remote
6769
-The remote VPN endpoint IPv6 address specified in the
6770
-.B \-\-ifconfig\-ipv6
6771
-option (second parameter).
6772
-Set prior to OpenVPN calling the
6773
-.I ifconfig
6774
-or
6775
-.I netsh
6776
-(windows version of ifconfig) commands which
6777
-normally occurs prior to
6778
-.B \-\-up
6779
-script execution.
6780
-.\"*********************************************************
6781
-.TP
6782
-.B ifconfig_local
6783
-The local VPN endpoint IP address specified in the
6784
-.B \-\-ifconfig
6785
-option (first parameter).
6786
-Set prior to OpenVPN calling the
6787
-.I ifconfig
6788
-or
6789
-.I netsh
6790
-(windows version of ifconfig) commands which
6791
-normally occurs prior to
6792
-.B \-\-up
6793
-script execution.
6794
-.\"*********************************************************
6795
-.TP
6796
-.B ifconfig_remote
6797
-The remote VPN endpoint IP address specified in the
6798
-.B \-\-ifconfig
6799
-option (second parameter) when
6800
-.B \-\-dev tun
6801
-is used.
6802
-Set prior to OpenVPN calling the
6803
-.I ifconfig
6804
-or
6805
-.I netsh
6806
-(windows version of ifconfig) commands which
6807
-normally occurs prior to
6808
-.B \-\-up
6809
-script execution.
6810
-.\"*********************************************************
6811
-.TP
6812
-.B ifconfig_netmask
6813
-The subnet mask of the virtual ethernet segment
6814
-that is specified as the second parameter to
6815
-.B \-\-ifconfig
6816
-when
6817
-.B \-\-dev tap
6818
-is being used.
6819
-Set prior to OpenVPN calling the
6820
-.I ifconfig
6821
-or
6822
-.I netsh
6823
-(windows version of ifconfig) commands which
6824
-normally occurs prior to
6825
-.B \-\-up
6826
-script execution.
6827
-.\"*********************************************************
6828
-.TP
6829
-.B ifconfig_pool_local_ip
6830
-The local
6831
-virtual IP address for the TUN/TAP tunnel taken from an
6832
-.B \-\-ifconfig\-push
6833
-directive if specified, or otherwise from
6834
-the ifconfig pool (controlled by the
6835
-.B \-\-ifconfig\-pool
6836
-config file directive).
6837
-Only set for
6838
-.B \-\-dev tun
6839
-tunnels.
6840
-This option is set on the server prior to execution
6841
-of the
6842
-.B \-\-client\-connect
6843
-and
6844
-.B \-\-client\-disconnect
6845
-scripts.
6846
-.\"*********************************************************
6847
-.TP
6848
-.B ifconfig_pool_netmask
6849
-The
6850
-virtual IP netmask for the TUN/TAP tunnel taken from an
6851
-.B \-\-ifconfig\-push
6852
-directive if specified, or otherwise from
6853
-the ifconfig pool (controlled by the
6854
-.B \-\-ifconfig\-pool
6855
-config file directive).
6856
-Only set for
6857
-.B \-\-dev tap
6858
-tunnels.
6859
-This option is set on the server prior to execution
6860
-of the
6861
-.B \-\-client\-connect
6862
-and
6863
-.B \-\-client\-disconnect
6864
-scripts.
6865
-.\"*********************************************************
6866
-.TP
6867
-.B ifconfig_pool_remote_ip
6868
-The remote
6869
-virtual IP address for the TUN/TAP tunnel taken from an
6870
-.B \-\-ifconfig\-push
6871
-directive if specified, or otherwise from
6872
-the ifconfig pool (controlled by the
6873
-.B \-\-ifconfig\-pool
6874
-config file directive).
6875
-This option is set on the server prior to execution
6876
-of the
6877
-.B \-\-client\-connect
6878
-and
6879
-.B \-\-client\-disconnect
6880
-scripts.
6881
-.\"*********************************************************
6882
-.TP
6883
-.B link_mtu
6884
-The maximum packet size (not including the IP header)
6885
-of tunnel data in UDP tunnel transport mode.
6886
-Set prior to
6887
-.B \-\-up
6888
-or
6889
-.B \-\-down
6890
-script execution.
6891
-.\"*********************************************************
6892
-.TP
6893
-.B local
6894
-The
6895
-.B \-\-local
6896
-parameter.
6897
-Set on program initiation and reset on SIGHUP.
6898
-.\"*********************************************************
6899
-.TP
6900
-.B local_port
6901
-The local port number or name, specified by
6902
-.B \-\-port
6903
-or
6904
-.B \-\-lport.
6905
-Set on program initiation and reset on SIGHUP.
6906
-.\"*********************************************************
6907
-.TP
6908
-.B password
6909
-The password provided by a connecting client.
6910
-Set prior to
6911
-.B \-\-auth\-user\-pass\-verify
6912
-script execution only when the
6913
-.B via\-env
6914
-modifier is specified, and deleted from the environment
6915
-after the script returns.
6916
-.\"*********************************************************
6917
-.TP
6918
-.B proto
6919
-The
6920
-.B \-\-proto
6921
-parameter.
6922
-Set on program initiation and reset on SIGHUP.
6923
-.\"*********************************************************
6924
-.TP
6925
-.B remote_{n}
6926
-The
6927
-.B \-\-remote
6928
-parameter.
6929
-Set on program initiation and reset on SIGHUP.
6930
-.\"*********************************************************
6931
-.TP
6932
-.B remote_port_{n}
6933
-The remote port number, specified by
6934
-.B \-\-port
6935
-or
6936
-.B \-\-rport.
6937
-Set on program initiation and reset on SIGHUP.
6938
-.\"*********************************************************
6939
-.TP
6940
-.B route_net_gateway
6941
-The pre\-existing default IP gateway in the system routing
6942
-table.
6943
-Set prior to
6944
-.B \-\-up
6945
-script execution.
6946
-.\"*********************************************************
6947
-.TP
6948
-.B route_vpn_gateway
6949
-The default gateway used by
6950
-.B \-\-route
6951
-options, as specified in either the
6952
-.B \-\-route\-gateway
6953
-option or the second parameter to
6954
-.B \-\-ifconfig
6955
-when
6956
-.B \-\-dev tun
6957
-is specified.
6958
-Set prior to
6959
-.B \-\-up
6960
-script execution.
6961
-.\"*********************************************************
6962
-.TP
6963
-.B route_{parm}_{n}
6964
-A set of variables which define each route to be added, and
6965
-are set prior to
6966
-.B \-\-up
6967
-script execution.
6968
-
6969
-.B parm
6970
-will be one of "network", "netmask", "gateway", or "metric".
6971
-
6972
-.B n
6973
-is the OpenVPN route number, starting from 1.
6974
-
6975
-If the network or gateway are resolvable DNS names,
6976
-their IP address translations will be recorded rather
6977
-than their names as denoted on the command line
6978
-or configuration file.
6979
-.\"*********************************************************
6980
-.TP
6981
-.B route_ipv6_{parm}_{n}
6982
-A set of variables which define each IPv6 route to be added, and
6983
-are set prior to
6984
-.B \-\-up
6985
-script execution.
6986
-
6987
-.B parm
6988
-will be one of "network" or "gateway" ("netmask" is contained as "/nnn"
6989
-in the route_ipv6_network_{n}, unlike IPv4 where it is passed in a separate
6990
-environment variable).
6991
-
6992
-.B n
6993
-is the OpenVPN route number, starting from 1.
6994
-
6995
-If the network or gateway are resolvable DNS names,
6996
-their IP address translations will be recorded rather
6997
-than their names as denoted on the command line
6998
-or configuration file.
6999
-.\"*********************************************************
7000
-.TP
7001
-.B peer_cert
7002
-Temporary file name containing the client certificate upon
7003
-connection.  Useful in conjunction with \-\-tls\-verify
7004
-.\"*********************************************************
7005
-.TP
7006
-.B script_context
7007
-Set to "init" or "restart" prior to up/down script execution.
7008
-For more information, see
7009
-documentation for
7010
-.B \-\-up.
7011
-.\"*********************************************************
7012
-.TP
7013
-.B script_type
7014
-Prior to execution of any script, this variable is set to the type of
7015
-script being run.  It can be one of the following:
7016
-.B up, down, ipchange, route\-up, tls\-verify, auth\-user\-pass\-verify,
7017
-.B client\-connect, client\-disconnect,
7018
-or
7019
-.B learn\-address.
7020
-Set prior to execution of any script.
7021
-.\"*********************************************************
7022
-.TP
7023
-.B signal
7024
-The reason for exit or restart.  Can be one of
7025
-.B sigusr1, sighup, sigterm, sigint, inactive
7026
-(controlled by
7027
-.B \-\-inactive
7028
-option),
7029
-.B ping\-exit
7030
-(controlled by
7031
-.B \-\-ping\-exit
7032
-option),
7033
-.B ping\-restart
7034
-(controlled by
7035
-.B \-\-ping\-restart
7036
-option),
7037
-.B connection\-reset
7038
-(triggered on TCP connection reset),
7039
-.B error,
7040
-or
7041
-.B unknown
7042
-(unknown signal).  This variable is set just prior to down script execution.
7043
-.\"*********************************************************
7044
-.TP
7045
-.B time_ascii
7046
-Client connection timestamp, formatted as a human\-readable
7047
-time string.
7048
-Set prior to execution of the
7049
-.B \-\-client\-connect
7050
-script.
7051
-.\"*********************************************************
7052
-.TP
7053
-.B time_duration
7054
-The duration (in seconds) of the client session which is now
7055
-disconnecting.
7056
-Set prior to execution of the
7057
-.B \-\-client\-disconnect
7058
-script.
7059
-.\"*********************************************************
7060
-.TP
7061
-.B time_unix
7062
-Client connection timestamp, formatted as a unix integer
7063
-date/time value.
7064
-Set prior to execution of the
7065
-.B \-\-client\-connect
7066
-script.
7067
-.\"*********************************************************
7068
-.TP
7069
-.B tls_digest_{n} / tls_digest_sha256_{n}
7070
-Contains the certificate SHA1 / SHA256 fingerprint, where
7071
-.B n
7072
-is the verification level.  Only set for TLS connections.  Set prior
7073
-to execution of
7074
-.B \-\-tls\-verify
7075
-script.
7076
-.\"*********************************************************
7077
-.TP
7078
-.B tls_id_{n}
7079
-A series of certificate fields from the remote peer,
7080
-where
7081
-.B n
7082
-is the verification level.  Only set for TLS connections.  Set prior
7083
-to execution of
7084
-.B \-\-tls\-verify
7085
-script.
7086
-.\"*********************************************************
7087
-.TP
7088
-.B tls_serial_{n}
7089
-The serial number of the certificate from the remote peer,
7090
-where
7091
-.B n
7092
-is the verification level.  Only set for TLS connections.  Set prior
7093
-to execution of
7094
-.B \-\-tls\-verify
7095
-script. This is in the form of a decimal string like "933971680", which is
7096
-suitable for doing serial\-based OCSP queries (with OpenSSL, do not
7097
-prepend "0x" to the string) If something goes wrong while reading
7098
-the value from the certificate it will be an empty string, so your
7099
-code should check that.
7100
-See the contrib/OCSP_check/OCSP_check.sh script for an example.
7101
-.\"*********************************************************
7102
-.TP
7103
-.B tls_serial_hex_{n}
7104
-Like
7105
-.B tls_serial_{n}\fR,
7106
-but in hex form (e.g. "12:34:56:78:9A").
7107
-.\"*********************************************************
7108
-.TP
7109
-.B tun_mtu
7110
-The MTU of the TUN/TAP device.
7111
-Set prior to
7112
-.B \-\-up
7113
-or
7114
-.B \-\-down
7115
-script execution.
7116
-.\"*********************************************************
7117
-.TP
7118
-.B trusted_ip (or trusted_ip6)
7119
-Actual IP address of connecting client or peer which has been authenticated.
7120
-Set prior to execution of
7121
-.B \-\-ipchange, \-\-client\-connect,
7122
-and
7123
-.B \-\-client\-disconnect
7124
-scripts.
7125
-If using ipv6 endpoints (udp6, tcp6),
7126
-.B trusted_ip6
7127
-will be set instead.
7128
-.\"*********************************************************
7129
-.TP
7130
-.B trusted_port
7131
-Actual port number of connecting client or peer which has been authenticated.
7132
-Set prior to execution of
7133
-.B \-\-ipchange, \-\-client\-connect,
7134
-and
7135
-.B \-\-client\-disconnect
7136
-scripts.
7137
-.\"*********************************************************
7138
-.TP
7139
-.B untrusted_ip (or untrusted_ip6)
7140
-Actual IP address of connecting client or peer which has not been authenticated
7141
-yet.  Sometimes used to
7142
-.B nmap
7143
-the connecting host in a
7144
-.B \-\-tls\-verify
7145
-script to ensure it is firewalled properly.
7146
-Set prior to execution of
7147
-.B \-\-tls\-verify
7148
-and
7149
-.B \-\-auth\-user\-pass\-verify
7150
-scripts.
7151
-If using ipv6 endpoints (udp6, tcp6),
7152
-.B untrusted_ip6
7153
-will be set instead.
7154
-.\"*********************************************************
7155
-.TP
7156
-.B untrusted_port
7157
-Actual port number of connecting client or peer which has not been authenticated
7158
-yet.
7159
-Set prior to execution of
7160
-.B \-\-tls\-verify
7161
-and
7162
-.B \-\-auth\-user\-pass\-verify
7163
-scripts.
7164
-.\"*********************************************************
7165
-.TP
7166
-.B username
7167
-The username provided by a connecting client.
7168
-Set prior to
7169
-.B \-\-auth\-user\-pass\-verify
7170
-script execution only when the
7171
-.B via\-env
7172
-modifier is specified.
7173
-.\"*********************************************************
7174
-.TP
7175
-.B X509_{n}_{subject_field}
7176
-An X509 subject field from the remote peer certificate,
7177
-where
7178
-.B n
7179
-is the verification level.  Only set for TLS connections.  Set prior
7180
-to execution of
7181
-.B \-\-tls\-verify
7182
-script.  This variable is similar to
7183
-.B tls_id_{n}
7184
-except the component X509 subject fields are broken out, and
7185
-no string remapping occurs on these field values (except for remapping
7186
-of control characters to "_").
7187
-For example, the following variables would be set on the
7188
-OpenVPN server using the sample client certificate
7189
-in sample\-keys (client.crt).
7190
-Note that the verification level is 0 for the client certificate
7191
-and 1 for the CA certificate.
7192
-
7193
-.nf
7194
-.ft 3
7195
-.in +4
7196
-X509_0_emailAddress=me@myhost.mydomain
7197
-X509_0_CN=Test\-Client
7198
-X509_0_O=OpenVPN\-TEST
7199
-X509_0_ST=NA
7200
-X509_0_C=KG
7201
-X509_1_emailAddress=me@myhost.mydomain
7202
-X509_1_O=OpenVPN\-TEST
7203
-X509_1_L=BISHKEK
7204
-X509_1_ST=NA
7205
-X509_1_C=KG
7206
-.in -4
7207
-.ft
7208
-.fi
7209
-.\"*********************************************************
7210
-.SH INLINE FILE SUPPORT
7211
-OpenVPN allows including files in the main configuration for the
7212
-.B \-\-ca, \-\-cert, \-\-dh, \-\-extra\-certs, \-\-key, \-\-pkcs12, \-\-secret,
7213
-.B \-\-crl\-verify, \-\-http\-proxy\-user\-pass, \-\-tls\-auth,
7214
-.B \-\-auth\-gen\-token\-secret
7215
-.B \-\-tls\-crypt,
7216
-and
7217
-.B \-\-tls\-crypt-v2
7218
-options.
7219
-
7220
-Each inline file started by the line
7221
-.B <option>
7222
-and ended by the line
7223
-.B </option>
7224
-
7225
-Here is an example of an inline file usage
7226
-
7227
-.nf
7228
-.ft 3
7229
-.in +4
7230
-<cert>
7231
-\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-
7232
-[...]
7233
-\-\-\-\-\-END CERTIFICATE\-\-\-\-\-
7234
-</cert>
7235
-.in -4
7236
-.ft
7237
-.fi
7238
-
7239
-When using the inline file feature with
7240
-.B \-\-pkcs12
7241
-the inline file has to be base64 encoded. Encoding of a .p12 file into base64 can be done for example with OpenSSL by running
7242
-.B openssl base64 \-in input.p12
7243
-
7244
-.SH SIGNALS
7245
-.TP
7246
-.B SIGHUP
7247
-Cause OpenVPN to close all TUN/TAP and
7248
-network connections,
7249
-restart, re\-read the configuration file (if any),
7250
-and reopen TUN/TAP and network connections.
7251
-.\"*********************************************************
7252
-.TP
7253
-.B SIGUSR1
7254
-Like 
7255
-.B SIGHUP,
7256
-except don't re\-read configuration file, and possibly don't close and reopen TUN/TAP
7257
-device, re\-read key files, preserve local IP address/port, or preserve most recently authenticated
7258
-remote IP address/port based on
7259
-.B \-\-persist\-tun, \-\-persist\-key, \-\-persist\-local\-ip,
7260
-and
7261
-.B \-\-persist\-remote\-ip
7262
-options respectively (see above).
7263
-
7264
-This signal may also be internally generated by a timeout condition, governed
7265
-by the
7266
-.B \-\-ping\-restart
7267
-option.
7268
-
7269
-This signal, when combined with
7270
-.B \-\-persist\-remote\-ip,
7271
-may be
7272
-sent when the underlying parameters of the host's network interface change
7273
-such as when the host is a DHCP client and is assigned a new IP address.
7274
-See
7275
-.B \-\-ipchange
7276
-above for more information.
7277
-.\"*********************************************************
7278
-.TP
7279
-.B SIGUSR2
7280
-Causes OpenVPN to display its current statistics (to the syslog
7281
-file if
7282
-.B \-\-daemon
7283
-is used, or stdout otherwise).
7284
-.\"*********************************************************
7285
-.TP
7286
-.B SIGINT, SIGTERM
7287
-Causes OpenVPN to exit gracefully.
7288
-.\"*********************************************************
7289
-.SH TUN/TAP DRIVER SETUP
7290
-If you are running Linux 2.4.7 or higher, you probably have the TUN/TAP driver
7291
-already installed.  If so, there are still a few things you need to do:
7292
-
7293
-Make device:
7294
-.B mknod /dev/net/tun c 10 200
7295
-
7296
-Load driver:
7297
-.B modprobe tun
7298
-.\"*********************************************************
7299
-.SH EXAMPLES
7300
-Prior to running these examples, you should have OpenVPN installed on two
7301
-machines with network connectivity between them.  If you have not
7302
-yet installed OpenVPN, consult the INSTALL file included in the OpenVPN
7303
-distribution.
7304
-.\"*********************************************************
7305
-.SS TUN/TAP Setup:
7306
-If you are using Linux 2.4 or higher,
7307
-make the tun device node and load the tun module:
7308
-.IP
7309
-.B mknod /dev/net/tun c 10 200
7310
-.LP
7311
-.IP
7312
-.B modprobe tun
7313
-.LP
7314
-If you installed from RPM, the
7315
-.B mknod
7316
-step may be omitted, because the RPM install does that for you.
7317
-
7318
-Only Linux 2.4 and newer are supported.
7319
-
7320
-For other platforms, consult the INSTALL file at
7321
-.I http://openvpn.net/install.html
7322
-for more information.
7323
-.\"*********************************************************
7324
-.SS Firewall Setup:
7325
-If firewalls exist between
7326
-the two machines, they should be set to forward UDP port 1194
7327
-in both directions.  If you do not have control over the firewalls
7328
-between the two machines, you may still be able to use OpenVPN by adding
7329
-.B \-\-ping 15
7330
-to each of the
7331
-.B openvpn
7332
-commands used below in the examples (this will cause each peer to send out
7333
-a UDP ping to its remote peer once every 15 seconds which will cause many
7334
-stateful firewalls to forward packets in both directions
7335
-without an explicit firewall rule).
7336
-
7337
-If you are using a Linux iptables\-based firewall, you may need to enter
7338
-the following command to allow incoming packets on the TUN device:
7339
-.IP
7340
-.B iptables \-A INPUT \-i tun+ \-j ACCEPT
7341
-.LP
7342
-See the firewalls section below for more information on configuring firewalls
7343
-for use with OpenVPN.
7344
-.\"*********************************************************
7345
-.SS VPN Address Setup:
7346
-For purposes
7347
-of our example, our two machines will be called
7348
-.B bob.example.com
7349
-and
7350
-.B alice.example.com.
7351
-If you are constructing a VPN over the internet, then replace
7352
-.B bob.example.com
7353
-and
7354
-.B alice.example.com
7355
-with the internet hostname or IP address that each machine will use
7356
-to contact the other over the internet.
7357
-
7358
-Now we will choose the tunnel endpoints.  Tunnel endpoints are
7359
-private IP addresses that only have meaning in the context of
7360
-the VPN.  Each machine will use the tunnel endpoint of the other
7361
-machine to access it over the VPN.  In our example,
7362
-the tunnel endpoint for bob.example.com
7363
-will be 10.4.0.1 and for alice.example.com, 10.4.0.2.
7364
-
7365
-Once the VPN is established, you have essentially
7366
-created a secure alternate path between the two hosts
7367
-which is addressed by using the tunnel endpoints.  You can
7368
-control which network
7369
-traffic passes between the hosts 
7370
-(a) over the VPN or (b) independently of the VPN, by choosing whether to use
7371
-(a) the VPN endpoint address or (b) the public internet address,
7372
-to access the remote host. For example if you are on bob.example.com and you wish to connect to alice.example.com
7373
-via
7374
-.B ssh
7375
-without using the VPN (since
7376
-.B ssh
7377
-has its own built\-in security) you would use the command
7378
-.B ssh alice.example.com.
7379
-However in the same scenario, you could also use the command
7380
-.B telnet 10.4.0.2
7381
-to create a telnet session with alice.example.com over the VPN, that would
7382
-use the VPN to secure the session rather than
7383
-.B ssh.
7384
-
7385
-You can use any address you wish for the
7386
-tunnel endpoints
7387
-but make sure that they are private addresses
7388
-(such as those that begin with 10 or 192.168) and that they are
7389
-not part of any existing subnet on the networks of
7390
-either peer, unless you are bridging.  If you use an address that is part of
7391
-your local subnet for either of the tunnel endpoints,
7392
-you will get a weird feedback loop.
7393
-.\"*********************************************************
7394
-.SS Example 1: A simple tunnel without security
7395
-.LP
7396
-On bob:
7397
-.IP
7398
-.B openvpn \-\-remote alice.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.1 10.4.0.2 \-\-verb 9
7399
-.LP
7400
-On alice:
7401
-.IP
7402
-.B openvpn \-\-remote bob.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.2 10.4.0.1 \-\-verb 9
7403
-.LP
7404
-Now verify the tunnel is working by pinging across the tunnel.
7405
-.LP
7406
-On bob:
7407
-.IP
7408
-.B ping 10.4.0.2
7409
-.LP
7410
-On alice:
7411
-.IP
7412
-.B ping 10.4.0.1
7413
-.LP
7414
-The
7415
-.B \-\-verb 9
7416
-option will produce verbose output, similar to the
7417
-.BR tcpdump (8)
7418
-program.  Omit the
7419
-.B \-\-verb 9
7420
-option to have OpenVPN run quietly.
7421
-.\"*********************************************************
7422
-.SS Example 2: A tunnel with static\-key security (i.e. using a pre\-shared secret)
7423
-First build a static key on bob.
7424
-.IP
7425
-.B openvpn \-\-genkey \-\-secret key
7426
-.LP
7427
-This command will build a key file called
7428
-.B key
7429
-(in ascii format).
7430
-Now copy
7431
-.B key
7432
-to alice over a secure medium such as by
7433
-using the
7434
-.BR scp (1)
7435
-program.
7436
-.LP
7437
-On bob:
7438
-.IP
7439
-.B openvpn \-\-remote alice.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.1 10.4.0.2 \-\-verb 5 \-\-secret key
7440
-.LP
7441
-On alice:
7442
-.IP
7443
-.B openvpn \-\-remote bob.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.2 10.4.0.1 \-\-verb 5 \-\-secret key
7444
-.LP
7445
-Now verify the tunnel is working by pinging across the tunnel.
7446
-.LP
7447
-On bob:
7448
-.IP
7449
-.B ping 10.4.0.2
7450
-.LP
7451
-On alice:
7452
-.IP
7453
-.B ping 10.4.0.1
7454
-.\"*********************************************************
7455
-.SS Example 3: A tunnel with full TLS\-based security
7456
-For this test, we will designate
7457
-.B bob
7458
-as the TLS client and
7459
-.B alice
7460
-as the TLS server.
7461
-.I Note that client or server designation only has meaning for the TLS subsystem.  It has no bearing on OpenVPN's peer\-to\-peer, UDP\-based communication model.
7462
-
7463
-First, build a separate certificate/key pair
7464
-for both bob and alice (see above where
7465
-.B \-\-cert
7466
-is discussed for more info).  Then construct
7467
-Diffie Hellman parameters (see above where
7468
-.B \-\-dh
7469
-is discussed for more info).  You can also use the
7470
-included test files client.crt, client.key,
7471
-server.crt, server.key and ca.crt.
7472
-The .crt files are certificates/public\-keys, the .key
7473
-files are private keys, and ca.crt is a certification
7474
-authority who has signed both
7475
-client.crt and server.crt.  For Diffie Hellman
7476
-parameters you can use the included file dh1024.pem.
7477
-.I Note that all client, server, and certificate authority certificates and keys included in the OpenVPN distribution are totally insecure and should be used for testing only.
7478
-.LP
7479
-On bob:
7480
-.IP
7481
-.B openvpn \-\-remote alice.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.1 10.4.0.2 \-\-tls\-client \-\-ca ca.crt \-\-cert client.crt \-\-key client.key \-\-reneg\-sec 60 \-\-verb 5
7482
-.LP
7483
-On alice:
7484
-.IP
7485
-.B openvpn \-\-remote bob.example.com \-\-dev tun1 \-\-ifconfig 10.4.0.2 10.4.0.1 \-\-tls\-server \-\-dh dh1024.pem \-\-ca ca.crt \-\-cert server.crt \-\-key server.key \-\-reneg\-sec 60 \-\-verb 5
7486
-.LP
7487
-Now verify the tunnel is working by pinging across the tunnel.
7488
-.LP
7489
-On bob:
7490
-.IP
7491
-.B ping 10.4.0.2
7492
-.LP
7493
-On alice:
7494
-.IP
7495
-.B ping 10.4.0.1
7496
-.LP
7497
-Notice the
7498
-.B \-\-reneg\-sec 60
7499
-option we used above.  That tells OpenVPN to renegotiate
7500
-the data channel keys every minute.
7501
-Since we used
7502
-.B \-\-verb 5
7503
-above, you will see status information on each new key negotiation.
7504
-
7505
-For production operations, a key renegotiation interval of 60 seconds
7506
-is probably too frequent.  Omit the
7507
-.B \-\-reneg\-sec 60
7508
-option to use OpenVPN's default key renegotiation interval of one hour.
7509
-.\"*********************************************************
7510
-.SS Routing:
7511
-Assuming you can ping across the tunnel,
7512
-the next step is to route a real subnet over
7513
-the secure tunnel.  Suppose that bob and alice have two network
7514
-interfaces each, one connected
7515
-to the internet, and the other to a private
7516
-network.  Our goal is to securely connect
7517
-both private networks.  We will assume that bob's private subnet
7518
-is 10.0.0.0/24 and alice's is 10.0.1.0/24.
7519
-.LP
7520
-First, ensure that IP forwarding is enabled on both peers.
7521
-On Linux, enable routing:
7522
-.IP
7523
-.B echo 1 > /proc/sys/net/ipv4/ip_forward
7524
-.LP
7525
-and enable TUN packet forwarding through the firewall:
7526
-.IP
7527
-.B iptables \-A FORWARD \-i tun+ \-j ACCEPT
7528
-.LP
7529
-On bob:
7530
-.IP
7531
-.B route add \-net 10.0.1.0 netmask 255.255.255.0 gw 10.4.0.2
7532
-.LP
7533
-On alice:
7534
-.IP
7535
-.B route add \-net 10.0.0.0 netmask 255.255.255.0 gw 10.4.0.1
7536
-.LP
7537
-Now any machine on the 10.0.0.0/24 subnet can
7538
-access any machine on the 10.0.1.0/24 subnet
7539
-over the secure tunnel (or vice versa).
7540
-
7541
-In a production environment, you could put the route command(s)
7542
-in a script and execute with the
7543
-.B \-\-up
7544
-option.
7545
-.\"*********************************************************
7546
-.SH FIREWALLS
7547
-OpenVPN's usage of a single UDP port makes it fairly firewall\-friendly.
7548
-You should add an entry to your firewall rules to allow incoming OpenVPN
7549
-packets.  On Linux 2.4+:
7550
-.IP
7551
-.B iptables \-A INPUT \-p udp \-s 1.2.3.4 \-\-dport 1194 \-j ACCEPT
7552
-.LP
7553
-This will allow incoming packets on UDP port 1194 (OpenVPN's default UDP port)
7554
-from an OpenVPN peer at 1.2.3.4.
7555
-
7556
-If you are using HMAC\-based packet authentication (the default in any of
7557
-OpenVPN's secure modes), having the firewall filter on source
7558
-address can be considered optional, since HMAC packet authentication
7559
-is a much more secure method of verifying the authenticity of
7560
-a packet source.  In that case:
7561
-.IP
7562
-.B iptables \-A INPUT \-p udp \-\-dport 1194 \-j ACCEPT
7563
-.LP
7564
-would be adequate and would not render the host inflexible with
7565
-respect to its peer having a dynamic IP address.
7566
-
7567
-OpenVPN also works well on stateful firewalls.  In some cases, you may
7568
-not need to add any static rules to the firewall list if you are
7569
-using a stateful firewall that knows how to track UDP connections.
7570
-If you specify
7571
-.B \-\-ping n,
7572
-OpenVPN will be guaranteed
7573
-to send a packet to its peer at least once every
7574
-.B n
7575
-seconds.  If
7576
-.B n
7577
-is less than the stateful firewall connection timeout, you can
7578
-maintain an OpenVPN connection indefinitely without explicit
7579
-firewall rules.
7580
-
7581
-You should also add firewall rules to allow incoming IP traffic on
7582
-TUN or TAP devices such as:
7583
-.IP
7584
-.B iptables \-A INPUT \-i tun+ \-j ACCEPT
7585
-.LP
7586
-to allow input packets from tun devices,
7587
-.IP
7588
-.B iptables \-A FORWARD \-i tun+ \-j ACCEPT
7589
-.LP
7590
-to allow input packets from tun devices to be forwarded to
7591
-other hosts on the local network,
7592
-.IP
7593
-.B iptables \-A INPUT \-i tap+ \-j ACCEPT
7594
-.LP
7595
-to allow input packets from tap devices, and
7596
-.IP
7597
-.B iptables \-A FORWARD \-i tap+ \-j ACCEPT
7598
-.LP
7599
-to allow input packets from tap devices to be forwarded to
7600
-other hosts on the local network.
7601
-
7602
-These rules are secure if you use packet authentication,
7603
-since no incoming packets will arrive on a TUN or TAP
7604
-virtual device
7605
-unless they first pass an HMAC authentication test.
7606
-.\"*********************************************************
7607
-.SH FAQ
7608
-.I http://openvpn.net/faq.html
7609
-.\"*********************************************************
7610
-.SH HOWTO
7611
-For a more comprehensive guide to setting up OpenVPN
7612
-in a production setting, see the OpenVPN HOWTO at
7613
-.I http://openvpn.net/howto.html
7614
-.\"*********************************************************
7615
-.SH PROTOCOL
7616
-For a description of OpenVPN's underlying protocol,
7617
-see 
7618
-.I http://openvpn.net/security.html
7619
-.\"*********************************************************
7620
-.SH WEB
7621
-OpenVPN's web site is at
7622
-.I http://openvpn.net/
7623
-
7624
-Go here to download the latest version of OpenVPN, subscribe
7625
-to the mailing lists, read the mailing list
7626
-archives, or browse the SVN repository.
7627
-.\"*********************************************************
7628
-.SH BUGS
7629
-Report all bugs to the OpenVPN team <info@openvpn.net>.
7630
-.\"*********************************************************
7631
-.SH "SEE ALSO"
7632
-.BR dhcpcd (8),
7633
-.BR ifconfig (8),
7634
-.BR openssl (1),
7635
-.BR route (8),
7636
-.BR scp (1)
7637
-.BR ssh (1)
7638
-.\"*********************************************************
7639
-.SH NOTES 
7640
-.LP
7641
-This product includes software developed by the
7642
-OpenSSL Project (
7643
-.I http://www.openssl.org/
7644
-)
7645
-
7646
-For more information on the TLS protocol, see
7647
-.I http://www.ietf.org/rfc/rfc2246.txt
7648
-
7649
-For more information on the LZO real\-time compression library see
7650
-.I http://www.oberhumer.com/opensource/lzo/
7651
-.\"*********************************************************
7652
-.SH COPYRIGHT
7653
-Copyright (C) 2002\-2018 OpenVPN Inc This program is free software;
7654
-you can redistribute it and/or modify
7655
-it under the terms of the GNU General Public License version 2
7656
-as published by the Free Software Foundation.
7657
-.\"*********************************************************
7658
-.SH AUTHORS
7659
-James Yonan <jim@yonan.net>
7660 1
new file mode 100644
... ...
@@ -0,0 +1,169 @@
0
+=========
1
+ openvpn
2
+=========
3
+-------------------------
4
+ Secure IP tunnel daemon
5
+-------------------------
6
+
7
+:Manual section: 8
8
+:Manual group: System Manager's Manual
9
+
10
+
11
+
12
+SYNOPSIS
13
+========
14
+| ``openvpn`` [ options ... ]
15
+| ``openvpn``  ``--help``
16
+
17
+
18
+
19
+INTRODUCTION
20
+============
21
+
22
+OpenVPN is an open source VPN daemon by James Yonan. Because OpenVPN
23
+tries to be a universal VPN tool offering a great deal of flexibility,
24
+there are a lot of options on this manual page. If you're new to
25
+OpenVPN, you might want to skip ahead to the examples section where you
26
+will see how to construct simple VPNs on the command line without even
27
+needing a configuration file.
28
+
29
+Also note that there's more documentation and examples on the OpenVPN
30
+web site: https://openvpn.net/
31
+
32
+And if you would like to see a shorter version of this manual, see the
33
+openvpn usage message which can be obtained by running **openvpn**
34
+without any parameters.
35
+
36
+
37
+
38
+DESCRIPTION
39
+===========
40
+
41
+OpenVPN is a robust and highly flexible VPN daemon. OpenVPN supports
42
+SSL/TLS security, ethernet bridging, TCP or UDP tunnel transport through
43
+proxies or NAT, support for dynamic IP addresses and DHCP, scalability
44
+to hundreds or thousands of users, and portability to most major OS
45
+platforms.
46
+
47
+OpenVPN is tightly bound to the OpenSSL library, and derives much of its
48
+crypto capabilities from it.
49
+
50
+OpenVPN supports conventional encryption using a pre-shared secret key
51
+**(Static Key mode)** or public key security **(SSL/TLS mode)** using
52
+client & server certificates. OpenVPN also supports non-encrypted
53
+TCP/UDP tunnels.
54
+
55
+OpenVPN is designed to work with the **TUN/TAP** virtual networking
56
+interface that exists on most platforms.
57
+
58
+Overall, OpenVPN aims to offer many of the key features of IPSec but
59
+with a relatively lightweight footprint.
60
+
61
+
62
+
63
+OPTIONS
64
+=======
65
+
66
+OpenVPN allows any option to be placed either on the command line or in
67
+a configuration file. Though all command line options are preceded by a
68
+double-leading-dash ("--"), this prefix can be removed when an option is
69
+placed in a configuration file.
70
+
71
+.. include:: man-sections/generic-options.rst
72
+.. include:: man-sections/log-options.rst
73
+.. include:: man-sections/protocol-options.rst
74
+.. include:: man-sections/client-options.rst
75
+.. include:: man-sections/server-options.rst
76
+.. include:: man-sections/encryption-options.rst
77
+.. include:: man-sections/network-config.rst
78
+.. include:: man-sections/script-options.rst
79
+.. include:: man-sections/management-options.rst
80
+.. include:: man-sections/plugin-options.rst
81
+.. include:: man-sections/windows-options.rst
82
+.. include:: man-sections/advanced-options.rst
83
+.. include:: man-sections/unsupported-options.rst
84
+.. include:: man-sections/connection-profiles.rst
85
+.. include:: man-sections/inline-files.rst
86
+.. include:: man-sections/signals.rst
87
+.. include:: man-sections/examples.rst
88
+
89
+
90
+FAQ
91
+===
92
+
93
+https://community.openvpn.net/openvpn/wiki/FAQ
94
+
95
+
96
+
97
+HOWTO
98
+=====
99
+
100
+For a more comprehensive guide to setting up OpenVPN in a production
101
+setting, see the OpenVPN HOWTO at
102
+https://openvpn.net/community-resources/how-to/
103
+
104
+
105
+
106
+PROTOCOL
107
+========
108
+
109
+For a description of OpenVPN's underlying protocol, see
110
+https://openvpn.net/community-resources/openvpn-protocol/
111
+
112
+
113
+
114
+WEB
115
+===
116
+
117
+OpenVPN's web site is at https://openvpn.net/
118
+
119
+Go here to download the latest version of OpenVPN, subscribe to the
120
+mailing lists, read the mailing list archives, or browse the SVN
121
+repository.
122
+
123
+
124
+
125
+BUGS
126
+====
127
+
128
+Report all bugs to the OpenVPN team info@openvpn.net
129
+
130
+
131
+
132
+SEE ALSO
133
+========
134
+
135
+``dhcpcd``\(8),
136
+``ifconfig``\(8),
137
+``openssl``\(1),
138
+``route``\(8),
139
+``scp``\(1)
140
+``ssh``\(1)
141
+
142
+
143
+
144
+NOTES
145
+=====
146
+
147
+This product includes software developed by the OpenSSL Project
148
+(https://www.openssl.org/)
149
+
150
+For more information on the TLS protocol, see
151
+http://www.ietf.org/rfc/rfc2246.txt
152
+
153
+For more information on the LZO real-time compression library see
154
+https://www.oberhumer.com/opensource/lzo/
155
+
156
+
157
+
158
+COPYRIGHT
159
+=========
160
+
161
+Copyright (C) 2002-2020 OpenVPN Inc This program is free software; you
162
+can redistribute it and/or modify it under the terms of the GNU General
163
+Public License version 2 as published by the Free Software Foundation.
164
+
165
+AUTHORS
166
+=======
167
+
168
+James Yonan james@openvpn.net