If disabling the firewall resolves the connectivity issue, it suggests that there might be additional ports or protocols required for Wazuh to function properly. In addition to UDP ports 1514 and 1515, Wazuh uses other ports and protocols for various components and functionalities. Here are some additional considerations:
Here you have a list of ports
used by Wazuh. Remember some ports use the UDP protocol and others TCP protocol.
Also you can check that the Wazuh manager and agents can communicate bidirectionally. Sometimes, firewalls may be configured to allow outgoing traffic but block incoming traffic.