27 lines
638 B
Django/Jinja
27 lines
638 B
Django/Jinja
client
|
|
dev tap0
|
|
proto tcp
|
|
remote 127.0.0.1 1195
|
|
resolv-retry infinite
|
|
nobind
|
|
persist-key
|
|
persist-tun
|
|
remote-cert-tls server
|
|
auth SHA256
|
|
cipher AES-256-GCM
|
|
verb 3
|
|
{% if item.1.ip is defined %}
|
|
route-metric {{ item.1.route_metric | default(50) }}
|
|
script-security 2
|
|
up "C:\\Windows\\System32\\netsh.exe interface ip set address name="OpenVPN TAP-Windows6" static {{ item.1.ip }} 255.255.255.0"
|
|
{% endif %}
|
|
<ca>
|
|
{{ lookup('file', item.0.pki_dir + '/ca.crt') }}
|
|
</ca>
|
|
<cert>
|
|
{{ lookup('file', item.0.pki_dir + '/issued/' + item.1.name + '.crt') }}
|
|
</cert>
|
|
<key>
|
|
{{ lookup('file', item.0.pki_dir + '/private/' + item.1.name + '.key') }}
|
|
</key>
|