Hi,
In this case, you don’t have to change the “secure” block but add a new one for syslog. It would be something like the following:
<remote>
<connection>secure</connection>
<port>1514</port>
<protocol>tcp</protocol>
<queue_size>131072</queue_size>
</remote>
<remote>
<connection>syslog</connection>
<port>513</port>
<protocol>tcp</protocol>
<allowed-ips>192.168.2.0/24</allowed-ips>
</remote>
Note: The values of these fields may not match your use case, this is only an example.
After applying this configuration and restarting the wazuh-manager service (systemctl restart wazuh-manager), your manager should receive logs via remote syslog. You can check that the manager is listening on the port indicated for remote syslog with (in my case for port 513/TCP)
root@manager:/home/vagrant# netstat -tunap | grep wazuh
tcp 0 0 0.0.0.0:513 0.0.0.0:* LISTEN 2641/wazuh-remoted
tcp 0 0 0.0.0.0:1514 0.0.0.0:* LISTEN 2640/wazuh-remoted
tcp 0 0 0.0.0.0:1515 0.0.0.0:* LISTEN 2533/wazuh-authd
In this case, the wazuh-manager listens on 3 different ports:
To verify that the manager is receiving the events, then you will have to enable event logging in the wazuh-manager by editing the following in the /var/ossec/etc/ossec.conf file of the wazuh-manager:
<logall>no</logall>
to
<logall>yes</logall>
and then, restart the wazuh-manager
systemctl restart wazuh-manager
From now on, every event received by the manager will be logged in the /var/ossec/logs/archives/archives.log file.
You can check if your wazuh-manager is receiving any specific event, filtering by IP, or whatever you want.
grep <IP or string identifier> /var/ossec/logs/archives/archives.log
Note: Remember to disable the
logalloption in theossec.conffile (and restart the wazuh-manager to apply the changes) when you no longer need it, to avoid unnecessary disk usage.
Once you have verified that the manager is receiving the events sent with remote syslog, then you will have to check if there are decoders and rules for the logs you want (necessary to be able to generate alerts if needed).
Below are links to documentation that may be of interest to you.
<remote> configuration block: https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/remote.htmlBest regards.