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

36 lines
1.1 KiB
Plaintext

#
# remote $title
#
remote <%= @remote_ip %> {
exchange_mode main;
proposal {
encryption_algorithm <%= @encryption %>;
hash_algorithm <%= @hash %>;
dh_group <%= @dh_group %>;
lifetime time <%= @lifetime %> sec;
authentication_method pre_shared_key;
}
# generate_policy on;
}
<% @nets.each do |net| -%>
<%- @salifetime = net['lifetime'] ? net['lifetime'] : "3600 " %>
<%- @saencryption = net['encryption'] ? net['encryption'] : @encryption %>
<%- @pfs_group = net['pfs_group'] ? net['pfs_group'] : @dh_group %>
<%- @p2hash = net['hash'] ? net['hash'] : @hash %>
<%- @netproto = net['proto'] ? net['proto'] : 'any' -%>
sainfo address <%= net['local'] %> <%= @netproto %> address <%= net['remote'] %> <%= @netproto %>
{
pfs_group <%= @pfs_group %>;
encryption_algorithm <%= @saencryption.join(",") %>;
<%- @komma="" -%>
authentication_algorithm <%- @p2hash.each do |hmalgo| -%><%=@komma -%>hmac_<%= hmalgo -%> <%- @komma=',' -%> <%- end -%>;
compression_algorithm deflate;
lifetime time <%= @salifetime %> sec;
}
<% end -%>