aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/firewall
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-08-15 22:03:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-08-15 22:03:41 -0300
commit48a3a401dbd69028db1934e3a5bbec8296ce47bd (patch)
tree16b87fd6f015a28e2d0b9b8443d986ba26a94b4d /manifests/subsystems/firewall
parent63107350f80195ecef2746c105fce5e97bb4119f (diff)
downloadpuppet-nodo-48a3a401dbd69028db1934e3a5bbec8296ce47bd.tar.gz
puppet-nodo-48a3a401dbd69028db1934e3a5bbec8296ce47bd.tar.bz2
Changing rules for firewall::router::http and firewall::router::https
Diffstat (limited to 'manifests/subsystems/firewall')
-rw-r--r--manifests/subsystems/firewall/router.pp30
1 files changed, 26 insertions, 4 deletions
diff --git a/manifests/subsystems/firewall/router.pp b/manifests/subsystems/firewall/router.pp
index 7dbd2f5..814aa66 100644
--- a/manifests/subsystems/firewall/router.pp
+++ b/manifests/subsystems/firewall/router.pp
@@ -1,25 +1,47 @@
class firewall::router::http($destination, $zone = 'loc') {
- shorewall::rule { 'http-route':
+ shorewall::rule { 'http-route-1':
action => 'DNAT',
- source => 'all',
+ source => 'net',
destination => "$zone:$destination:80",
proto => 'tcp',
destinationport => '80',
ratelimit => '-',
order => '600',
}
+
+ shorewall::rule { 'http-route-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "fw:$destination:80",
+ proto => 'tcp',
+ destinationport => '80',
+ originaldest => "$ipaddress",
+ ratelimit => '-',
+ order => '601',
+ }
}
class firewall::router::https($destination, $zone = 'loc') {
- shorewall::rule { 'https-route':
+ shorewall::rule { 'https-route-1':
action => 'DNAT',
- source => 'all',
+ source => 'net',
destination => "$zone:$destination:443",
proto => 'tcp',
destinationport => '443',
ratelimit => '-',
order => '602',
}
+
+ shorewall::rule { 'https-route-2':
+ action => 'DNAT',
+ source => '$FW',
+ destination => "fw:$destination:443",
+ proto => 'tcp',
+ destinationport => '443',
+ originaldest => "$ipaddress",
+ ratelimit => '-',
+ order => '602',
+ }
}
class firewall::router::puppetmaster($destination, $puppetmaster_port = '8140',