mqtt: open local firewall for any clients

This commit is contained in:
Patrik Lundin 2024-11-04 11:52:31 +01:00
parent 9cee243af6
commit a71a8f5639
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -1,7 +1,7 @@
# Configure a SUNET CDN mqtt server
class cdn::mqtt(
String $dc = '',
Array[String] $clients = [],
Array[String] $mqtt_client_ips = [],
Hash[String, Hash] $bridges = {},
Hash[String, String] $acme_url = {
test => 'https://internal-sto3-test-ca-1.cdn.sunet.se:9000/acme/acme/directory'
@ -35,6 +35,14 @@ class cdn::mqtt(
proto => 'tcp',
}
$mqtt_client_ips.each | String $mqtt_client_ip | {
sunet::nftables::allow { "allow-acme-client-${mqtt_client_ip}":
from => $mqtt_client_ip,
port => 8883,
proto => 'tcp',
}
}
# From https://wiki.sunet.se/display/sunetops/Platform+naming+standards
$my_fqdn = $facts['networking']['fqdn']
$dot_split = split($my_fqdn, '[.]')