OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Best log viewer?
« previous next »
  • Print
Pages: [1]

Author Topic: Best log viewer?  (Read 11662 times)

spidysense

  • Newbie
  • *
  • Posts: 24
  • Karma: 1
    • View Profile
Best log viewer?
« on: December 01, 2017, 05:28:31 am »
What is some of the best ways to view the Firewall & Suricata logs?
Any good plugins for this? Which one do you use? What are the benefits of your choice?

Thanks.
Logged

bigops

  • Jr. Member
  • **
  • Posts: 86
  • Karma: 2
    • View Profile
Re: Best log viewer?
« Reply #1 on: December 09, 2017, 03:01:39 am »
I also have the same question.  If we forward the logs to a Syslog server the view is not very pretty.   Is there documentation on the log format somewhere or is there a specific log analyzer that supports OPNsense logs?
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #2 on: December 09, 2017, 09:07:34 am »
you can use an ELK stack with this little config as a base: https://github.com/fabianfrz/opnsense-logstash-config
Logged

spidysense

  • Newbie
  • *
  • Posts: 24
  • Karma: 1
    • View Profile
Re: Best log viewer?
« Reply #3 on: December 09, 2017, 07:59:09 pm »
Can you describe how to set that up? Not as simple as installing a package  :-\
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #4 on: December 09, 2017, 08:28:18 pm »
That is a bit of work but it does its job: You need logstash, kibana and elastic search. (all of them can be downloaded from the vendor if your distribution does not provide them from here: https://www.elastic.co/

First of all, you will need an elastic search database. Should be easy to configure (usually works out of the box).
In the next step, you need Kibana as a viewer. It should also work out of the box but you may want to adjust the config file. Kibana is a frontend for elastic search and it helps you to visualize data. This will be your firewall logs later.
In the next step, you need logstash, which is a software to transform logs. It needs to listen on the syslog port as a syslog server and stores the data in the elastic search database. For that, you need a configuration file (for example the one I have mentioned). As far as I can remember, the config file can be used using the following command:
Code: [Select]
logstash -f opnsense.confIn the last step, you need to configure this logstash server as an external syslog server.

Please note: My configuration file needs a custom parser plugin written by me for the PF logs to work. It can be installed using the logstash-plugin command.
Logged

guest15389

  • Guest
Re: Best log viewer?
« Reply #5 on: February 15, 2018, 08:17:10 pm »
I was going to test that out.

Where is the filter you have installed? I was searching around and can't seem to find it/figure out how to install it.
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #6 on: February 15, 2018, 09:45:16 pm »
That one? https://rubygems.org/gems/logstash-filter-opnsensefilter

install:
Code: [Select]
logstash-plugin install logstash-filter-opnsensefilter
Logged

AveryFreeman

  • Newbie
  • *
  • Posts: 23
  • Karma: 2
    • View Profile
Re: Best log viewer?
« Reply #7 on: February 20, 2019, 08:44:37 pm »
Quote from: fabian on February 15, 2018, 09:45:16 pm
That one? https://rubygems.org/gems/logstash-filter-opnsensefilter

install:
Code: [Select]
logstash-plugin install logstash-filter-opnsensefilter

What are you all running ELK stack on, a separate Linux system?

How do you get OPNSense to transmit logs to SysLog server?
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #8 on: February 20, 2019, 09:00:39 pm »
1) Yes

2) You can configure syslog under system, settings
Logged

spetrillo

  • Hero Member
  • *****
  • Posts: 721
  • Karma: 8
    • View Profile
Re: Best log viewer?
« Reply #9 on: June 02, 2019, 05:28:06 pm »
Does the filter get implemented on the OPNsense firewall?
Logged

beyondnoyeb

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: Best log viewer?
« Reply #10 on: April 19, 2020, 03:02:24 am »
Quote from: fabian on February 15, 2018, 09:45:16 pm
That one? https://rubygems.org/gems/logstash-filter-opnsensefilter

install:
Code: [Select]
logstash-plugin install logstash-filter-opnsensefilter

Hate brining up an older thread; but don't see the need in making a new one since the topic is the same.

Hoping you can help get this running.. I've got your plugin installed, i'm running 7.6 version of the elk stack.  I've edited my conf file that I was already collecting syslog's on port 5514 to include the main body of your conf file. 

For some reason when i'm looking in kibana it's still showing the crappy layout of unparsed info instead of using what you've built. 

Does your stuff work with the latest elk stack versions?  And anything else i'm missing?
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #11 on: April 19, 2020, 08:08:03 am »
Last version I have tested was v6 but I only had to update the config once and that was because OPNsense changed the syslog implementation with 20.1.

In worst case you need to debug your logstash configuration by running it in foreground and sending stuff to the stdout.
Logged

beyondnoyeb

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: Best log viewer?
« Reply #12 on: April 19, 2020, 09:17:16 pm »
@fabian,

Curious, do you use your elk stack for anything else or is it just devoted to opnsense output? 

Logged

fabian

  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Best log viewer?
« Reply #13 on: April 19, 2020, 09:26:41 pm »
My config is a standalone for OPNsense but you can use it for other services as well but then you need to tag the events or filter by origin ip.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Best log viewer?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2