mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Firewall Module - Allow Minions to connect to salt
This commit is contained in:
@@ -50,11 +50,28 @@ enable_reject_policy:
|
|||||||
- iptables: iptables_allow_ssh
|
- iptables: iptables_allow_ssh
|
||||||
- iptables: iptables_allow_pings
|
- iptables: iptables_allow_pings
|
||||||
|
|
||||||
|
# Delete the RETURN rule
|
||||||
|
del_return_rule:
|
||||||
|
iptables.delete:
|
||||||
|
- chain: DOCKER-USER
|
||||||
|
- jump: RETURN
|
||||||
|
|
||||||
# Rules if you are a Master
|
# Rules if you are a Master
|
||||||
{% if grains['role'] == 'so-master' %}
|
{% if grains['role'] == 'so-master' %}
|
||||||
|
|
||||||
|
# Make it so all the minions can talk to salt and update etc.
|
||||||
{% for ip in pillar.get('minions') %}
|
{% for ip in pillar.get('minions') %}
|
||||||
|
|
||||||
|
enable_salt_minions_3142_{{ip}}:
|
||||||
|
iptables.append:
|
||||||
|
- table: filter
|
||||||
|
- chain: INPUT
|
||||||
|
- jump: ACCEPT
|
||||||
|
- proto: tcp
|
||||||
|
- source: {{ ip }}
|
||||||
|
- dport: 3142
|
||||||
|
- save: True
|
||||||
|
|
||||||
enable_salt_minions_4505_{{ip}}:
|
enable_salt_minions_4505_{{ip}}:
|
||||||
iptables.append:
|
iptables.append:
|
||||||
- table: filter
|
- table: filter
|
||||||
@@ -75,6 +92,28 @@ enable_salt_minions_4506_{{ip}}:
|
|||||||
- dport: 4506
|
- dport: 4506
|
||||||
- save: True
|
- save: True
|
||||||
|
|
||||||
|
enable_salt_minions_5000_{{ip}}:
|
||||||
|
iptables.insert:
|
||||||
|
- table: filter
|
||||||
|
- chain: DOCKER-USER
|
||||||
|
- jump: ACCEPT
|
||||||
|
- proto: tcp
|
||||||
|
- source: {{ ip }}
|
||||||
|
- dport: 5000
|
||||||
|
- position: 1
|
||||||
|
- save: True
|
||||||
|
|
||||||
|
enable_salt_minions_3142_{{ip}}:
|
||||||
|
iptables.insert:
|
||||||
|
- table: filter
|
||||||
|
- chain: DOCKER-USER
|
||||||
|
- jump: ACCEPT
|
||||||
|
- proto: tcp
|
||||||
|
- source: {{ ip }}
|
||||||
|
- dport: 3142
|
||||||
|
- position: 1
|
||||||
|
- save: True
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -89,3 +128,12 @@ enable_salt_minions_4506_{{ip}}:
|
|||||||
# Rules if you are a Hot Node
|
# Rules if you are a Hot Node
|
||||||
|
|
||||||
# Rules if you are a Warm Node
|
# Rules if you are a Warm Node
|
||||||
|
|
||||||
|
# Some Fixer upper type rules
|
||||||
|
|
||||||
|
# Enable global DOCKER-USER block rule
|
||||||
|
enable_docker_user_fw_policy:
|
||||||
|
iptables.append:
|
||||||
|
- table: filter
|
||||||
|
- chain: DOCKER-USER
|
||||||
|
- jump: DROP
|
||||||
Reference in New Issue
Block a user