Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
immerda
Puppet Modules
firewall
Commits
8d001067
Commit
8d001067
authored
Dec 09, 2020
by
mh
Browse files
add dispatch class for ibackup
parent
9aa89dbc
Changes
1
Show whitespace changes
Inline
Side-by-side
manifests/rules/out/ibackup.pp
0 → 100644
View file @
8d001067
# manage firewall for outgoing ssh
class
firewall::rules::out::ibackup
(
Array
[
Stdlib
::
IP
::
Address
::
Nosubnet
]
$backup_hosts
,
){
include
firewall
if
$firewall::use_nftables
{
$backup_hosts
.
each
|
$index
,
$ip
|
{
if
$ip
=~
Stdlib
::
IP
::
Address
::
V4
::
Nosubnet
{
$dest
=
"ip daddr
${ip}
"
}
else
{
$dest
=
"ip6 daddr
${ip}
"
}
nftables::rule
{
"default_out-ssh_ibackup-
${index}
"
:
content
=>
"
${dest}
tcp dport 22 accept"
,
}
}
}
else
{
class
{
'shorewall::rules::out::ibackup'
:
backup_hosts
=>
$backup_hosts
,
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment