38 lines
863 B
Django/Jinja
38 lines
863 B
Django/Jinja
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
|
{%- from "openvpn_client/map.jinja" import openvpn_client with context %}
|
|
<ca>
|
|
{{ openvpn_client.config.vpn.ca }}
|
|
</ca>
|
|
<cert>
|
|
{{ openvpn_client.config.vpn.cert }}
|
|
</cert>
|
|
<key>
|
|
{{ openvpn_client.config.vpn.key }}
|
|
</key>
|
|
client
|
|
remote {{ openvpn_client.config.vpn.global_endpoint_host }} {{ openvpn_client.config.vpn.global_endpoint_port }}
|
|
proto {{ openvpn_client.config.vpn.global_endpoint_proto }}
|
|
dev tun
|
|
|
|
topology subnet
|
|
|
|
keepalive 10 120
|
|
|
|
nobind
|
|
|
|
persist-key
|
|
persist-tun
|
|
|
|
compress lzo
|
|
fast-io
|
|
|
|
{% for k,v in salt['network.interfaces']().items() -%}
|
|
{%- if k.startswith('en') or k.startswith('eth') or k.startswith('wl') %}
|
|
{%- for net in salt['network.subnets'](k) %}
|
|
pull-filter ignore "route {{ net.split("/")[0] }}"
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
auth-user-pass private/pass
|