From: "flichtenheld (Code Review)" Date: Mon, 4 Mar 2024 13:01:48 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="esKsi1WYeyU="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: samples: Update sample configurations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --esKsi1WYeyU= 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/+/532?usp=3Demail to review the following change. Change subject: samples: Update sample configurations ...................................................................... samples: Update sample configurations - Remove compression settings. Not recommended anymore. - Remove old cipher setting. Replaced by data-cipher with sane defaults. - Remove/reword some old comments. e.g. no need to reference OpenVPN 1.x anymore. - Mention peer-fingerprint alternative. Change-Id: I1a36651c0dea52259533ffc00bccb9b03bf82e26 Signed-off-by: Frank Lichtenheld --- M sample/sample-config-files/README M sample/sample-config-files/client.conf M sample/sample-config-files/server.conf 3 files changed, 21 insertions(+), 43 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/32/532/1 diff --git a/sample/sample-config-files/README b/sample/sample-config-files= /README index d53ac79..1493dab 100644 --- a/sample/sample-config-files/README +++ b/sample/sample-config-files/README @@ -4,3 +4,5 @@ which is located at: http://openvpn.net/howto.html + +See also the openvpn-examples man page. diff --git a/sample/sample-config-files/client.conf b/sample/sample-config-= files/client.conf index 15cb1b3..1c20e1b 100644 --- a/sample/sample-config-files/client.conf +++ b/sample/sample-config-files/client.conf @@ -1,5 +1,5 @@ ############################################## -# Sample client-side OpenVPN 2.0 config file # +# Sample client-side OpenVPN 2.6 config file # # for connecting to multi-client server. # # # # This configuration can be used by multiple # @@ -105,20 +105,7 @@ # If a tls-auth key is used on the server # then every client must also have the key. -tls-auth ta.key 1 - -# Select a cryptographic cipher. -# If the cipher option is used on the server -# then you must also specify it here. -# Note that v2.4 client/server will automatically -# negotiate AES-256-GCM in TLS mode. -# See also the data-ciphers option in the manpage -cipher AES-256-CBC - -# Enable compression on the VPN link. -# Don't enable this unless it is also -# enabled in the server config file. -#comp-lzo +;tls-auth ta.key 1 # Set log file verbosity. verb 3 diff --git a/sample/sample-config-files/server.conf b/sample/sample-config-= files/server.conf index d9345b6..927c465 100644 --- a/sample/sample-config-files/server.conf +++ b/sample/sample-config-files/server.conf @@ -1,5 +1,5 @@ ################################################# -# Sample OpenVPN 2.0 config file for # +# Sample OpenVPN 2.6 config file for # # multi-client server. # # # # This file is for the server side # @@ -47,15 +47,15 @@ # an explicit unit number, such as tun0. # On Windows, use "dev-node" for this. # On most systems, the VPN will not function -# unless you partially or fully disable +# unless you partially or fully disable/open # the firewall for the TUN/TAP interface. ;dev tap dev tun # Windows needs the TAP-Win32 adapter name # from the Network Connections panel if you -# have more than one. On XP SP2 or higher, -# you may need to selectively disable the +# have more than one. +# You may need to selectively disable the # Windows firewall for the TAP adapter. # Non-Windows systems usually don't need this. ;dev-node MyTap @@ -66,8 +66,9 @@ # key file. The server and all clients will # use the same ca file. # -# See the "easy-rsa" directory for a series -# of scripts for generating RSA certificates +# See the "easy-rsa" project at +# https://github.com/OpenVPN/easy-rsa +# for generating RSA certificates # and private keys. Remember to use # a unique Common Name for the server # and each of the client certificates. @@ -75,6 +76,13 @@ # Any X509 key management system can be used. # OpenVPN can also use a PKCS #12 formatted key file # (see "pkcs12" directive in man page). +# +# If you do not want to maintain a CA +# and have a small number of clients +# you can also use self-signed certificates +# and use the peer-fingerprint option. +# See openvpn-examples man page for a +# configuration example. ca ca.crt cert server.crt key server.key # This file should be kept secret @@ -89,7 +97,7 @@ # unless Windows clients v2.0.9 and lower have to # be supported (then net30, i.e. a /30 per client) # Defaults to net30 (not recommended) -;topology subnet +topology subnet # Configure server mode and supply a VPN subnet # for OpenVPN to draw client addresses from. @@ -218,7 +226,7 @@ # IF YOU HAVE NOT GENERATED INDIVIDUAL # CERTIFICATE/KEY PAIRS FOR EACH CLIENT, # EACH HAVING ITS OWN UNIQUE "COMMON NAME", -# UNCOMMENT THIS LINE OUT. +# UNCOMMENT THIS LINE. ;duplicate-cn # The keepalive directive causes ping-like @@ -241,26 +249,7 @@ # a copy of this key. # The second parameter should be '0' # on the server and '1' on the clients. -tls-auth ta.key 0 # This file is secret - -# Select a cryptographic cipher. -# This config item must be copied to -# the client config file as well. -# Note that v2.4 client/server will automatically -# negotiate AES-256-GCM in TLS mode. -# See also the ncp-cipher option in the manpage -cipher AES-256-CBC - -# Enable compression on the VPN link and push the -# option to the client (v2.4+ only, for earlier -# versions see below) -;compress lz4-v2 -;push "compress lz4-v2" - -# For compression compatible with older clients use comp-lzo -# If you enable it here, you must also -# enable it in the client config file. -;comp-lzo +;tls-auth ta.key 0 # This file is secret # The maximum number of concurrently connected # clients we want to allow. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/532?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I1a36651c0dea52259533ffc00bccb9b03bf82e26 Gerrit-Change-Number: 532 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --esKsi1WYeyU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

Vi= ew Change

samples: Update sample configurations

- Remove compres= sion settings. Not recommended anymore.
- Remove old cipher setting. Rep= laced by data-cipher with sane defaults.
- Remove/reword some old commen= ts. e.g. no need to reference
OpenVPN 1.x anymore.
- Mention peer-f= ingerprint alternative.

Change-Id: I1a36651c0dea52259533ffc00bccb9b0= 3bf82e26
Signed-off-by: Frank Lichtenheld <frank@...2641...>
--= -
M sample/sample-config-files/README
M sample/sample-config-files/cl= ient.conf
M sample/sample-config-files/server.conf
3 files changed, 2= 1 insertions(+), 43 deletions(-)

git pull ssh://gerrit.openvpn.ne=
t:29418/openvpn refs/changes/32/532/1
diff --git a/sample/sample-co=
nfig-files/README b/sample/sample-config-files/README
index= d53ac79..1493dab 100644
--- a/sample/sample-config-files/R= EADME
+++ b/sample/sample-config-files/README
@@ -4,3 +4,5 @@
which is located at:
<= /span>
http://openvpn.net/howto.html
+
+See also the openvpn-examples man page.
diff --git = a/sample/sample-config-files/client.conf b/sample/sample-config-files/clien= t.conf
index 15cb1b3..1c20e1b 100644
--- a/= sample/sample-config-files/client.conf
+++ b/sample/sample-= config-files/client.conf
@@ -1,5 +1,5 @@
#= #############################################
-# Sample client-side OpenVPN 2.0 config file #
+# Sample client-side Ope= nVPN 2.6 config file #
# for connecting to multi-client se= rver. #
# #=
# This configuration can be used by multiple #
= @@ -105,20 +105,7 @@

# If a tls-au= th key is used on the server
# then every client must also= have the key.
-tls-aut= h ta.key 1
-
= -# Select a cryptographic cipher.=
-# If the cipher optio= n is used on the server
-# then you must also specify it here.
-# Note that v2.4 client/server will automatically<= br>-# negotiate AES-256-GCM in TL= S mode.
-# See also the= data-ciphers option in the manpage
-cipher AES-256-CBC
-
-# Enable c= ompression on the VPN link.
-# Don't enable this unless it is also
-# enabled in the server config file.
-#comp-lzo

+;tls-auth ta.key 1
<= br> # Set log file verbosity.
verb 3
diff --git a/sample/sample-config-files/server.conf b/sample/sample-config= -files/server.conf

index d9345b6..927c465 100644
= --- a/sample/sample-config-files/server.conf
+++ b/sa= mple/sample-config-files/server.conf
@@ -1,5 +1,5 @@=
#################################################
-# Sample OpenVPN 2.0 config file for= #
+# Samp= le OpenVPN 2.6 config file for #
# multi-client= server. #
# = #
# This file is for the server = side #
@@ -47,15 +47,15 @@
# = an explicit unit number, such as tun0.
# On Windows, use &= quot;dev-node" for this.
# On most systems, the VPN w= ill not function
-# unl= ess you partially or fully disable
+# unless you partially or fully disable/open
# the firewall for the TUN/TAP interface.
;dev tap

dev tun

# Windows needs the = TAP-Win32 adapter name
# from the Network Connections pane= l if you
-# have more t= han one. On XP SP2 or higher,
-# you may need to selectively disable the
+# have more than one.
+# You may need to selectively disable the=
# Windows firewall for the TAP adapter.
= # Non-Windows systems usually don't need this.
;dev-no= de MyTap
@@ -66,8 +66,9 @@
# key file. Th= e server and all clients will
# use the same ca file.

#
-# See t= he "easy-rsa" directory for a series
-# of scripts for generating RSA certificates
+# See the "easy-rsa&= quot; project at
+# h= ttps://github.com/OpenVPN/easy-rsa
+# for generating RSA certificates
# and pri= vate keys. Remember to use
# a unique Common Name for the= server
# and each of the client certificates.
<= span>@@ -75,6 +76,13 @@

# Any X509 key management system c= an be used.
# OpenVPN can also use a PKCS #12 formatted ke= y file
# (see "pkcs12" directive in man page).
+#
+# If you do not want to maintain a CA
+# and have a small nu= mber of clients
+# yo= u can also use self-signed certificates
+# and use the peer-fingerprint option.
+# See openvpn-examples man page for = a
+# configuration ex= ample.
ca ca.crt
cert server.crt key server.key # This file should be kept secret
= @@ -89,7 +97,7 @@
# unless Windows clients v2.0.9 and lowe= r have to
# be supported (then net30, i.e. a /30 per clien= t)
# Defaults to net30 (not recommended)
-;topology subnet
+topology subnet
<= br> # Configure server mode and supply a VPN subnet
= # for OpenVPN to draw client addresses from.
@@ -218,7 +226= ,7 @@
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,

# EACH HAVING= ITS OWN UNIQUE "COMMON NAME",
-# UNCOMMENT THIS LINE OUT.
+# UNCOMMENT THIS LINE.
;duplicat= e-cn

# The keepalive directive causes pi= ng-like
@@ -241,26 +249,7 @@
# a copy of t= his key.
# The second parameter should be '0'
# on the server and '1' on the clients.
-tls-auth ta.key 0 # This file is sec= ret

-
-# Select a cryptographic cipher.=
-# This config item must be c= opied to
-# the client = config file as well.
-#= Note that v2.4 client/server will automatically
-# negotiate AES-256-GCM in TLS mode.
<= span style=3D"color: hsl(0, 100%, 40%);">-# See also the ncp-cipher option = in the manpage

-cipher = AES-256-CBC
--# Enable compression on the VPN= link and push the
-# o= ption to the client (v2.4+ only, for earlier
-# versions see below)
-;compress lz4-v2
-;push "compress lz4-v2"
-
-# For compression compatible with older clients use comp-lzo

-# If you enable it here, = you must also
-# enable= it in the client config file.
-;comp-lzo
+;= tls-auth ta.key 0 # This file is secret

= # The maximum number of concurrently connected
# clients w= e want to allow.

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1a36651c0dea52259533ffc00bc= cb9b03bf82e26
Gerrit-Change-Number: 532
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--esKsi1WYeyU=--