Clusters A & Cluster B will have the same configuration so we will cover the installation & configuration of Cluster A & we can follow the same for other clusters in the node.
This remote Wazuh cluster collects, analyzes, and stores logs from Wazuh agents within the customer A environment. It consists of a Wazuh server that collects and analyzes log data from Wazuh agents and a Wazuh indexer that stores the Wazuh alerts. It can be configured as a single-node or multi-node Wazuh cluster.
The Wazuh indexer node in cluster A trusts only the Wazuh indexer node in the CCS environment, allowing it to query its data. Alerts and log data reside in cluster A, but the CCS environment can only query the data but not store it.
Generating certificates
Note: Make sure that a copy of the root-ca.key and root-ca.pem files created during the step are in your working directory.
Download the wazuh-certs-tool.sh script and the config.yml configuration file. The wazuh-certs-tool.sh script is used to generate certificates for the cluster.
Note: Comment out or remove the Wazuh dashboard configuration since it is not in use.
Run the wazuh-certs-tool.sh script with option -A and indicate the root-ca certificate and key created earlier to create the admin, and node certificates:
bash ./wazuh-certs-tool.sh -A ./root-ca.pem ./root-ca.key
Compress all the certificate files and remove the uncompressed version to allow for easier transfer to other component nodes within cluster A:
tar -cvf ./wazuh-certificates.tar -C ./wazuh-certificates/ .
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | tee -a /etc/apt/sources.list.d/wazuh.list
sudo apt update
apt-get -y install wazuh-indexer
Edit the /etc/wazuh-indexer/opensearch.yml configuration file and replace the following values.
network.host with the IP address of the Wazuh indexer node.
node.name with the name of the Wazuh indexer node set in the config.yml file.
cluster.initial_master_nodes with the name of the Wazuh indexer node(s) in cluster A.
cluster.name with the name of the cluster. For example, ca-cluster.
plugins.security.nodes_dn with the distinguished name (DN) of the certificate for the cluster A Wazuh indexer node(s) and the CCS Wazuh indexer node. The common names (CN) will be replaced with the node names of the cluster A Wazuh indexer node and the CCS Wazuh indexer node.
Run the Wazuh indexer indexer-security-init.sh script on the Wazuh indexer node to load the new certificate information and initialize the Wazuh indexer:
curl -s https://packages.wazuh.com/4.x/filebeat/wazuh-filebeat-0.4.tar.gz | tar -xvz -C /usr/share/filebeat/module
Replace <SERVER_NODE_NAME> with the cluster A Wazuh server node name set in config.yml when creating the certificates, and move the certificates to their corresponding directories:
Edit /var/ossec/etc/ossec.conf file to configure the indexer connection by adding the Wazuh indexer IP address to the <host> section of the <indexer> block:
Run the following command to verify that Filebeat is successfully installed:
filebeat test output
## THE OUTPUT SHOULD BE
elasticsearch: https://192.168.10.101:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 192.168.10.101
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.3
dial up... OK
talk to server... OK
version: 7.10.2
Here we ve successfully configured the Cluster A , Similiarly we can configure other clusters with the same method
In the next section we will configure the basic index patterns eo enable clusters in the centralized wazuh dashboard