Skip to content

Commit bd8d03e

Browse files
flichtenheldcron2
authored andcommitted
Documentation: Various syntax fixes and text improvements
This started as a fix for #606 but while reviewing the documentation referenced from there I identified more and more issues. There a few classes of changes in here: - Fix wrong `...` syntax, which makes no sense in rst. - Remove some very old references to OpenVPN v1 behavior. - Fix typos or other small text issues. Note: The usage of ``...`` vs :code:`...` is very inconsistent, but fixing that is outside of the scope of this patch. I have tried to make it at least locally consistent. Github: Fixes #606 Change-Id: Iee535f1502ab3dcb7bde7f2593c2e122d27d9189 Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1414 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34878.html Signed-off-by: Gert Doering <[email protected]>
1 parent 0ff66c0 commit bd8d03e

File tree

12 files changed

+52
-69
lines changed

12 files changed

+52
-69
lines changed

doc/man-sections/cipher-negotiation.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ The negotiation support in OpenVPN 2.4 was the first iteration of the implementa
3030
and still had some quirks. Its main goal was "upgrade to AES-256-GCM when possible".
3131
An OpenVPN 2.4 client that is built against a crypto library that supports AES in GCM
3232
mode and does not have ``--ncp-disable`` will always announce support for
33-
`AES-256-GCM` and `AES-128-GCM` to a server by sending :code:`IV_NCP=2`.
33+
``AES-256-GCM`` and ``AES-128-GCM`` to a server by sending :code:`IV_NCP=2`.
3434

3535
This only causes a problem if ``--ncp-ciphers`` option has been changed from the
3636
default of :code:`AES-256-GCM:AES-128-GCM` to a value that does not include
37-
these two ciphers. When an OpenVPN server tries to use `AES-256-GCM` or
38-
`AES-128-GCM` the connection will then fail. It is therefore recommended to
39-
always have the `AES-256-GCM` and `AES-128-GCM` ciphers to the ``--ncp-ciphers``
37+
these two ciphers. When an OpenVPN server tries to use ``AES-256-GCM`` or
38+
``AES-128-GCM`` the connection will then fail. It is therefore recommended to
39+
always have the ``AES-256-GCM`` and ``AES-128-GCM`` ciphers to the ``--ncp-ciphers``
4040
options to avoid this behaviour.
4141

4242
OpenVPN 3 clients
@@ -45,7 +45,7 @@ Clients based on the OpenVPN 3.x library (https://github.com/openvpn/openvpn3/)
4545
do not have a configurable ``--ncp-ciphers`` or ``--data-ciphers`` option. Newer
4646
versions by default disable legacy AES-CBC, BF-CBC, and DES-CBC ciphers.
4747
These clients will always announce support for all their supported AEAD ciphers
48-
(`AES-256-GCM`, `AES-128-GCM` and in newer versions also `Chacha20-Poly1305`).
48+
(``AES-256-GCM``, ``AES-128-GCM`` and in newer versions also ``Chacha20-Poly1305``).
4949

5050
To support OpenVPN 3.x based clients at least one of these ciphers needs to be
5151
included in the server's ``--data-ciphers`` option.
@@ -66,12 +66,12 @@ cipher used by the client is necessary.
6666

6767
OpenVPN 2.4 server
6868
``````````````````
69-
When a client indicates support for `AES-128-GCM` and `AES-256-GCM`
69+
When a client indicates support for ``AES-128-GCM`` and ``AES-256-GCM``
7070
(with ``IV_NCP=2``) an OpenVPN 2.4 server will send the first
7171
cipher of the ``--ncp-ciphers`` to the OpenVPN client regardless of what
7272
the cipher is. To emulate the behaviour of an OpenVPN 2.4 client as close
7373
as possible and have compatibility to a setup that depends on this quirk,
74-
adding `AES-128-GCM` and `AES-256-GCM` to the client's ``--data-ciphers``
74+
adding ``AES-128-GCM`` and ``AES-256-GCM`` to the client's ``--data-ciphers``
7575
option is required. OpenVPN 2.5+ will only announce the ``IV_NCP=2`` flag if
7676
those ciphers are present.
7777

@@ -90,10 +90,10 @@ cipher used by the server is necessary.
9090

9191
Blowfish in CBC mode (BF-CBC) deprecation
9292
`````````````````````````````````````````
93-
The ``--cipher`` option defaulted to `BF-CBC` in OpenVPN 2.4 and older
93+
The ``--cipher`` option defaulted to ``BF-CBC`` in OpenVPN 2.4 and older
9494
version. The default was never changed to ensure backwards compatibility.
9595
In OpenVPN 2.5 this behaviour has now been changed so that if the ``--cipher``
96-
is not explicitly set it does not allow the weak `BF-CBC` cipher any more
96+
is not explicitly set it does not allow the weak ``BF-CBC`` cipher any more
9797
and needs to explicitly added as ``--cipher BFC-CBC`` or added to
9898
``--data-ciphers``.
9999

doc/man-sections/client-options.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ configuration.
437437
This may be set by the client UI/GUI using ``--setenv``.
438438
On Windows systems it is automatically determined by openvpn
439439
itself. On other platforms OpenVPN will default to sending
440-
the information returned by the `uname()` system call in
441-
the `release` field, which is usually the currently running
440+
the information returned by the ``uname()`` system call in
441+
the ``release`` field, which is usually the currently running
442442
kernel version. This is highly system specific, though.
443443

444444
:code:`UV_<name>=<value>`

doc/man-sections/example-fingerprint.rst

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,26 @@ Server setup
1212
------------
1313
1. Install openvpn
1414

15-
Compile from source-code (see `INSTALL` file) or install via a distribution (apt/yum/ports)
15+
Compile from source-code (see ``INSTALL`` file) or install via a distribution (apt/yum/ports)
1616
or via installer (Windows).
1717

18-
2. Generate a self-signed certificate for the server:
19-
::
18+
2. Generate a self-signed certificate for the server::
2019

2120
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -keyout server.key -out server.crt -nodes -sha256 -days 3650 -subj '/CN=server'
2221

2322
3. Generate SHA256 fingerprint of the server certificate
2423

2524
Use the OpenSSL command line utility to view the fingerprint of just
26-
created certificate:
27-
::
25+
created certificate::
2826

2927
openssl x509 -fingerprint -sha256 -in server.crt -noout
3028

31-
This outputs something similar to:
32-
::
29+
This outputs something similar to::
3330

3431
SHA256 Fingerprint=00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff
3532

3633

37-
4. Write a server configuration (`server.conf`)::
34+
4. Write a server configuration (``server.conf``)::
3835

3936
# The server certificate we created in step 1
4037
cert server.crt
@@ -73,10 +70,8 @@ Server setup
7370
5. Add at least one client as described in the client section.
7471

7572
6. Start the server.
76-
- On systemd based distributions move `server.crt`, `server.key` and
77-
`server.conf` to :code:`/etc/openvpn/server` and start it via systemctl
78-
79-
::
73+
- On systemd based distributions move ``server.crt``, ``server.key`` and
74+
``server.conf`` to ``/etc/openvpn/server`` and start it via systemctl::
8075

8176
sudo mv server.conf server.key server.crt /etc/openvpn/server
8277

@@ -94,8 +89,7 @@ Adding a client
9489
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -keyout - -nodes -sha256 -days 3650 -subj '/CN=alice'
9590

9691
This generate a certificate and a key for the client. The output of the command will look
97-
something like this:
98-
::
92+
something like this::
9993

10094
-----BEGIN PRIVATE KEY-----
10195
[base64 content]
@@ -107,9 +101,7 @@ Adding a client
107101

108102

109103
3. Create a new client configuration file. In this example we will name the file
110-
`alice.ovpn`:
111-
112-
::
104+
``alice.ovpn``::
113105

114106
# The name of your server to connect to
115107
remote yourserver.example.net
@@ -146,24 +138,19 @@ Adding a client
146138

147139
4. Generate the fingerprint of the client certificate. For that we will
148140
let OpenSSL read the client configuration file as the x509 command will
149-
ignore anything that is not between the begin and end markers of the certificate:
150-
151-
::
141+
ignore anything that is not between the begin and end markers of the certificate::
152142

153143
openssl x509 -fingerprint -sha256 -noout -in alice.ovpn
154144

155-
This will again output something like
156-
::
145+
This will again output something like::
157146

158147
SHA256 Fingerprint=ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00
159148

160-
5. Edit the `server.conf` configuration file and add this new client
149+
5. Edit the ``server.conf`` configuration file and add this new client
161150
fingerprint as additional line between :code:`<peer-fingerprint>`
162151
and :code:`</peer-fingerprint>`
163152

164-
After adding *two* clients the part of configuration would look like this:
165-
166-
::
153+
After adding *two* clients the part of configuration would look like this::
167154

168155
<peer-fingerprint>
169156
ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00
@@ -172,15 +159,13 @@ Adding a client
172159

173160
6. (optional) if the client is an older client that does not support the
174161
:code:`peer-fingerprint` (e.g. OpenVPN 2.5 and older, OpenVPN Connect 3.3
175-
and older), the client config `alice.ovpn` can be modified to still work with
162+
and older), the client config ``alice.ovpn`` can be modified to still work with
176163
these clients.
177164

178165
Remove the line starting with :code:`peer-fingerprint`. Then
179166
add a new :code:`<ca>` section at the end of the configuration file
180-
with the contents of the :code:`server.crt` created in step 2 of the
181-
server setup. The end of `alice.ovpn` file should like:
182-
183-
::
167+
with the contents of the ``server.crt`` created in step 2 of the
168+
server setup. The end of ``alice.ovpn`` file should look like::
184169

185170
[...] # Beginning of the file skipped
186171
</cert>

doc/man-sections/examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ On alice::
132132

133133
ping 10.4.0.1
134134

135-
Note: This example use a elliptic curve (`secp384`), which allows
135+
Note: This example use a elliptic curve (``secp384``), which allows
136136
``--dh`` to be set to ``none``.
137137

138138
Example 3: A tunnel with full PKI and TLS-based security

doc/man-sections/protocol-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ configured in a compatible way between both the local and remote side.
185185
:code:`AES-192-CBC`.
186186

187187
Cipher negotiation is enabled in client-server mode only. I.e. if
188-
``--mode`` is set to `server` (server-side, implied by setting
188+
``--mode`` is set to ``server`` (server-side, implied by setting
189189
``--server`` ), or if ``--pull`` is specified (client-side, implied by
190190
setting ``--client``).
191191

doc/man-sections/script-options.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ SCRIPT HOOKS
149149
:code:`auth_pending_file`. The first line must be the timeout in
150150
seconds, the required method on the second line (e.g. crtext) and
151151
third line must be the EXTRA as documented in the
152-
``client-pending-auth`` section of `doc/management.txt`.
152+
``client-pending-auth`` section of ``doc/management.txt``.
153153

154154
This directive is designed to enable a plugin-style interface for
155155
extending OpenVPN's authentication capabilities.
@@ -588,7 +588,7 @@ permitted character class for each string:
588588

589589
*--auth-user-pass username*
590590
Same as Common Name, with one exception:
591-
starting with OpenVPN 2.0.1, the username is passed to the
591+
The username is passed to the
592592
:code:`OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY` plugin in its raw form,
593593
without string remapping.
594594

@@ -597,11 +597,9 @@ permitted character class for each string:
597597
a character which will cause the C library isprint() function to
598598
return true.
599599

600-
*--client-config-dir filename as derived from common name or`username*
601-
Alphanumeric, underbar ('\_'), dash ('-'), and dot ('.') except for "."
602-
or ".." as standalone strings. As of v2.0.1-rc6, the at ('@') character
603-
has been added as well for compatibility with the common name character
604-
class.
600+
*--client-config-dir filename as derived from common name or username*
601+
Alphanumeric, underbar ('\_'), dash ('-'), at ('@'), and dot ('.')
602+
except for "." or ".." as standalone strings.
605603

606604
*Environmental variable names*
607605
Alphanumeric or underbar ('\_').
@@ -620,7 +618,7 @@ Environmental Variables
620618
Once set, a variable is persisted indefinitely until it is reset by a
621619
new value or a restart,
622620

623-
As of OpenVPN 2.0-beta12, in server mode, environmental variables set by
621+
In server mode, environmental variables set by
624622
OpenVPN are scoped according to the client objects they are associated
625623
with, so there should not be any issues with scripts having access to
626624
stale, previously set variables which refer to different client
@@ -861,7 +859,7 @@ instances.
861859

862860
:code:`route_ipv6_{parm}_{n}`
863861
A set of variables which define each IPv6 route to be added, and are
864-
set prior to **--up** script execution.
862+
set prior to ``--up`` script execution.
865863

866864
``parm`` will be one of :code:`network`, :code:`gateway` or
867865
:code:`metric`. ``route_ipv6_network_{n}`` contains :code:`netmask`
@@ -877,9 +875,9 @@ instances.
877875
:code:`route_redirect_gateway_ipv4`
878876

879877
:code:`route_redirect_gateway_ipv6`
880-
Set to `1` if the corresponding default gateway should be redirected
881-
into the tunnel, and to `2` if also the local LAN segment should be
882-
blocked (`block-local`). Not set otherwise. Set prior to **--up** script
878+
Set to :code:`1` if the corresponding default gateway should be redirected
879+
into the tunnel, and to :code:`2` if also the local LAN segment should be
880+
blocked (:code:`block-local`). Not set otherwise. Set prior to ``--up`` script
883881
execution.
884882

885883
:code:`script_context`

doc/man-sections/server-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ fast hardware. SSL/TLS authentication must be used in this mode.
509509
``--rcvbuf``, ``--session-timeout``
510510

511511
Note: using ``--push`` requires OpenVPN to run in ``--mode server`` (or
512-
using of one of `--server`, `--server-bridge` helper directives).
512+
using of one of ``--server``, ``--server-bridge`` helper directives).
513513

514514
--push-remove opt
515515
Selectively remove all ``--push`` options matching "opt" from the option

doc/man-sections/signals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SIGNALS
77
connections.
88

99
:code:`SIGUSR1`
10-
Like :code:`SIGHUP``, except don't re-read configuration file, and
10+
Like :code:`SIGHUP`, except don't re-read configuration file, and
1111
possibly don't close and reopen TUN/TAP device, re-read key files,
1212
preserve local IP address/port, or preserve most recently authenticated
1313
remote IP address/port based on ``--persist-tun``, ``--persist-local-ip``

doc/man-sections/tls-options.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
220220
Local peer's private key in .pem format or a URI. Use the private key
221221
which was generated when you built your peer's certificate (see
222222
``--cert file`` above). URI is supported only when built with OpenSSL 3.0
223-
or later and any required providers are loaded. (See `--cert` for more details).
223+
or later and any required providers are loaded. (See ``--cert`` for more details).
224224

225225
--pkcs12 file
226226
Specify a PKCS #12 file containing local private key, local certificate,
@@ -390,7 +390,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
390390
by using ``--ecdh-curve``, the groups for ecdh will also be picked
391391
from this list.
392392

393-
OpenVPN maps the curve name `secp256r1` to `prime256v1` to allow
393+
OpenVPN maps the curve name ``secp256r1`` to ``prime256v1`` to allow
394394
specifying the same tls-groups option for mbedTLS and OpenSSL.
395395

396396
Warning: this option not only affects elliptic curve certificates
@@ -404,7 +404,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
404404
The following profiles are supported:
405405

406406
:code:`insecure`
407-
Identical for mbed TLS to `legacy`
407+
Identical for mbed TLS to :code:`legacy`
408408

409409
:code:`legacy` (default)
410410
SHA1 and newer, RSA 2048-bit+, any elliptic curve.
@@ -433,7 +433,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
433433
OpenVPN will migrate to 'preferred' as default in the future. Please
434434
ensure that your keys already comply.
435435

436-
*WARNING:* ``--tls-ciphers``, ``--tls-ciphersuites`` and ``tls-groups``
436+
*WARNING:* ``--tls-cipher``, ``--tls-ciphersuites`` and ``tls-groups``
437437
These options are expert features, which - if used correctly - can
438438
improve the security of your VPN connection. But it is also easy to
439439
unwittingly use them to carefully align a gun with your foot, or just
@@ -442,7 +442,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
442442
--tls-cipher l
443443
A list ``l`` of allowable TLS ciphers delimited by a colon (":code:`:`").
444444

445-
These setting can be used to ensure that certain cipher suites are used
445+
This setting can be used to ensure that certain cipher suites are used
446446
(or not used) for the TLS connection. OpenVPN uses TLS to secure the
447447
control channel, over which the keys that are used to protect the actual
448448
VPN traffic are exchanged.
@@ -452,7 +452,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
452452
OpenSSL and/or mbed TLS documentation for details on the cipher list
453453
interpretation.
454454

455-
For OpenSSL, the ``--tls-cipher`` is used for TLS 1.2 and below.
455+
For OpenSSL, the ``--tls-cipher`` option is used for TLS 1.2 and below.
456456

457457
Use ``--show-tls`` to see a list of TLS ciphers supported by your crypto
458458
library.
@@ -466,7 +466,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa
466466
Same as ``--tls-cipher`` but for TLS 1.3 and up. mbed TLS has no
467467
TLS 1.3 support yet and only the ``--tls-cipher`` setting is used.
468468

469-
The default for `--tls-ciphersuites` is to use the crypto library's
469+
The default for ``--tls-ciphersuites`` is to use the crypto library's
470470
default.
471471

472472
--tls-client

doc/man-sections/virtual-routing-and-forwarding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Move :code:`eth0` into :code:`vrf_external`
3535
ip link set master vrf_external dev eth0
3636

3737
Any prefixes configured on :code:`eth0` will be moved from the :code`main`
38-
routing table into routing table `1023`
38+
routing table into routing table :code:`1023`
3939

4040

4141
VRF setup with ifupdown

0 commit comments

Comments
 (0)