summaryrefslogtreecommitdiff
path: root/manifests/redirect.pp
blob: 7a9734a449ab25640c329526879b881cf2e48be5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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,
  }
}