From: "ralf_lici (Code Review)" Date: Fri, 6 Mar 2026 18:08:30 +0000 References: Reply-To: ralf@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <5abeb608941f51179c5d1315da0e5a302ff79979-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="XXWTex97SG4="; 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: plaisthos Cc: openvpn-devel --XXWTex97SG4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1560?usp=3Demail to review the following change. 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 --- M doc/man-sections/client-options.rst 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1560/1 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: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208 Gerrit-Change-Number: 1560 Gerrit-PatchSet: 1 Gerrit-Owner: ralf_lici Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --XXWTex97SG4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

ralf_lici would like plaisthos to review this change.

V= iew Change

doc: fix client-nat syntax and examples
=
The client-nat documentation uses an incorrect command form and
inco= mplete examples.

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

Update examples to incl= ude all required arguments and rewrite the
explanatory text to describe = 'network', 'netmask', and 'alias'
separately.
Documentation-only change; no behavior change.

Change-Id: I89f0= aa9a23915c7783ae03793080ee989a437208
Signed-off-by: Ralf Lici <ralf@...220...= ..2726...>
---
M doc/man-sections/client-options.rst
1 file cha= nged, 11 insertions(+), 6 deletions(-)

git pull =
ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1560/1
diff =
--git a/doc/man-sections/client-options.rst b/doc/man-sections/client-optio=
ns.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:
::
<= span>
- client-na= t 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 e= xample :code:`192.168.0.0/255.255.0.0`) defines
- the local view of a resource from the client pe= rspective, while
- ``a= lias/netmask`` (for example :code:`10.64.0.0/255.255.0.0`) defines the
- remote view from the ser= ver perspective.
+ `= `network`` and ``netmask`` (for example :code:`192.168.0.0
+ 255.255.0.0`) define the local vie= w 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 th= e client and
:code:`dnat` (destination NAT) for remote r= esources.

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae0379308= 0ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --XXWTex97SG4=--