diff --git a/manifests/config.pp b/manifests/config.pp index 155e0c4..fa4ec66 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -2,7 +2,9 @@ $debug_level = undef, $nat_t, $opportunistic_encryption, + $dumpdir, $plutoopts = undef, + $plutostderrlog, $protostack, $virtual_private ) { diff --git a/manifests/connection.pp b/manifests/connection.pp index 92411cc..beb0e61 100644 --- a/manifests/connection.pp +++ b/manifests/connection.pp @@ -3,13 +3,17 @@ $authby = undef, $esp = undef, $ike = undef, + $forceencaps = undef, $left = undef, + $leftid = undef, $leftsubnet = undef, $leftprotoport = undef, $leftnexthop = undef, + $leftsourceip = undef, $pfs = undef, $rekey = undef, $right = undef, + $rightid = undef, $rightprotoport = undef, $rightsubnet = undef, $rightsubnetwithin = undef, diff --git a/manifests/init.pp b/manifests/init.pp index be890ef..85b8668 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,7 +2,9 @@ $debug_level = $openswan::params::debug_level, $nat_t = $openswan::params::nat_t, $opportunistic_encryption = $openswan::params::opportunistic_encryption, + $dumpdir = $openswan::params::dumpdir, $plutoopts = $openswan::params::plutoopts, + $plutostderrlog = $openswan::params::plutostderrlog, $protostack = $openswan::params::protostack, $virtual_private = $openswan::params::virtual_private ) inherits openswan::params { @@ -16,7 +18,9 @@ nat_t => $nat_t, opportunistic_encryption => $opportunistic_encryption, protostack => $protostack, + dumpdir => $dumpdir, plutoopts => $plutoopts, + plutostderrlog => $plutostderrlog, virtual_private => $virtual_private, } ~> class { 'openswan::service': } diff --git a/manifests/params.pp b/manifests/params.pp index c385037..5ae93ab 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -6,6 +6,8 @@ # Extra parameters for Pluto $plutoopts = undef + $plutostderrlog = '/var/log/pluto.log' + $dumpdir = '/var/run/pluto' # Exclude networks used on server side by adding %v4:!a.b.c.0/24 $virtual_private = '%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12' diff --git a/templates/connection.conf.erb b/templates/connection.conf.erb index b1a9e17..9d020d0 100644 --- a/templates/connection.conf.erb +++ b/templates/connection.conf.erb @@ -17,18 +17,33 @@ conn <%= @name %> <% if @ike -%> ike=<%= @ike %> <% end -%> +<% if @forceencaps -%> + forceencaps=<%= @forceencaps %> +<% end -%> <% if @left -%> left=<%= @left %> <% end -%> +<% if @leftid -%> + leftid=<%= @leftid %> +<% end -%> <% if @leftnexthop -%> leftnexthop=<%= @leftnexthop %> <% end -%> <% if @leftprotoport -%> leftprotoport=<%= @leftprotoport %> <% end -%> +<% if @leftsubnet -%> + leftsubnet =<%= @leftsubnet %> +<% end -%> +<% if @leftsourceip -%> + leftsourceip=<%= @leftsourceip %> +<% end -%> <% if @right -%> right=<%= @right %> <% end -%> +<% if @rightid -%> + rightid=<%= @rightid %> +<% end -%> <% if @rightprotoport -%> rightprotoport=<%= @rightprotoport %> <% end -%> diff --git a/templates/ipsec.conf.erb b/templates/ipsec.conf.erb index fb3a12d..5f05ed3 100644 --- a/templates/ipsec.conf.erb +++ b/templates/ipsec.conf.erb @@ -11,6 +11,8 @@ config setup <% if @plutoopts -%> plutoopts="<%= @plutoopts %>" <% end -%> + dumpdir="<%= @dumpdir %>" + plutostderrlog="<%= @plutostderrlog %>" nat_traversal=<%= @nat_t %> virtual_private=<%= @virtual_private %> oe=<%= @opportunistic_encryption %>