blob: dee9a98ee19c4ae977f18f1e84319eff4e84bc8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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 = lookup('firewall::external_ip', undef, undef, $::ipaddress)
shorewall::rule { "ssh-redirect-1":
action => 'DNAT',
source => 'net',
destination => "fw:$ip:22",
proto => 'tcp',
destinationport => $destinationport,
ratelimit => '-',
order => $destinationport,
}
}
|