I’ve installed Snort 3 as an IPS on my Ubuntu machine and now, I would want to use OpenSearch as a SIEM. I’ve downloaded OpenSearch and Dashboard, there are now running in a minimum configuration (I can access from a distant machine) but there is no data to see.
It’s here that I have some trouble. I am a little bit lost in the configuration of OpenSearch. Snort 3 is writing alerts logs in several files. I would want that Opensearch takes those log files and analyse them in real time to do data visualisation and to generate statistics, email notifications…
I understood that I need plugins like opensearch-observability to generate notifications, alerts, etc… from data. But to pass this data (snort logs) to opensearch, do I need a plugin too ? How can I do to see my snort logs in Opensearch dashboard ?
You need an ingestion tool to ingest all of the logs into OpenSearch, there are so many tools can be used, such as Fluent-bit, Logstash, Filebeat, Data-prepper etc. See this page about how to use Fluent-bit: OpenSearch - Fluent Bit: Official Manual.
Logstash work in a minimum configuration. For example with the argument “-e input { stdin {} } output { stdout {} }” it’s working. It’s also working when I put log files in input. The problem come when I try to configure the output to Opensearch.
I first tried with the following configuration
output {
opensearch {
hosts => ["https://192.168.200.1:9200"]
user => "admin"
password => "xxxxx"
index => "logstash-logs"
}
}
But I got an error wich seams to indicate there is a certificate problem :
[2023-07-28T10:12:29,086][WARN ][logstash.outputs.opensearch][main] Attempted to resurrect connection to dead OpenSearch instance, but got an error {:url=>"https://admin:xxxxxx@192.168.200.1:9200/", :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::HostUnreachableError, :message=>"OpenSearch Unreachable: [https://admin:xxxxxx@192.168.200.1:9200/][Manticore::ClientProtocolException] PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"}
During the OpenSearch installation, I created differents certificates so I tried different combination with lines about certificate :
But none of them works (maybe I just missed the one which is working…).
Given the installation I’ve made, what should by the configuration that I need in my logstash pipeline ?
Here are some info about my installation :
hostname : snort3
fqdn : snort3.hwdomain.lan
IP : 192.168.200.1
Please tell me if you need more informations to answer to my question.
Thanks for your help !
Thank you, it does remove the certificate error. But since we don’t use certificate verification, does that mean the seurity of the installation is impacted ?