summaryrefslogtreecommitdiff
path: root/templates/ipsec.conf.erb
blob: 44225d3311f432265de88bf159924e324dce3efe (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
config setup
        crlcheckinterval=180
        strictcrlpolicy=no
        plutostart=no

conn %default
        ikelifetime=60m
        keylife=20m
        rekeymargin=3m
        keyingtries=3
        keyexchange=ikev2
        mobike=no
        rightsendcert=never
        leftsendcert=never
        left=<%= scope.lookupvar('strongswan::default_left_ip_address') %>
        leftcert=<%= scope.lookupvar('::fqdn') %>.asc
        leftid=@<%= scope.lookupvar('::fqdn') %>
<% unless (subn=scope.lookupvar('strongswan::default_left_subnet')).empty? -%>
        leftsubnet=<%= subn.collect{|s| s.include?('/') ? s : (s.include?(':') ? "#{s}/128" : "#{s}/32" ) }.join(',') %>
<% end -%>

<% unless scope.lookupvar('strongswan::additional_options').empty? -%>
<%= scope.lookupvar('strongswan::additional_options') %>

<% end -%>
include <%= scope.lookupvar('strongswan::config_dir') %>/hosts/*.conf