init.pp 2.55 KB
Newer Older
mh's avatar
mh committed
1
class shorewall(
2
  $startup                    = '1',
3
  $conf_source                = false,
4 5 6 7 8 9 10
  $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
11
) {
12

mh's avatar
mh committed
13
  case $::operatingsystem {
mh's avatar
mh committed
14
    gentoo: { include shorewall::gentoo }
15 16 17 18
    debian: {
      include shorewall::debian
      $dist_tor_user = 'debian-tor'
    }
19
    centos: { include shorewall::centos }
mh's avatar
mh committed
20
    ubuntu: {
mh's avatar
mh committed
21
    case $::lsbdistcodename {
mh's avatar
mh committed
22 23 24
      karmic: { include shorewall::ubuntu::karmic }
      default: { include shorewall::debian }
      }
25
    }
mh's avatar
mh committed
26
    default: {
27
      notice "unknown operatingsystem: ${::operatingsystem}"
28
      include shorewall::base
mh's avatar
mh committed
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
    }
  }

  # See http://www.shorewall.net/3.0/Documentation.htm#Zones
  shorewall::managed_file{ zones: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Interfaces
  shorewall::managed_file{ interfaces: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Hosts
  shorewall::managed_file { hosts: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Policy
  shorewall::managed_file { policy: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Rules
  shorewall::managed_file { rules: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Masq
  shorewall::managed_file{ masq: }
  # See http://www.shorewall.net/3.0/Documentation.htm#ProxyArp
  shorewall::managed_file { proxyarp: }
  # See http://www.shorewall.net/3.0/Documentation.htm#NAT
  shorewall::managed_file { nat: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Blacklist
  shorewall::managed_file { blacklist: }
  # See http://www.shorewall.net/3.0/Documentation.htm#rfc1918
  shorewall::managed_file { rfc1918: }
  # See http://www.shorewall.net/3.0/Documentation.htm#Routestopped
  shorewall::managed_file { routestopped: }
mh's avatar
mh committed
54
  # See http://www.shorewall.net/3.0/Documentation.htm#Variables
mh's avatar
mh committed
55
  shorewall::managed_file { params: }
56
  # See http://www.shorewall.net/3.0/traffic_shaping.htm
57
  shorewall::managed_file { tcdevices: }
58
  # See http://www.shorewall.net/3.0/traffic_shaping.htm
59
  shorewall::managed_file { tcrules: }
60
  # See http://www.shorewall.net/3.0/traffic_shaping.htm
61
  shorewall::managed_file { tcclasses: }
62 63
  # http://www.shorewall.net/manpages/shorewall-providers.html
  shorewall::managed_file { providers: }
Silvio Rhatto's avatar
Silvio Rhatto committed
64 65
  # See http://www.shorewall.net/manpages/shorewall-tunnels.html
  shorewall::managed_file { tunnel: }
mh's avatar
mh committed
66
  # See http://www.shorewall.net/MultiISP.html
varac's avatar
varac committed
67
  shorewall::managed_file { rtrules: }
68

69
}