summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-09-26 16:46:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-09-26 16:46:28 -0300
commitc96a48b1abffd965e3b0d33ef2cf0b46c573102a (patch)
tree5830acfbd6c3629c7b3c5521cd07aebc5aa8a5e2
parent2f9efd957302ba3554bda594660ca7a4d87b5178 (diff)
downloadpuppet-firewall-c96a48b1abffd965e3b0d33ef2cf0b46c573102a.tar.gz
puppet-firewall-c96a48b1abffd965e3b0d33ef2cf0b46c573102a.tar.bz2
New hiera parameter firewall::external_ip (2)
-rw-r--r--manifests/redirect.pp4
1 files changed, 3 insertions, 1 deletions
diff --git a/manifests/redirect.pp b/manifests/redirect.pp
index 7a9734a..d3785a1 100644
--- a/manifests/redirect.pp
+++ b/manifests/redirect.pp
@@ -2,10 +2,12 @@ class firewall::redirect::ssh($destinationport) {
# When the box is in an internal network and we want to provide
# and external access through a shared real IP, we have to
# redirect requests coming from another port to port 22.
+ $ip = hiera('firewall::external_ip', $::ipaddress)
+
shorewall::rule { "ssh-redirect-1":
action => 'DNAT',
source => 'net',
- destination => "fw:$ipaddress:22",
+ destination => "fw:$ip:22",
proto => 'tcp',
destinationport => $destinationport,
ratelimit => '-',