summaryrefslogtreecommitdiff
path: root/manifests/router/puppetmaster.pp
blob: 98b6cc753b694120bd62ed5eed3ea71d2d393411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
class firewall::router::puppetmaster($destination, $puppetmaster_port = '8140',
                                     $puppetmaster_nonssl_port = '8141', $zone = 'loc',
                                     $originaldest = $ipaddress) {
  shorewall::rule { 'puppetmaster-1':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:$puppetmaster_port",
    proto           => 'tcp',
    destinationport => "$puppetmaster_port",
    ratelimit       => '-',
    order           => 700,
  }

  shorewall::rule { 'puppetmaster-2':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:$puppetmaster_port",
    proto           => 'udp',
    destinationport => "$puppetmaster_port",
    ratelimit       => '-',
    order           => 701,
  }

  shorewall::rule { 'puppetmaster-3':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:$puppetmaster_port",
    proto           => 'tcp',
    destinationport => "$puppetmaster_port",
    originaldest    => "$originaldest",
    ratelimit       => '-',
    order           => 702,
  }

  shorewall::rule { 'puppetmaster-4':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:$puppetmaster_port",
    proto           => 'udp',
    destinationport => "$puppetmaster_port",
    originaldest    => "$originaldest",
    ratelimit       => '-',
    order           => 703,
  }

  shorewall::rule { 'puppetmaster-5':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:$puppetmaster_nonssl_port",
    proto           => 'tcp',
    destinationport => "$puppetmaster_nonssl_port",
    ratelimit       => '-',
    order           => 704,
  }

  shorewall::rule { 'puppetmaster-6':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:$puppetmaster_nonssl_port",
    proto           => 'udp',
    destinationport => "$puppetmaster_nonssl_port",
    ratelimit       => '-',
    order           => 705,
  }

  shorewall::rule { 'puppetmaster-7':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:$puppetmaster_nonssl_port",
    proto           => 'tcp',
    destinationport => "$puppetmaster_nonssl_port",
    originaldest    => "$originaldest",
    ratelimit       => '-',
    order           => 706,
  }

  shorewall::rule { 'puppetmaster-8':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:$puppetmaster_nonssl_port",
    proto           => 'udp',
    destinationport => "$puppetmaster_nonssl_port",
    originaldest    => "$originaldest",
    ratelimit       => '-',
    order           => 707,
  }
}