init.pp 2.18 KB
Newer Older
mh's avatar
mh committed
1
# Manage shorewall on your system
mh's avatar
mh committed
2
class shorewall(
3
  $startup                    = '1',
4
  $conf_source                = false,
5 6 7 8 9 10 11
  $ensure_version             = 'present',
  $tor_transparent_proxy_host = '127.0.0.1',
  $tor_transparent_proxy_port = '9040',
  $tor_user                   = $::operatingsystem ? {
    'Debian' => 'debian-tor',
    default  => 'tor'
  }
mh's avatar
mh committed
12
) {
13

mh's avatar
mh committed
14
  case $::operatingsystem {
mh's avatar
mh committed
15
    gentoo: { include shorewall::gentoo }
mh's avatar
mh committed
16
    debian,ubuntu: {
17
    centos: { include shorewall::centos }
mh's avatar
mh committed
18
    default: {
19
      notice "unknown operatingsystem: ${::operatingsystem}"
20
      include shorewall::base
mh's avatar
mh committed
21 22 23
    }
  }

mh's avatar
mh committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  shorewall::managed_file{
    [
      # See http://www.shorewall.net/3.0/Documentation.htm#Zones
      'zones',
      # See http://www.shorewall.net/3.0/Documentation.htm#Interfaces
      'interfaces',
      # See http://www.shorewall.net/3.0/Documentation.htm#Hosts
      'hosts',
      # See http://www.shorewall.net/3.0/Documentation.htm#Policy
      'policy',
      # See http://www.shorewall.net/3.0/Documentation.htm#Rules
      'rules',
      # See http://www.shorewall.net/3.0/Documentation.htm#Masq
      'masq',
      # See http://www.shorewall.net/3.0/Documentation.htm#ProxyArp
      'proxyarp',
      # See http://www.shorewall.net/3.0/Documentation.htm#NAT
      'nat',
      # See http://www.shorewall.net/3.0/Documentation.htm#Blacklist
      'blacklist',
      # See http://www.shorewall.net/3.0/Documentation.htm#rfc1918
      'rfc1918',
      # See http://www.shorewall.net/3.0/Documentation.htm#Routestopped
      'routestopped',
      # See http://www.shorewall.net/3.0/Documentation.htm#Variables
      'params',
      # See http://www.shorewall.net/3.0/traffic_shaping.htm
      'tcdevices',
      # See http://www.shorewall.net/3.0/traffic_shaping.htm
      'tcrules',
      # See http://www.shorewall.net/3.0/traffic_shaping.htm
      'tcclasses',
      # http://www.shorewall.net/manpages/shorewall-providers.html
      'providers',
      # See http://www.shorewall.net/manpages/shorewall-tunnels.html
      'tunnel',
      # See http://www.shorewall.net/MultiISP.html
      'rtrules',
62 63
      # See http://www.shorewall.net/manpages/shorewall-mangle.html
      'mangle',
mh's avatar
mh committed
64 65
    ]:;
  }
66
}