1
+ # -*- coding: utf-8 -*-
2
+ # vim: ft=yaml
3
+ ---
1
4
# See https://openvpn.net/index.php/open-source/documentation/howto.html#examples
2
5
# for configuration details
3
6
# Important: Replace all '-' in names on left side with '_'!
4
7
5
8
# Defaults can be overwritten, see openvpn/map.jinja for default values
6
9
# openvpn:
7
10
# lookup:
8
- # dh_files: ['4096'] # This creates a dh file with 4096 bits (which will take a long time).
9
- # dh_files: ['2048'] # This creates a dh file with 2048 bits (which should be enough.)
10
- # # Default: ['2048', '4096']
11
- # # (It creates both variants.)
11
+ # # This creates a dh file with 4096 bits (which will take a long time).
12
+ # dh_files: ['4096']
13
+ # # This creates a dh file with 2048 bits (which should be enough.)
14
+ # # Default: ['2048', '4096']
15
+ # # (It creates both variants.)
16
+ # dh_files: ['2048']
12
17
#
13
- # dsaparam: False # Set this to True if you want to use the -dsaparam flag in DH param generation.
14
- # # See also:
15
- # # https://github.com/saltstack-formulas/openvpn-formula/pull/77
16
- # # https://security.stackexchange.com/questions/42415/openvpn-dhparam
18
+ # # Set this to true if you want to use the -dsaparam flag in DH param generation.
19
+ # # See also:
20
+ # # https://github.com/saltstack-formulas/openvpn-formula/pull/77
21
+ # # https://security.stackexchange.com/questions/42415/openvpn-dhparam
22
+ # dsaparam: false
17
23
#
18
- # external_repo_enabled: True # This will use the OpenVPN repository documented
19
- # # at the following URL: https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos
20
- # # Only valid for Debian OS family
24
+ # # This will use the OpenVPN repository documented
25
+ # # at the following URL:
26
+ # # https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos
27
+ # # Only valid for Debian OS family
28
+ # external_repo_enabled: true
21
29
#
22
- # external_repo_version: testing # The version to use for OpenVPN if 'external_repo_enabled' is set to 'True'
23
- # # Info here: https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos
24
- # # Valid options: stable (default), testing, release/2.3, release/2.4
30
+ # # The version to use for OpenVPN if 'external_repo_enabled' is set to 'true'
31
+ # # Info here: https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos
32
+ # # Valid options: stable (default), testing, release/2.3, release/2.4
33
+ # external_repo_version: testing
25
34
26
- #See also the example used in tests: test/integration/repositories/pillars.sls
35
+ # See also the example used in tests: test/integration/repositories/pillars.sls
27
36
28
37
# #
29
38
# OpenVPN user and group
30
39
#
31
40
# For historic reasons these are the default values:
32
- #openvpn:
41
+ # openvpn:
33
42
# lookup:
34
43
# user: nobody
35
44
# group: nobody # nogroup on Debian
@@ -43,17 +52,16 @@ openvpn:
43
52
group : openvpn
44
53
# When the user is not 'nobody', it will be managed by this formula.
45
54
# You can suppress this by: (Default on FreeBSD)
46
- manage_user: False
55
+ manage_user : false
47
56
# When the group is neither 'nobody' nor 'nogroup',
48
57
# it will be managed by this formula.
49
58
# You can suppress this by: (Default on FreeBSD)
50
- manage_group: False
59
+ manage_group : false
51
60
52
61
# If you want to control the openvpn services via other tools,
53
62
# you want to 'disabled' it in your system. Default: running
54
- #service_function: disabled
63
+ # service_function: disabled
55
64
56
- openvpn:
57
65
server :
58
66
myserver1 :
59
67
ca : /path/to/mycacert.pem
@@ -100,7 +108,7 @@ openvpn:
100
108
# tl;dr: The bigger, the better.
101
109
dh : dh4096.pem
102
110
# for faster DP params generation use only ['2048'] in openvpn:lookup:dh_files
103
- #dh: dh2048.pem
111
+ # dh: dh2048.pem
104
112
server : ' 10.8.0.0 255.255.255.0'
105
113
ifconfig_pool_persist : ipp.txt
106
114
server_bridge :
@@ -114,8 +122,8 @@ openvpn:
114
122
client1 : |
115
123
iroute 192.168.10.0 255.255.255.0
116
124
learn_address :
117
- client_to_client: False
118
- duplicate_cn: False
125
+ client_to_client : false
126
+ duplicate_cn : false
119
127
keepalive : ' 10 120'
120
128
# `tls-auth` and `tls-crypt` are mutually exclusive
121
129
# and `tls-crypt` is only valid for OpenVPN 2.4 and above.
@@ -133,6 +141,7 @@ openvpn:
133
141
- AES-256-CBC
134
142
auths :
135
143
- SHA384
144
+ # yamllint disable-line rule:line-length
136
145
tls_cipher : ' DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA'
137
146
comp_lzo :
138
147
max_clients : 100
@@ -162,9 +171,9 @@ openvpn:
162
171
ifconfig : ' 10.8.0.1 10.8.0.2'
163
172
secret : /path/to/mysecret.key
164
173
# or
165
- #secret: /path/to/mysecret.key 0
174
+ # secret: /path/to/mysecret.key 0
166
175
# or
167
- #secret: # use this form for paths with spaces
176
+ # secret: # use this form for paths with spaces
168
177
# - /path/to/mysecret.key
169
178
# - 0
170
179
secret_content : |
@@ -211,13 +220,11 @@ openvpn:
211
220
http_proxy_retry :
212
221
http_proxy : ' proxy-server proxy-port'
213
222
mute_replay_warnings :
214
- {% if grains['os_family'] == 'Windows' %}
215
- dev_node: ovpn-myclient2
216
- # Take care with the quoting for Windows paths with spaces
217
- ca: '"C:\\Program Files\\OpenVPN\\config\\mycacert.pem"'
218
- {% else %}
219
223
ca : /path/to/mycacert.pem
220
- {% endif %}
224
+ # The following two commented options are examples for Windows
225
+ # dev_node: ovpn-myclient2
226
+ # Take care with the quoting for Windows paths with spaces
227
+ # ca: '"C:\\Program Files\\OpenVPN\\config\\mycacert.pem"'
221
228
ca_content : |
222
229
-----BEGIN CERTIFICATE-----
223
230
...
@@ -236,7 +243,7 @@ openvpn:
236
243
askpass_content : |
237
244
p4ssw0rd
238
245
ns_cert_type : server
239
- #tls_auth: /path/to/tls.key 0
246
+ # tls_auth: /path/to/tls.key 0
240
247
# or:
241
248
tls_auth : # use this form for paths with spaces
242
249
- /path/to/tls.key
@@ -250,16 +257,17 @@ openvpn:
250
257
- AES-256-CBC
251
258
auths :
252
259
- SHA384
260
+ # yamllint disable-line rule:line-length
253
261
tls_cipher : ' DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA'
254
262
remote_cert_tls : server
255
263
comp_lzo :
256
264
verb : 3
257
265
mute : 20
258
266
up : /usr/local/bin/tunnel_up.sh
259
267
down : /usr/local/bin/tunnel_down.sh
260
- up_delay: True
261
- down_pre: True
262
- up_restart: True
268
+ up_delay : true
269
+ down_pre : true
270
+ up_restart : true
263
271
_append :
264
272
- script-security 2
265
273
- up 'echo up'
@@ -283,12 +291,12 @@ openvpn:
283
291
route :
284
292
- " 8.8.8.8 255.255.255.255 net_gateway"
285
293
myclient3 :
286
- pull: False
294
+ pull : false
287
295
# from the man page:
288
296
# This option must be used on a client which is connecting to a
289
297
# multi-client server. It indicates to OpenVPN that it should accept
290
298
# options pushed by the server, provided they are part of the legal
291
- # set of pushable options
299
+ # set of pushable options
292
300
293
301
ifconfig_pool_persist :
294
302
ipp.txt :
@@ -301,7 +309,7 @@ openvpn:
301
309
302
310
# #
303
311
# Use latest OpenVPN packages (default: false)
304
- use_latest: False
312
+ use_latest : false
305
313
306
314
# Managing clients which use NetworkManager
307
315
# (Intentionally does not handle certificate/key distribution!)
0 commit comments