IDH - Finalize Firewall config

This commit is contained in:
Josh Brower
2022-02-18 13:23:48 -05:00
parent f995d0768f
commit 0362afb260
3 changed files with 19 additions and 11 deletions

View File

@@ -662,7 +662,7 @@ role:
- {{ portgroups.ssh }}
{% set idh_services = salt['pillar.get']('idh:services', []) %}
{% for service in idh_services %}
- {{ portgroups.service }}
- {{ portgroups['idh_'~service] }}
{% endfor %}
dockernet:
portgroups:

View File

@@ -1,3 +1,8 @@
{% if grains.role == 'so-idh' %}
{% from 'idh/opencanary_config.map.jinja' import OPENCANARYCONFIG %}
{% set idh_services = salt['pillar.get']('idh:services', []) %}
{% endif %}
firewall:
aliases:
ports:
@@ -48,15 +53,6 @@ firewall:
fleet_webui:
tcp:
- 443
ftp:
tcp:
- 21
git:
tcp:
- 9418
http:
tcp:
- 80
influxdb:
tcp:
- 8086
@@ -115,3 +111,11 @@ firewall:
yum:
tcp:
- 443
{% if idh_services is defined %}
{% for service in idh_services %}
idh_{{service}}:
tcp:
- {{ OPENCANARYCONFIG[service~'.port'] }}
{% endfor %}
{% endif %}