summaryrefslogtreecommitdiff
path: root/manifests/vm/puppetmaster.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-11 21:43:49 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-11 21:43:49 -0300
commit279c52185ec96cd1f8b0c25a1a14b0e537c1c11a (patch)
tree58a7c463029738804df3650e33ada7ed814b728d /manifests/vm/puppetmaster.pp
parent303e2cfcb14fb9dcec2fcda13608389f84bfb307 (diff)
downloadpuppet-firewall-279c52185ec96cd1f8b0c25a1a14b0e537c1c11a.tar.gz
puppet-firewall-279c52185ec96cd1f8b0c25a1a14b0e537c1c11a.tar.bz2
Split and rename
Diffstat (limited to 'manifests/vm/puppetmaster.pp')
-rw-r--r--manifests/vm/puppetmaster.pp85
1 files changed, 85 insertions, 0 deletions
diff --git a/manifests/vm/puppetmaster.pp b/manifests/vm/puppetmaster.pp
new file mode 100644
index 0000000..a097d77
--- /dev/null
+++ b/manifests/vm/puppetmaster.pp
@@ -0,0 +1,85 @@
+class firewall::vm::puppetmaster($destination, $puppetmaster_port = '8140', $puppetmaster_nonssl_port = '8141', $zone = 'fw') {
+ shorewall::rule { 'puppetmaster-1':
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:$puppetmaster_port",
+ proto => 'tcp',
+ destinationport => "$puppetmaster_port",
+ ratelimit => hiera("firewall::ssl_ratelimit", '-'),
+ order => 700,
+ }
+
+ shorewall::rule { 'puppetmaster-2':
+ action => 'DNAT',
+ source => 'net',
+ destination => "$zone:$destination:$puppetmaster_port",
+ proto => 'udp',
+ destinationport => "$puppetmaster_port",
+ ratelimit => hiera("firewall::ssl_ratelimit", '-'),
+ order => 701,
+ }
+
+ shorewall::rule { 'puppetmaster-3':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:$puppetmaster_port",
+ proto => 'tcp',
+ destinationport => "$puppetmaster_port",
+ originaldest => hiera('firewall::external_ip', $::ipaddress),
+ ratelimit => hiera("firewall::ssl_ratelimit", '-'),
+ order => 702,
+ }
+
+ shorewall::rule { 'puppetmaster-4':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:$puppetmaster_port",
+ proto => 'udp',
+ destinationport => "$puppetmaster_port",
+ originaldest => hiera('firewall::external_ip', $::ipaddress),
+ ratelimit => hiera("firewall::ssl_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 => hiera('firewall::external_ip', $::ipaddress),
+ ratelimit => '-',
+ order => 706,
+ }
+
+ shorewall::rule { 'puppetmaster-8':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "$zone:$destination:$puppetmaster_nonssl_port",
+ proto => 'udp',
+ destinationport => "$puppetmaster_nonssl_port",
+ originaldest => hiera('firewall::external_ip', $::ipaddress),
+ ratelimit => '-',
+ order => 707,
+ }
+}