From fc200fa2135f7bbc86564f17f476df6257affcf0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 13 Sep 2011 22:16:00 -0300 Subject: Adding shorewall::tunnel --- manifests/base.pp | 1 + manifests/init.pp | 2 ++ manifests/tunnel.pp | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100644 manifests/tunnel.pp (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index 53600e7..be3b1f6 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -46,6 +46,7 @@ class shorewall::base { File["/var/lib/puppet/modules/shorewall/tcdevices"], File["/var/lib/puppet/modules/shorewall/tcrules"], File["/var/lib/puppet/modules/shorewall/tcclasses"], + File["/var/lib/puppet/modules/shorewall/tunnel"], ], require => Package[shorewall], } diff --git a/manifests/init.pp b/manifests/init.pp index f69a6f2..57dbeac 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -71,5 +71,7 @@ class shorewall { shorewall::managed_file { tcrules: } # See http://www.shorewall.net/3.0/traffic_shaping.htm shorewall::managed_file { tcclasses: } + # See http://www.shorewall.net/manpages/shorewall-tunnels.html + shorewall::managed_file { tunnel: } } diff --git a/manifests/tunnel.pp b/manifests/tunnel.pp new file mode 100644 index 0000000..e0c71e7 --- /dev/null +++ b/manifests/tunnel.pp @@ -0,0 +1,11 @@ +define shorewall::tunnel( + $tunnel_type, + $zone, + $gateway = '0.0.0.0/0', + $gateway_zones = '', + $order = '1' +) { + shorewall::entry { "tunnel.d/${order}-${title}": + line => "# ${name}\n${tunnel_type} ${zone} ${gateway} ${gateway_zones}", + } +} -- cgit v1.2.3