From: "cron2 (Code Review)" Date: Mon, 9 Mar 2026 13:41:43 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726..., frank@...2641... Message-ID: <4096ba25ab5c90ee94cec24fcc2cd1822b2ef5d2-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="HXZvUsoKQUw="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: doc: fix client-nat syntax and examples List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici Cc: flichtenheld , plaisthos , openvpn-devel --HXZvUsoKQUw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/15= 60?usp=3Demail ) Change subject: doc: fix client-nat syntax and examples ...................................................................... doc: fix client-nat syntax and examples 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 Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560 Message-Id: <20260309130546.7735-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 966.html Signed-off-by: Gert Doering --- M doc/man-sections/client-options.rst 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/client-= options.rst index b9ae7ce..85d25e5 100644 --- a/doc/man-sections/client-options.rst +++ b/doc/man-sections/client-options.rst @@ -132,16 +132,21 @@ 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. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1560?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208 Gerrit-Change-Number: 1560 Gerrit-PatchSet: 3 Gerrit-Owner: ralf_lici Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --HXZvUsoKQUw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

doc: fix client-nat syntax and examples

T= he client-nat documentation uses an incorrect command form and
incomplet= e examples.

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

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

= Documentation-only change; no behavior change.

Change-Id: I89f0aa9a2= 3915c7783ae03793080ee989a437208
Signed-off-by: Ralf Lici <ralf@...2788...= 6...>
Acked-by: Frank Lichtenheld <frank@...2641...>
Gerrit = URL: https://gerrit.openvpn.net/c/openvpn/+/1560
Message-Id: <2026030= 9130546.7735-1-gert@...1296...>
URL: https://www.mail-archive.com/ope= nvpn-devel@lists.sourceforge.net/msg35966.html
Signed-off-by: Gert Doeri= ng <gert@...1296...>
---
M doc/man-sections/client-options.rst<= br>1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/clie=
nt-options.rst
index b9ae7ce..85d25e5 100644
--- a/doc/man-sections/client-options.rst
+++ b/doc/man-s= ections/client-options.rst
@@ -132,16 +132,21 @@
= ifconfig settings pushed to the client would create an IP numberin= g
conflict.

+ Valid syntax:
+ ::
+
+ cli= ent-nat snat|dnat network netmask alias
+
Examples:
::


- c= lient-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 cl= ient perspective, while
- ``alias/netmask`` (for example :code:`10.64.0.0/255.255.0.0`) defines t= he
- remote view from = the server perspective.
+ ``network`` and ``netmask`` (for example :code:`192.168.0.0+ 255.255.0.0`) define the lo= cal 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 owne= d by the client and
:code:`dnat` (destination NAT) for r= emote resources.

To view, visit change 1560= . To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae0379308= 0ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --HXZvUsoKQUw=--