Skip to content

Commit b0fc10a

Browse files
flichtenheldcron2
authored andcommitted
samples: Update sample configurations
- 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: OpenVPN#511 Change-Id: I1a36651c0dea52259533ffc00bccb9b03bf82e26 Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Arne Schwabe <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg28451.html Signed-off-by: Gert Doering <[email protected]>
1 parent fd6b839 commit b0fc10a

File tree

3 files changed

+33
-43
lines changed

3 files changed

+33
-43
lines changed

sample/sample-config-files/README

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ These files are part of the OpenVPN HOWTO
44
which is located at:
55

66
http://openvpn.net/howto.html
7+
8+
See also the openvpn-examples man page.

sample/sample-config-files/client.conf

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################
2-
# Sample client-side OpenVPN 2.0 config file #
2+
# Sample client-side OpenVPN 2.6 config file #
33
# for connecting to multi-client server. #
44
# #
55
# This configuration can be used by multiple #
@@ -102,22 +102,15 @@ key client.key
102102
# EasyRSA can do this for you.
103103
remote-cert-tls server
104104

105+
# Allow to connect to really old OpenVPN versions
106+
# without AEAD support (OpenVPN 2.3.x or older)
107+
# This adds AES-256-CBC as fallback cipher and
108+
# keeps the modern ciphers as well.
109+
;data-ciphers AES-256-GCM:AES-128-GCM:?CHACHA20-POLY1305:AES-256-CBC
110+
105111
# If a tls-auth key is used on the server
106112
# then every client must also have the key.
107-
tls-auth ta.key 1
108-
109-
# Select a cryptographic cipher.
110-
# If the cipher option is used on the server
111-
# then you must also specify it here.
112-
# Note that v2.4 client/server will automatically
113-
# negotiate AES-256-GCM in TLS mode.
114-
# See also the data-ciphers option in the manpage
115-
cipher AES-256-CBC
116-
117-
# Enable compression on the VPN link.
118-
# Don't enable this unless it is also
119-
# enabled in the server config file.
120-
#comp-lzo
113+
;tls-auth ta.key 1
121114

122115
# Set log file verbosity.
123116
verb 3

sample/sample-config-files/server.conf

+23-28
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#################################################
2-
# Sample OpenVPN 2.0 config file for #
2+
# Sample OpenVPN 2.6 config file for #
33
# multi-client server. #
44
# #
55
# This file is for the server side #
@@ -47,15 +47,15 @@ proto udp
4747
# an explicit unit number, such as tun0.
4848
# On Windows, use "dev-node" for this.
4949
# On most systems, the VPN will not function
50-
# unless you partially or fully disable
50+
# unless you partially or fully disable/open
5151
# the firewall for the TUN/TAP interface.
5252
;dev tap
5353
dev tun
5454

5555
# Windows needs the TAP-Win32 adapter name
5656
# 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
5959
# Windows firewall for the TAP adapter.
6060
# Non-Windows systems usually don't need this.
6161
;dev-node MyTap
@@ -66,15 +66,23 @@ dev tun
6666
# key file. The server and all clients will
6767
# use the same ca file.
6868
#
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
7172
# and private keys. Remember to use
7273
# a unique Common Name for the server
7374
# and each of the client certificates.
7475
#
7576
# Any X509 key management system can be used.
7677
# OpenVPN can also use a PKCS #12 formatted key file
7778
# (see "pkcs12" directive in man page).
79+
#
80+
# If you do not want to maintain a CA
81+
# and have a small number of clients
82+
# you can also use self-signed certificates
83+
# and use the peer-fingerprint option.
84+
# See openvpn-examples man page for a
85+
# configuration example.
7886
ca ca.crt
7987
cert server.crt
8088
key server.key # This file should be kept secret
@@ -84,12 +92,18 @@ key server.key # This file should be kept secret
8492
# openssl dhparam -out dh2048.pem 2048
8593
dh dh2048.pem
8694

95+
# Allow to connect to really old OpenVPN versions
96+
# without AEAD support (OpenVPN 2.3.x or older)
97+
# This adds AES-256-CBC as fallback cipher and
98+
# keeps the modern ciphers as well.
99+
;data-ciphers AES-256-GCM:AES-128-GCM:?CHACHA20-POLY1305:AES-256-CBC
100+
87101
# Network topology
88102
# Should be subnet (addressing via IP)
89103
# unless Windows clients v2.0.9 and lower have to
90104
# be supported (then net30, i.e. a /30 per client)
91105
# Defaults to net30 (not recommended)
92-
;topology subnet
106+
topology subnet
93107

94108
# Configure server mode and supply a VPN subnet
95109
# for OpenVPN to draw client addresses from.
@@ -218,7 +232,7 @@ ifconfig-pool-persist ipp.txt
218232
# IF YOU HAVE NOT GENERATED INDIVIDUAL
219233
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
220234
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
221-
# UNCOMMENT THIS LINE OUT.
235+
# UNCOMMENT THIS LINE.
222236
;duplicate-cn
223237

224238
# The keepalive directive causes ping-like
@@ -241,26 +255,7 @@ keepalive 10 120
241255
# a copy of this key.
242256
# The second parameter should be '0'
243257
# 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
258+
;tls-auth ta.key 0 # This file is secret
264259

265260
# The maximum number of concurrently connected
266261
# clients we want to allow.

0 commit comments

Comments
 (0)