Commit 2f388687 authored by mh's avatar mh

Merge remote-tracking branch 'sarava/master'

Conflicts:
	manifests/base.pp
	manifests/init.pp
parents 5e555243 c566c907
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
#
# Shorewall version 4 - Tunnels File
#
# For information about entries in this file, type "man shorewall-tunnels"
#
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall-tunnels.html
#
###############################################################################
#TYPE ZONE GATEWAY GATEWAY
# ZONE
class shorewall::base {
package { 'shorewall':
ensure => $shorewall_ensure_version,
ensure => $shorewall::ensure_version,
}
# This file has to be managed in place, so shorewall can find it
......
class shorewall(
$startup = '1'
$startup = '1',
$ensure_version = 'present',
$tor_transparent_proxy_host = '127.0.0.1',
$tor_transparent_proxy_port = '9040',
$tor_user = $::operatingsystem ? {
'Debian' => 'debian-tor',
default => 'tor'
}
) {
case $::operatingsystem {
......@@ -21,19 +28,6 @@ class shorewall(
}
}
case $tor_transparent_proxy_host {
'': { $tor_transparent_proxy_host = '127.0.0.1' }
}
case $tor_transparent_proxy_port {
'': { $tor_transparent_proxy_port = '9040' }
}
if $tor_user == '' {
$tor_user = $dist_tor_user ? {
'' => 'tor',
default => $dist_tor_user,
}
}
# See http://www.shorewall.net/3.0/Documentation.htm#Zones
shorewall::managed_file{ zones: }
# See http://www.shorewall.net/3.0/Documentation.htm#Interfaces
......@@ -66,4 +60,7 @@ class shorewall(
shorewall::managed_file { tcclasses: }
# http://www.shorewall.net/manpages/shorewall-providers.html
shorewall::managed_file { providers: }
# See http://www.shorewall.net/manpages/shorewall-tunnels.html
shorewall::managed_file { tunnel: }
}
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}",
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment