blob: 88b4102c18c18b3d56ee2370f0550d7a4070cce0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
class site_shorewall::sshd {
$ssh_config = hiera('ssh')
$ssh_port = $ssh_config['port']
include shorewall
# define macro for incoming sshd
file { '/etc/shorewall/macro.leap_sshd':
content => "PARAM - - tcp $ssh_port",
notify => Service['shorewall'],
require => Package['shorewall']
}
shorewall::rule {
# outside to server
'net2fw-ssh':
source => 'net',
destination => '$FW',
action => 'leap_sshd(ACCEPT)',
order => 200;
}
# setup a routestopped rule to allow ssh when shorewall is stopped
shorewall::routestopped { $site_config::params::interface:
options => "- tcp ${ssh_port}"
}
}
|