mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
Check for port availability for Wazuh and Strelka
This commit is contained in:
@@ -92,6 +92,11 @@ strelkaunprocessed:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
|
# Check to see if Strelka frontend port is available
|
||||||
|
strelkaportavailable:
|
||||||
|
cmd.run:
|
||||||
|
- name: netstat -utanp | grep ":57314" | grep -qv docker && PROCESS=$(netstat -utanp | grep ":57314" | uniq) && echo "Another process ($PROCESS) appears to be using port 57314. Please terminate this process, or reboot to ensure a clean state so that Strelka can start properly." && exit 1 || exit 0
|
||||||
|
|
||||||
strelka_coordinator:
|
strelka_coordinator:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-redis:{{ VERSION }}
|
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-redis:{{ VERSION }}
|
||||||
|
|||||||
@@ -94,15 +94,10 @@ wazuhmgrwhitelist:
|
|||||||
- mode: 755
|
- mode: 755
|
||||||
- template: jinja
|
- template: jinja
|
||||||
|
|
||||||
# Reserve OS port for Wazuh API
|
|
||||||
wazuhreserveport:
|
|
||||||
cmd.run:
|
|
||||||
- name: grep -q 55000 /proc/sys/net/ipv4/ip_local_reserved_ports || sysctl -w net.ipv4.ip_local_reserved_ports="55000" > /dev/null && echo "55000" >> /proc/sys/net/ipv4/ip_local_reserved_ports
|
|
||||||
|
|
||||||
# Check to see if Wazuh API port is available
|
# Check to see if Wazuh API port is available
|
||||||
wazuhportavailable:
|
wazuhportavailable:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: netstat -anp | grep 55000 | grep -qv docker && PROCESS=$(netstat -anp | grep 55000 | awk '{print $NF}' | uniq) && echo "Another process ($PROCESS) appears to be using port 55000. Please terminate this process, or reboot to ensure a clean state so that the Wazuh API can start properly." && exit 1 || exit 0
|
-name: netstat -utanp | grep ":55000" | grep -qv docker && PROCESS=$(netstat -utanp | grep ":55000" | uniq) && echo "Another process ($PROCESS) appears to be using port 55000. Please terminate this process, or reboot to ensure a clean state so that the Wazuh API can start properly." && exit 1 || exit 0
|
||||||
|
|
||||||
so-wazuh:
|
so-wazuh:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
|
|||||||
Reference in New Issue
Block a user