Skip to contentSkip to conversation

Change in openvpn[master]: doc: fix client-nat syntax and examples

Openvpn-devel In review ralf_lici (Code Review) 2 participants 6 messages Mar 6 – Mar 9 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1772820505000.I89f0aa9a23915c7783ae03793080ee989a437208@...2715...

#1 lore raw

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=email

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

---
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

doc/man-sections/client-options.rst +11 -6
index b9ae7ce..85d25e5 100644
@@ -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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos, ralf_lici.

flichtenheld has posted comments on this change by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1560?usp=email )

Change subject: doc: fix client-nat syntax and examples
......................................................................

Patch Set 2: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1560?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 2
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: ralf_lici <[email protected]...>
Gerrit-Comment-Date: Mon, 09 Mar 2026 12:15:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH v2 1/1 doc: fix client-nat syntax and examples

In reply to a message not in the archive

From: Ralf Lici <[email protected]...>

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

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>

doc/man-sections/client-options.rst +11 -6
index b9ae7ce..85d25e5 100644
@@ -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.
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: doc: fix client-nat syntax and examples

This is an easy one for in-between... no code changes, so nothing to test, obviously-incorrect documentation beforehand, so quite useful to have :-)

Your patch has been applied to the master, release/2.7 and release/2.6 branch.

commit 60986ae5337f2501d088f3a9c919799f9fce7355 (master) commit 16646eb01adbbeff94e498a9d6589671602d7280 (release/2.7) commit 0481d9374f6aa940002ad71eaea8f98c057fc491 (release/2.6)

Author: Ralf Lici
Date:   Mon Mar 9 14:05:40 2026 +0100
     doc: fix client-nat syntax and examples

     Signed-off-by: Ralf Lici <[email protected]...>
     Acked-by: Frank Lichtenheld <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg35966.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#3) to the change originally created by ralf_lici. ( http://gerrit.openvpn.net/c/openvpn/+/1560?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld

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

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35966.html

---
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/3

doc/man-sections/client-options.rst +11 -6
index b9ae7ce..85d25e5 100644
@@ -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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1560?usp=email )

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

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1560
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35966.html

---
M doc/man-sections/client-options.rst

1 file changed, 11 insertions(+), 6 deletions(-)
doc/man-sections/client-options.rst +11 -6
index b9ae7ce..85d25e5 100644
@@ -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=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89f0aa9a23915c7783ae03793080ee989a437208
Gerrit-Change-Number: 1560
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>