Skip to content

Commit

Permalink
open just allowed ports
Browse files Browse the repository at this point in the history
  • Loading branch information
mariahaider committed Aug 29, 2024
1 parent e20ff33 commit 7135fb8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions manifests/nftables/docker_expose.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,18 @@
notify => Service['nftables'],
;
}
sunet::nftables::allow { "expose-allow-${safe_name}":
from => 'any',
port => $port,
if ($allow_clients =~ Array[String, 1]) or ($allow_clients =~ String[1]) {
sunet::nftables::allow { "expose-allow-${safe_name}":
from => $allow_clients,
port => $port,
proto => $proto,
}
} else {
sunet::nftables::allow { "expose-allow-${safe_name}":
from => any,
port => $port,
proto => $proto,
}
}
}
}

0 comments on commit 7135fb8

Please sign in to comment.