OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 23.7 Legacy Series »
  • ntopng Interface selection
« previous next »
  • Print
Pages: [1]

Author Topic: ntopng Interface selection  (Read 1361 times)

CJ

  • Hero Member
  • *****
  • Posts: 832
  • Karma: 30
    • View Profile
    • Have Answer, Will Blog
ntopng Interface selection
« on: January 01, 2024, 07:44:46 pm »
The community edition of ntopng has a limit of 8 interfaces.  Unfortunately, I have more than 8 interfaces in OPNsense.  Under the advanced options of the plugin there is an option to configure the listening interfaces.  It passes along the --interface option to ntopng. However, the OPNsense UI won't allow you to select more than one interface.  ntopng allows for multiple --interface options to be specified.

Can the UI be configured for multiple selection of interfaces?
Logged
Have Answer, Will Blog

jbhorner

  • Newbie
  • *
  • Posts: 18
  • Karma: 1
    • View Profile
Re: ntopng Interface selection
« Reply #1 on: January 02, 2024, 05:48:49 am »
The short answer is no. There is an article here: https://forum.opnsense.org/index.php?topic=29151.0 that talks about this. In my implementation, I found a different result. I found the file here: /usr/local/etc/ntopng.conf

I had to ssh to OPNsense, edit the file, and then restart the ntopng service. Stopping and starting the service, curiously, overwrote the file with the default (single) interface. Every time OPNsense restarts, an edit of that file is needed. Candidly, I think it's silly that OPNsense does not allow a multi-select on that field in the UI; I'd almost say it is a bug.
Logged

CJ

  • Hero Member
  • *****
  • Posts: 832
  • Karma: 30
    • View Profile
    • Have Answer, Will Blog
Re: ntopng Interface selection
« Reply #2 on: January 04, 2024, 02:25:40 pm »
That's what I thought but I wanted to see if anyone had anything I was missing before I submitted it as a bug.
Logged
Have Answer, Will Blog

36thchamber

  • Jr. Member
  • **
  • Posts: 57
  • Karma: 2
    • View Profile
Re: ntopng Interface selection
« Reply #3 on: January 25, 2024, 03:03:59 am »
the /usr/local/etc/ntopng.conf is not a meaningful config file, it's a temporary file, generated from the /config/config.xml file on execution. that file is sadly limited to just one interface.

to override the buggy behavior at the moment the gui now supports it in 24.1.1. To do it via script (e.g. modify the order knowning the last items could be variable), modify the RC file the action is calling - /usr/local/etc/rc.d/ntopng:

Code: [Select]
interfaces="-i bridge0 -i vlan02 -i wg3"
command_args="-U ntopng -G ${ntopng_pidfile} -1 ${httpdocs_path} -2 ${scripts_path} -3 ${callbacks_path} -e ${interfaces}"

since installation overwrites all of the configs, it's even better to slap the code into a unique RC startup file 49-ntopngfix:

Code: [Select]
sed -i -e 's/^\(command_args.*-e\)\"/\1 -i bridge0 -i vlan03 -i wg3\"/' /usr/local/etc/rc.d/ntopng
another iisue is the certificate doesn't get refreshed.

i wish ntop was incorporated into GUI like Zen, or, have a link somewhere in Lobby.
« Last Edit: February 19, 2024, 04:22:25 pm by 36thchamber »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 23.7 Legacy Series »
  • ntopng Interface selection
 

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