OP#561 add source range

This commit is contained in:
2026-04-05 15:26:08 +02:00
parent 52c1bcc747
commit 9729f09388
2 changed files with 4 additions and 1 deletions

View File

@@ -9,9 +9,10 @@ class confdroid_ssh::firewall::iptables (
if $ssh_use_firewall {
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
ensure => 'present',
jump => 'accept',
proto => 'tcp',
source => $ssh_source_range,
dport => $ssh_fw_port,
jump => 'accept',
}
}
}

View File

@@ -7,6 +7,7 @@
# @param [Boolean] ssh_use_firewall whether to manage firewall settings
# @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_source_range source range for firewall rule
##############################################################################
class confdroid_ssh::params (
@@ -17,6 +18,7 @@ class confdroid_ssh::params (
Boolean $ssh_use_firewall = true,
String $ssh_fw_port = '22',
String $ssh_fw_order = '50',
String $ssh_source_range = '0.0.0.0/0',
) {
# default facts