From: Silvio Rhatto Date: Fri, 26 Sep 2014 19:46:28 +0000 (-0300) Subject: New hiera parameter firewall::external_ip (2) X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c96a48b1abffd965e3b0d33ef2cf0b46c573102a;p=puppet-firewall.git New hiera parameter firewall::external_ip (2) --- 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 => '-',