Category: SIEM / Infrastructure / HardeningApplies to: SOCFortress SIEM stack deployments (CoPilot, Wazuh 4.14.x, Wazuh Indexer, Graylog, Grafana, Velociraptor, Portainer, HAProxy, Talon, SOCFortress UBA) on Debian/Ubuntu VMsAudience: Customer IT / Security teams hardening the stack VMs
SOCFortress deploys and configures the SIEM software. OS-level hardening of the VMs (host firewalls, sudo policy, CIS baselines) is yours to apply. You are welcome to apply it, and this article is here to keep that from taking the stack down.
Most firewall outages on the stack come from one of three things:
The port numbers below are the defaults we deploy. Your environment may differ, so always confirm with the listening-port check in step 1 before writing rules.
Run this on every stack VM and keep the output. It is the source of truth for your inbound rules.
sudo ss -tlnpu
Anything listening on 127.0.0.1 or ::1 is local only and needs no firewall rule. Focus on services bound to 0.0.0.0, ::, or the VM's LAN IP.
127.0.0.1
::1
0.0.0.0
::
MongoDB (27017) on the Graylog host should only listen locally. If it is bound to a LAN IP, do not open it to anything beyond Graylog.
If you only filter inbound, skip this section. If you plan default-deny egress, every destination below needs an allow rule. Missing ones fail quietly: updates stop, feeds go stale, integrations stop ingesting.
These are polled from the CoPilot / Graylog / Wazuh hosts, depending on the integration. Examples:
.sentinelone.net
If an integration is not listed, check the vendor's API documentation or ask support.
Most stack VMs run containers (CoPilot, per-customer Wazuh workers, Portainer). Docker writes its own iptables/nftables rules for container networking and published ports. Two things to know:
/etc/nftables.conf
flush ruleset
``` #!/usr/sbin/nft -f table inet filter flush table inet filter
table inet filter { chain input { type filter hook input priority 0; policy drop; ct state established,related accept iif lo accept # your allow rules here } } ```
The same caution applies to firewall-cmd --reload on firewalld systems.
firewall-cmd --reload
DOCKER-USER
bash # Example: only allow the external proxy (172.21.0.10) to reach worker ports sudo iptables -I DOCKER-USER -p tcp -m conntrack --ctorigdstport 20000:21000 ! -s 172.21.0.10 -j DROP
Replace the IP with your proxy's address, and persist the rule with your normal tooling.
If container networking drops after a firewall change, the quickest recovery is:
sudo systemctl restart docker
Arm an automatic rollback before you apply rules on each host. If you lose access or the stack goes quiet, the rules remove themselves:
# Requires the 'at' package echo "nft delete table inet filter" | sudo at now + 10 minutes sudo nft -f /etc/nftables.conf
Run the self-test below. If everything passes, cancel the rollback:
sudo atq # find the job number sudo atrm <job>
On the host you just changed:
# Services still listening sudo ss -tlnpu # Containers healthy (Docker hosts) sudo docker ps --format 'table {{.Names}}\t{{.Status}}'
From the other components, test reachability to the changed host:
nc -zv <host> <port>
Component checks:
# Wazuh master: cluster nodes connected sudo /var/ossec/bin/cluster_control -l # Wazuh master: agents active sudo /var/ossec/bin/agent_control -l | grep -c Active # Indexer: cluster health green/yellow, all nodes present curl -sk -u admin https://localhost:9200/_cluster/health?pretty # Outbound (if egress is filtered) curl -sI https://packages.wazuh.com | head -1 curl -sI https://ghcr.io | head -1
Then confirm in the UIs:
Provisioning is easy to miss because it only runs when you onboard a new customer. Blocking 5003 won't affect anything day to day, but the next customer you provision in CoPilot will fail. Test it from the CoPilot host:
nc -zv <wazuh-worker-host> 5003 nc -zv <external-proxy> 5003
If any check fails, let the timed rollback fire (or remove the table yourself), then open a support case with your ss -tlnpu output and the ruleset you applied.
ss -tlnpu
Requiring a password for sudo does not affect the stack services. Make sure the SOCFortress support account has a password shared with us through OneHub so support access is not lost.
Was this article helpfu?
Thank you for voting
You are related to multiple companies. Please select the company you wish to login as.