diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-12 17:12:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-12 17:12:53 -0300 |
commit | 1c9be45e18faf86aaaa5c29879514e3d29b559a1 (patch) | |
tree | cbd86a243791640faa20adad6706bd57ba3abfd9 /manifests/redirect.pp | |
download | puppet-firewall-1c9be45e18faf86aaaa5c29879514e3d29b559a1.tar.gz puppet-firewall-1c9be45e18faf86aaaa5c29879514e3d29b559a1.tar.bz2 |
Initial import
Diffstat (limited to 'manifests/redirect.pp')
-rw-r--r-- | manifests/redirect.pp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/redirect.pp b/manifests/redirect.pp new file mode 100644 index 0000000..7a9734a --- /dev/null +++ b/manifests/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, + } +} |