- Remove compression settings. Not recommended anymore.
- Remove old cipher setting. Replaced by data-ciphers negotiation.
- Add comment how to set data-ciphers for very old clients.
- Remove/reword some old comments. e.g. no need to reference
OpenVPN 1.x anymore.
- Mention peer-fingerprint alternative.
- comment out "tls-auth" as that is not needed for a bare-bones VPN config
and needs additional setup.
Github: #511
Change-Id: I1a36651c0dea52259533ffc00bccb9b03bf82e26
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20240325071320.11348-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28451.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit b0fc10abd06fa2307e95c8a60fa94f7ccc08d2ac)
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
############################################## |
| 2 |
-# Sample client-side OpenVPN 2.0 config file # |
|
| 2 |
+# Sample client-side OpenVPN 2.6 config file # |
|
| 3 | 3 |
# for connecting to multi-client server. # |
| 4 | 4 |
# # |
| 5 | 5 |
# This configuration can be used by multiple # |
| ... | ... |
@@ -103,22 +103,15 @@ key client.key |
| 103 | 103 |
# EasyRSA can do this for you. |
| 104 | 104 |
remote-cert-tls server |
| 105 | 105 |
|
| 106 |
+# Allow to connect to really old OpenVPN versions |
|
| 107 |
+# without AEAD support (OpenVPN 2.3.x or older) |
|
| 108 |
+# This adds AES-256-CBC as fallback cipher and |
|
| 109 |
+# keeps the modern ciphers as well. |
|
| 110 |
+;data-ciphers AES-256-GCM:AES-128-GCM:?CHACHA20-POLY1305:AES-256-CBC |
|
| 111 |
+ |
|
| 106 | 112 |
# If a tls-auth key is used on the server |
| 107 | 113 |
# then every client must also have the key. |
| 108 |
-tls-auth ta.key 1 |
|
| 109 |
- |
|
| 110 |
-# Select a cryptographic cipher. |
|
| 111 |
-# If the cipher option is used on the server |
|
| 112 |
-# then you must also specify it here. |
|
| 113 |
-# Note that v2.4 client/server will automatically |
|
| 114 |
-# negotiate AES-256-GCM in TLS mode. |
|
| 115 |
-# See also the data-ciphers option in the manpage |
|
| 116 |
-cipher AES-256-CBC |
|
| 117 |
- |
|
| 118 |
-# Enable compression on the VPN link. |
|
| 119 |
-# Don't enable this unless it is also |
|
| 120 |
-# enabled in the server config file. |
|
| 121 |
-#comp-lzo |
|
| 114 |
+;tls-auth ta.key 1 |
|
| 122 | 115 |
|
| 123 | 116 |
# Set log file verbosity. |
| 124 | 117 |
verb 3 |
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
################################################# |
| 2 |
-# Sample OpenVPN 2.0 config file for # |
|
| 2 |
+# Sample OpenVPN 2.6 config file for # |
|
| 3 | 3 |
# multi-client server. # |
| 4 | 4 |
# # |
| 5 | 5 |
# This file is for the server side # |
| ... | ... |
@@ -47,15 +47,15 @@ proto udp |
| 47 | 47 |
# an explicit unit number, such as tun0. |
| 48 | 48 |
# On Windows, use "dev-node" for this. |
| 49 | 49 |
# On most systems, the VPN will not function |
| 50 |
-# unless you partially or fully disable |
|
| 50 |
+# unless you partially or fully disable/open |
|
| 51 | 51 |
# the firewall for the TUN/TAP interface. |
| 52 | 52 |
;dev tap |
| 53 | 53 |
dev tun |
| 54 | 54 |
|
| 55 | 55 |
# Windows needs the TAP-Win32 adapter name |
| 56 | 56 |
# from the Network Connections panel if you |
| 57 |
-# have more than one. On XP SP2 or higher, |
|
| 58 |
-# you may need to selectively disable the |
|
| 57 |
+# have more than one. |
|
| 58 |
+# You may need to selectively disable the |
|
| 59 | 59 |
# Windows firewall for the TAP adapter. |
| 60 | 60 |
# Non-Windows systems usually don't need this. |
| 61 | 61 |
;dev-node MyTap |
| ... | ... |
@@ -66,8 +66,9 @@ dev tun |
| 66 | 66 |
# key file. The server and all clients will |
| 67 | 67 |
# use the same ca file. |
| 68 | 68 |
# |
| 69 |
-# See the "easy-rsa" directory for a series |
|
| 70 |
-# of scripts for generating RSA certificates |
|
| 69 |
+# See the "easy-rsa" project at |
|
| 70 |
+# https://github.com/OpenVPN/easy-rsa |
|
| 71 |
+# for generating RSA certificates |
|
| 71 | 72 |
# and private keys. Remember to use |
| 72 | 73 |
# a unique Common Name for the server |
| 73 | 74 |
# and each of the client certificates. |
| ... | ... |
@@ -75,6 +76,13 @@ dev tun |
| 75 | 75 |
# Any X509 key management system can be used. |
| 76 | 76 |
# OpenVPN can also use a PKCS #12 formatted key file |
| 77 | 77 |
# (see "pkcs12" directive in man page). |
| 78 |
+# |
|
| 79 |
+# If you do not want to maintain a CA |
|
| 80 |
+# and have a small number of clients |
|
| 81 |
+# you can also use self-signed certificates |
|
| 82 |
+# and use the peer-fingerprint option. |
|
| 83 |
+# See openvpn-examples man page for a |
|
| 84 |
+# configuration example. |
|
| 78 | 85 |
ca ca.crt |
| 79 | 86 |
cert server.crt |
| 80 | 87 |
key server.key # This file should be kept secret |
| ... | ... |
@@ -84,12 +92,18 @@ key server.key # This file should be kept secret |
| 84 | 84 |
# openssl dhparam -out dh2048.pem 2048 |
| 85 | 85 |
dh dh2048.pem |
| 86 | 86 |
|
| 87 |
+# Allow to connect to really old OpenVPN versions |
|
| 88 |
+# without AEAD support (OpenVPN 2.3.x or older) |
|
| 89 |
+# This adds AES-256-CBC as fallback cipher and |
|
| 90 |
+# keeps the modern ciphers as well. |
|
| 91 |
+;data-ciphers AES-256-GCM:AES-128-GCM:?CHACHA20-POLY1305:AES-256-CBC |
|
| 92 |
+ |
|
| 87 | 93 |
# Network topology |
| 88 | 94 |
# Should be subnet (addressing via IP) |
| 89 | 95 |
# unless Windows clients v2.0.9 and lower have to |
| 90 | 96 |
# be supported (then net30, i.e. a /30 per client) |
| 91 | 97 |
# Defaults to net30 (not recommended) |
| 92 |
-;topology subnet |
|
| 98 |
+topology subnet |
|
| 93 | 99 |
|
| 94 | 100 |
# Configure server mode and supply a VPN subnet |
| 95 | 101 |
# for OpenVPN to draw client addresses from. |
| ... | ... |
@@ -218,7 +232,7 @@ ifconfig-pool-persist ipp.txt |
| 218 | 218 |
# IF YOU HAVE NOT GENERATED INDIVIDUAL |
| 219 | 219 |
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT, |
| 220 | 220 |
# EACH HAVING ITS OWN UNIQUE "COMMON NAME", |
| 221 |
-# UNCOMMENT THIS LINE OUT. |
|
| 221 |
+# UNCOMMENT THIS LINE. |
|
| 222 | 222 |
;duplicate-cn |
| 223 | 223 |
|
| 224 | 224 |
# The keepalive directive causes ping-like |
| ... | ... |
@@ -241,26 +255,7 @@ keepalive 10 120 |
| 241 | 241 |
# a copy of this key. |
| 242 | 242 |
# The second parameter should be '0' |
| 243 | 243 |
# on the server and '1' on the clients. |
| 244 |
-tls-auth ta.key 0 # This file is secret |
|
| 245 |
- |
|
| 246 |
-# Select a cryptographic cipher. |
|
| 247 |
-# This config item must be copied to |
|
| 248 |
-# the client config file as well. |
|
| 249 |
-# Note that v2.4 client/server will automatically |
|
| 250 |
-# negotiate AES-256-GCM in TLS mode. |
|
| 251 |
-# See also the ncp-cipher option in the manpage |
|
| 252 |
-cipher AES-256-CBC |
|
| 253 |
- |
|
| 254 |
-# Enable compression on the VPN link and push the |
|
| 255 |
-# option to the client (v2.4+ only, for earlier |
|
| 256 |
-# versions see below) |
|
| 257 |
-;compress lz4-v2 |
|
| 258 |
-;push "compress lz4-v2" |
|
| 259 |
- |
|
| 260 |
-# For compression compatible with older clients use comp-lzo |
|
| 261 |
-# If you enable it here, you must also |
|
| 262 |
-# enable it in the client config file. |
|
| 263 |
-;comp-lzo |
|
| 244 |
+;tls-auth ta.key 0 # This file is secret |
|
| 264 | 245 |
|
| 265 | 246 |
# The maximum number of concurrently connected |
| 266 | 247 |
# clients we want to allow. |