aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-08-11 13:03:10 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-08-11 13:03:10 -0300
commit72fe400c908702509aa86f4ed918508f3421e088 (patch)
tree676a7fd3e0394e3f95f7559f4fdf6c9fcd69cb95 /manifests/subsystems
parentbbda50998b35a5941a56c08af0a15935c624e99f (diff)
downloadpuppet-nodo-72fe400c908702509aa86f4ed918508f3421e088.tar.gz
puppet-nodo-72fe400c908702509aa86f4ed918508f3421e088.tar.bz2
Rollback for http and https rules
Diffstat (limited to 'manifests/subsystems')
-rw-r--r--manifests/subsystems/firewall.pp32
1 files changed, 27 insertions, 5 deletions
diff --git a/manifests/subsystems/firewall.pp b/manifests/subsystems/firewall.pp
index 58d0102..849d016 100644
--- a/manifests/subsystems/firewall.pp
+++ b/manifests/subsystems/firewall.pp
@@ -355,28 +355,50 @@ class firewall::torrent {
}
}
-class firewall::router::http($destination, $zone = 'vm', $routeback = false, $iface = 'eth1') {
- shorewall::rule { 'http-route':
+class firewall::router::http($destination, $zone = 'vm') {
+ 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 = 'vm') {
- 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', $puppetmaster_nonssl_port = '8141', $zone = 'fw') {