Hi Ramiro,
Sure. You will have to reinstall Wazuh from sources doing the following to include GeoLite2 database:
- Install libgeoip-dev library. command: apt install libgeoip-dev
- Build Wazuh version with USE_GEOIP flag. command: make TARGET=server USE_GEOIP=yes
- Install Wazuh server version, command: ./install.sh
- Download the GeoLite2 free databases, it's necessary create an account. choose the City version in CSV format, zipped. link .
- Download geolite2legacy.py to convert from .CSV to .DAT file (supported by Wazuh).
- Convert the GeoLite2-City-CSV to DB file. command: ./geolite2legacy.py -i GeoLite2-City-CSV_20220603.zip -f geoname2fips.csv -o GeoIP.dat
- Copy the converted GeoIP.dat DB inside the Wazuh directory. command: cp GeoIP.dat /var/ossec/etc
Following steps are configuration settings:
- Enable USE_GEOIP in ossec.conf file:
<global>
<geoipdb>/var/ossec/etc/GeoIP.dat</geoipdb>
</global>
<alerts>
<use_geoip>yes</use_geoip>
</alerts>
- Enable USE_GEOIP in internal_options.conf file:
analysisd.geoip_jsonout=1
maild.geoip=1
Restart Wazuh server and it should run without any ERROR message. At this point every generated alert that include srcip or dstip field will look for the srcgeoip or dstgeoip information in GeoIP.dat database.
Let me know how it goes!
Regards