From d1013475b2f21ea80a9f8bdb87e43f13bc275204 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 5 Apr 2013 15:38:08 -0300 Subject: Adding basic NAS class --- manifests/subsystems/firewall/redirect.pp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 manifests/subsystems/firewall/redirect.pp (limited to 'manifests/subsystems/firewall/redirect.pp') diff --git a/manifests/subsystems/firewall/redirect.pp b/manifests/subsystems/firewall/redirect.pp new file mode 100644 index 0000000..7a9734a --- /dev/null +++ b/manifests/subsystems/firewall/redirect.pp @@ -0,0 +1,14 @@ +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. + shorewall::rule { "ssh-redirect-1": + action => 'DNAT', + source => 'net', + destination => "fw:$ipaddress:22", + proto => 'tcp', + destinationport => $destinationport, + ratelimit => '-', + order => $destinationport, + } +} -- cgit v1.2.3