OP#561 try new fw settings

This commit is contained in:
2026-04-09 15:00:41 +02:00
parent cf1415ceac
commit 94afeda0bb
2 changed files with 4 additions and 12 deletions

View File

@@ -6,17 +6,8 @@
class confdroid_ssh::firewall::iptables ( class confdroid_ssh::firewall::iptables (
) inherits confdroid_ssh::params { ) 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}": firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
ensure => $ssh_fw_ensure, ensure => $ssh_use_firewall,
proto => 'tcp', proto => 'tcp',
source => $ssh_source_range, source => $ssh_source_range,
dport => $ssh_fw_port, dport => $ssh_fw_port,

View File

@@ -4,7 +4,8 @@
# @summary Class contains all class parameters for confdroid_ssh # @summary Class contains all class parameters for confdroid_ssh
# @param [Array] ssh_reqpackages packages to install # @param [Array] ssh_reqpackages packages to install
# @param [String] pkg_ensure version to install: 'present' or 'latest' # @param [String] pkg_ensure version to install: 'present' or 'latest'
# @param [Boolean] ssh_use_firewall whether to manage firewall settings # @param [String] ssh_use_firewall whether set the fw rule to
# present or absent.
# @param [String] ssh_fw_port port to use for SSHD and in fw # @param [String] ssh_fw_port port to use for SSHD and in fw
# @param [String] ssh_fw_order order of firewall rule # @param [String] ssh_fw_order order of firewall rule
# @param [String] ssh_source_range source range for firewall rule # @param [String] ssh_source_range source range for firewall rule
@@ -22,7 +23,7 @@ class confdroid_ssh::params (
String $pkg_ensure = 'present', String $pkg_ensure = 'present',
# firewall settings # firewall settings
Boolean $ssh_use_firewall = true, String $ssh_use_firewall = 'present',
String $ssh_fw_port = '22', String $ssh_fw_port = '22',
String $ssh_fw_order = '50', String $ssh_fw_order = '50',
String $ssh_source_range = '0.0.0.0/0', String $ssh_source_range = '0.0.0.0/0',