Hello Suresh,
Sorry for the late response.
- So, the wazuh server requires constant internet connection, so when the CVE database updates it will get reflected into my server right? Yes, the Wazuh server needs internet access to download vulnerability updates and the updates will be downloaded to the Wazuh server.
Are there any specific sites or ports I need to allow into my server or is it better to keep open for all internet connections?Currently I blocked internet connection to the server via firewall, only I allowed SMTP. Because the whole point of installing wazuh is for safety, I am asking this question. Currently my server is in Ubuntu 22 version. Please help me, to keep the best practice. I am ready to provide more details if needed.
- If you have concerns with regards to giving open internet access to your Wazuh server, you can make use of the offline updater which keeps your vulnerability feeds updated. The steps involve downloading the specific vulnerability files and configuring the Wazuh server to locate them. You can find the feeds in custom location compressed in gz or bzip2 or decompressed in XML or JSON, depending on the original format of the feed. The configurations are all set in the Wazuh server /var/ossec/etc/ossec.conf file.
For example, to perform an offline update of the Windows MSU, you must get the feed from
msu-updates.json.gz and place it in a user-defined repository.
<provider name="msu">
<enabled>yes</enabled>
<url>http://local_repo/msu-updates.json.gz</url>
<update_interval>1h</update_interval>
</provider>
If you want to update locally, set the path of the downloaded files using a POSIX regular expression, for example:
<provider name="msu">
<enabled>yes</enabled>
<path>/local_path/msu-updates\.json\.gz$</path>
<update_interval>1h</update_interval>
</provider>Also note that after making a change in the
/var/ossec/etc/ossec.conf file, you have to restart the Wazuh manager service for the change to take effect with command
systemctl restart wazuh-manager.
You can also check the below link on how you can configure the
/var/ossec/etc/ossec.conf file to pull feeds for Canonical, Debian, Red Hat,etc.
I hope this provided clarity. Do not hesitate to reach out again if you have any other query
Best Regards.