Wazuh Server Installation

circle-info

If we are deploying the wazuh components in different instances then we need to copy the certificates.tar file generated in the step installing indexer into all the instances to ensure the communication between the components of wazuh are encrypted.


Wazuh Server Installation

apt-get install gnupg apt-transport-https

Installation the GPG keys and the repository (NOTE : Not needed if installing in single node)

curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import && chmod 644 /usr/share/keyrings/wazuh.gpg
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
apt-get update

Installing wazuh Server :

apt-get -y install wazuh-manager=4.10.1-1

Installing Filebeat:

apt-get -y install filebeat

We will start configuring the filebeat service , Download the preconfigured Filebeat configuration file.

curl -so /etc/filebeat/filebeat.yml https://packages.wazuh.com/4.10/tpl/wazuh/filebeat/filebeat.yml

Edit the /etc/filebeat/filebeat.yml configuration file and replace the following value:

hosts: The list of Wazuh indexer nodes to connect to. You can use either IP addresses or hostnames. By default, the host is set to localhost hosts: ["127.0.0.1:9200"]. Replace it with your Wazuh indexer address accordingly.

If you have more than one Wazuh indexer node, you can separate the addresses using commas. For example, hosts: ["10.0.0.1:9200", "10.0.0.2:9200", "10.0.0.3:9200"]

 # Wazuh - Filebeat configuration file
 output.elasticsearch:
 hosts: ["192.168.146.157:9200"]
 protocol: https
 username: ${username}
 password: ${password}

Create a Filebeat keystore to securely store authentication credentials.

Add the default username and password admin:admin to the secrets keystore.

Download the alerts template for the Wazuh indexer.

Install the Wazuh module for Filebeat.

Deploying Certificates :

Configuring the Wazuh indexer connection

Save the Wazuh indexer username and password into the Wazuh manager keystore using the wazuh-keystore tool:

Edit /var/ossec/etc/ossec.conf to configure the indexer connection.

Starting the wazuh manager

Starting the filebeat service

Run the following command to verify that Filebeat is successfully installed.

The output should look like :

The server is installed successfully now we will install the wazuh dashboard to complete our single node installation.

Last updated