The Linux machine configuration involves the following steps:
Set Up Rsyslog on Linux Host:
Install Rsyslog (if not already installed):
Configure Rsyslog to Receive Logs:
Open the rsyslog configuration file:
For TCP (recommended), add these lines:
For UDP, add these lines:
Configure Network Device to Send Logs to Rsyslog:
Ensure the network device is configured to send logs via Syslog to the IP address of your Linux host running rsyslog on port 514.
Configure Rsyslog to Forward Logs to a File:
In the /etc/rsyslog.conf file, add
Replace REMOTE_DEVICE_IP with the IP or network of your network devices and <file_name.log> with your desired log file name.
Deploy Wazuh Agent on the Same Device:
Install Wazuh Agent: Follow the Wazuh installation guide for your Linux distribution to install the agent.
Configure Wazuh Agent to Read the Log File:
Edit the Wazuh agent configuration file:
Add the following within the <localfile> tag:
Replace <file_name.log> with the log file name you specified earlier.
Restart Services:
However,, if you want to configure the remote syslog at the Wazuh Manager and receive the logs directly there, you need to follow this guide to configure it before sending the logs to the Wazuh Manager: Wazuh documenation for reference.
The Wazuh server can collect logs via syslog from endpoints. Add the following configuration in between the <ossec_config> tags of the Wazuh server /var/ossec/etc/ossec.conf file to listen for syslog messages on TCP port 514.
<remote>
<connection>syslog</connection>
<port>514</port>
<protocol>tcp</protocol>
<allowed-ips>192.168.2.15/24</allowed-ips>
<local_ip>192.168.2.10</local_ip>
</remote>
Please refer to the wazuh documentations for more reference:
https://wazuh.com/blog/how-to-configure-rsyslog-client-to-send-events-to-wazuh/
https://documentation.wazuh.com/current/user-manual/capabilities/log-data-collection/syslog.html
I hope this information helps you. Please feel free to reach out to us for any information/issues.
Regards,