From 470046dda91635004da6218baf794bf2fd076279 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Fri, 8 May 2020 11:16:26 -0400 Subject: [PATCH] Update setup for new format --- pillar/firewall/addfirewall.sh | 2 +- setup/so-functions | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pillar/firewall/addfirewall.sh b/pillar/firewall/addfirewall.sh index 9963d08db..eadb31fa2 100644 --- a/pillar/firewall/addfirewall.sh +++ b/pillar/firewall/addfirewall.sh @@ -8,6 +8,6 @@ IPADDRESS=$2 if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then echo "Firewall Rule Already There" else - echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls + echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls salt-call state.apply firewall queue=True fi diff --git a/setup/so-functions b/setup/so-functions index eaf462933..0e8c650ca 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -714,10 +714,11 @@ firewall_generate_templates() { for i in analyst beats_endpoint forward_nodes master minions osquery_endpoint search_nodes wazuh_endpoint do printf '%s\n'\ - "firewall:" - " $i:"\ - " ips:" \ - " - 127.0.0.1"\ + "firewall:"\ + " alias:"\ + " $i:"\ + " ips:" \ + " - 127.0.0.1"\ "" > "$firewall_pillar_path"/$i.sls echo "Added $i Template" done