OP#561 try new fw settings
This commit is contained in:
@@ -6,22 +6,20 @@
|
|||||||
class confdroid_ssh::firewall::iptables (
|
class confdroid_ssh::firewall::iptables (
|
||||||
|
|
||||||
) inherits confdroid_ssh::params {
|
) inherits confdroid_ssh::params {
|
||||||
if $ssh_use_firewall == true {
|
case $ssh_use_firewall {
|
||||||
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
|
true, 'true', 'yes', '1': {
|
||||||
ensure => 'present',
|
$ssh_fw_ensure = 'present'
|
||||||
proto => 'tcp',
|
}
|
||||||
source => $ssh_source_range,
|
default: {
|
||||||
dport => $ssh_fw_port,
|
$ssh_fw_ensure = 'absent'
|
||||||
jump => 'accept',
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $ssh_use_firewall == false {
|
|
||||||
firewall { "${ssh_fw_order}${ssh_fw_port} remove SSH on port ${ssh_fw_port}":
|
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
|
||||||
ensure => 'absent',
|
ensure => $ssh_fw_ensure,
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
source => $ssh_source_range,
|
source => $ssh_source_range,
|
||||||
dport => $ssh_fw_port,
|
dport => $ssh_fw_port,
|
||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user