OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Intrusion Detection and Prevention »
  • [opnsense 18.1.r1 & suricata 4.0.3] issues with queryInstalledRules.py
« previous next »
  • Print
Pages: [1]

Author Topic: [opnsense 18.1.r1 & suricata 4.0.3] issues with queryInstalledRules.py  (Read 6183 times)

nas7

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
[opnsense 18.1.r1 & suricata 4.0.3] issues with queryInstalledRules.py
« on: January 13, 2018, 02:58:48 am »
Hi.  I couldn't find this issue in the forums so I am reporting here with a possible fix.  I am testing opnsense 18.1.r1 which have suricata 4.0.3.  When using the GUI to check the rules the system reports:

Code: [Select]
configd.py: [53df30fd-d29a-4b39-98f9-3dd8c2171b76] Script action failed with Command '/usr/local/opnsense/scripts/suricata/queryInstalledRules.py /limit '10' /offset '0' /filter '' /sort_by 'sid'' returned non-zero exit status 1
While debugging the issue I found that the queryInstalledRules.py imports update_params from lib.params which doesn't exist.  I patched the code to:

Code: [Select]
import ujson
from lib.rulecache import RuleCache
#from lib.params import update_params

import sys
sys.path.insert(0, "/usr/local/opnsense/site-python")
from params import update_params

which seems to work.

I couldn't find a bug reporter for the 18.1 series so I am posting here the fix so far.

Regards,

nas7
Logged

nas7

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
[opnsense 18.1.r1 & suricata 4.0.3] issues with listAlertLogs.py
« Reply #1 on: January 13, 2018, 03:18:05 am »
Just found similar error with listAlertLogs.py.  Patched code as:

Code: [Select]
import datetime
from lib import suricata_alert_log
#from lib.log import reverse_log_reader

import sys
sys.path.insert(0, "/usr/local/opnsense/site-python")
from log_helper import reverse_log_reader

Seems to work now also.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: [opnsense 18.1.r1 & suricata 4.0.3] issues with queryInstalledRules.py
« Reply #2 on: January 13, 2018, 11:12:57 am »
Hi nas7,

Thank you for your report. Fixed via:

https://github.com/opnsense/core/commit/921b54d4f


Cheers,
Franco
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Intrusion Detection and Prevention »
  • [opnsense 18.1.r1 & suricata 4.0.3] issues with queryInstalledRules.py
 

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