]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
doc: fix client-nat syntax and examples
authorRalf Lici <ralf@mandelbit.com>
Mon, 9 Mar 2026 13:05:40 +0000 (14:05 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 9 Mar 2026 13:40:24 +0000 (14:40 +0100)
The client-nat documentation uses an incorrect command form and
incomplete examples.

Document the actual syntax accepted by openvpn:
  client-nat snat|dnat network netmask alias

Update examples to include all required arguments and rewrite the
explanatory text to describe 'network', 'netmask', and 'alias'
separately.

Documentation-only change; no behavior change.

Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
Message-Id: <20260309130546.7735-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35966.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 60986ae5337f2501d088f3a9c919799f9fce7355)

doc/man-sections/client-options.rst

index b9ae7ce0f69560713829a0a2de1c41b30e11f548..85d25e5189b903afcd74ff094a168f5157b5ea2d 100644 (file)
@@ -132,16 +132,21 @@ configuration.
   ifconfig settings pushed to the client would create an IP numbering
   conflict.
 
+  Valid syntax:
+  ::
+
+      client-nat snat|dnat network netmask alias
+
   Examples:
   ::
 
-      client-nat snat 192.168.0.0/255.255.0.0
-      client-nat dnat 10.64.0.0/255.255.0.0
+      client-nat snat 192.168.0.0 255.255.0.0 10.64.0.0
+      client-nat dnat 10.64.0.0 255.255.0.0 192.168.0.0
 
-  ``network/netmask`` (for example :code:`192.168.0.0/255.255.0.0`) defines
-  the local view of a resource from the client perspective, while
-  ``alias/netmask`` (for example :code:`10.64.0.0/255.255.0.0`) defines the
-  remote view from the server perspective.
+  ``network`` and ``netmask`` (for example :code:`192.168.0.0
+  255.255.0.0`) define the local view of a resource from the client
+  perspective, while ``alias`` (for example :code:`10.64.0.0`) defines the
+  remote view from the server perspective using the same netmask.
 
   Use :code:`snat` (source NAT) for resources owned by the client and
   :code:`dnat` (destination NAT) for remote resources.