7u83-ipsec/templates/strongswan/ipsec.conf.tunnel.erb

24 lines
858 B
Plaintext
Raw Normal View History

2018-02-23 16:02:21 +00:00
<%- @nets.each do |net| -%>
<%- @salifetime = net['lifetime'] ? net['lifetime'] : "3600 sec" -%>
<%- @saencryption = net['encryption'] ? net['encryption'] : @encryption -%>
<%- @pfs_group = net['pfs_group'] ? net['pfs_group'] : @dh_group -%>
<%- @p2hash = net['hash'] ? net['hash'] : @hash -%>
2018-02-21 15:31:53 +00:00
2018-03-07 13:40:57 +00:00
conn "<%= @title %> <%= net['local'] %> <%= net['remote']%>"
2018-03-13 17:20:40 +00:00
ikelifetime=<%= @lifetime %>s
lifetime=<%= @salifetime %>s
2018-02-21 15:31:53 +00:00
left=<%= @local_ip %>
leftsubnet=<%= net['local'] %>
right=<%= @remote_ip %>
rightsubnet=<%= net['remote'] %>
2018-02-23 16:02:21 +00:00
ike=<%= @encryption %>-<%= @hash %>-<%= @dh_group %>
<%- @komma='' -%>
esp= <%- @saencryption.each do |saenc| -%> <%- @p2hash.each do |p2h| -%><%= @komma -%><%= saenc %>-<%= p2h %>-<%= @pfs_group -%> <%- @komma=',' %><%- end -%> <%- end -%>
2018-03-13 17:20:40 +00:00
auto=route
2018-02-21 15:31:53 +00:00
authby=secret
keyexchange=ikev1
2018-02-23 16:02:21 +00:00
<% end -%>