summaryrefslogtreecommitdiff
path: root/templates/openvpn/tunnel.conf.cftpl
blob: 9d7607f7e5baf516251c00b42eda0e9744d15de9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[%CFEngine BEGIN %]
proto udp
port $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][port])
dev-type tun
dev tun_$(openvpn_tunnel.tunnel)
comp-lzo
script-security 2

ping 10
ping-restart 20
ping-timer-rem
persist-tun
persist-key

cipher AES-128-CBC

secret /etc/openvpn/common.key
ifconfig $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][ip]) $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][peer])
[%CFEngine has_ipv6:: %]
ifconfig-ipv6 $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][ip6]) $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][peer6])

[%CFEngine all:: %]
user nobody
[%CFEngine centos:: %]
group nobody
[%CFEngine ubuntu:: %]
group nogroup

[%CFEngine has_remote:: %]
remote $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][remote_host]) $(g.host_data[tunnels][$(openvpn_tunnel.tunnel)][remote_port])
[%CFEngine END %]