Files
confdroid_ssh/manifests/firewall/iptables.pp
2026-04-09 14:56:37 +02:00

26 lines
695 B
Puppet

## confdroid_ssh::firewall::iptables.pp
# Module name: confdroid_ssh
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages firewall rules for SSH
##############################################################################
class confdroid_ssh::firewall::iptables (
) inherits confdroid_ssh::params {
case $ssh_use_firewall {
true, 'true', 'yes', '1': {
$ssh_fw_ensure = 'present'
}
default: {
$ssh_fw_ensure = 'absent'
}
}
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
ensure => $ssh_fw_ensure,
proto => 'tcp',
source => $ssh_source_range,
dport => $ssh_fw_port,
jump => 'accept',
}
}