From c96a48b1abffd965e3b0d33ef2cf0b46c573102a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 26 Sep 2014 16:46:28 -0300 Subject: New hiera parameter firewall::external_ip (2) --- manifests/redirect.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 => '-', -- cgit v1.2.3