Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/netflow-module-disable-enable #6336

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from

Conversation

jrouzierinverse
Copy link
Member

Description

Allow the netflow kernel module to be disabled

Impacts

pfacct netflow

Enhancements

  • Allow the netflow kernel module to be disabled

Issue

fixes #6214

Delete branch after merge

NO

Checklist

  • Document the feature
  • Add unit tests
  • Add acceptance tests (TestLink)

@nqb
Copy link
Contributor

nqb commented Jun 30, 2021

@satkunas, could you take a quick look on this PR to be sure everything is OK on GUI part ?

@satkunas
Copy link
Contributor

@nqb it looks good

Copy link
Contributor

@nqb nqb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Webadmin part works as expected.

However, when I set netflow_kernel_module=disabled and restart pfacct, I see following lines in logs:

Jul 01 08:32:17 packetfence systemd[1]: Starting PacketFence GO Accounting Server Daemon...
Jul 01 08:32:19 packetfence packetfence[1469]: pfcmd.pl(1469) INFO: netflow is disabled or the netflow kernel module is disabled (pf::cmd::pf::confignetflow::_run)
Jul 01 08:32:19 packetfence pfacct[1581]: t=2021-07-01T08:32:19+0000 lvl=info msg="File descriptor limit is: 4096" pid=1581
Jul 01 08:32:19 packetfence pfacct[1581]: t=2021-07-01T08:32:19+0000 lvl=info msg="Starting listening to netflow at '127.0.0.1:2056'" pid=1581
Jul 01 08:32:19 packetfence systemd[1]: Started PacketFence GO Accounting Server Daemon.

=> Kernel module is still loaded and pfacct is still listening on udp/2056. I try to restart a second time and to reboot without any effect.

@nqb
Copy link
Contributor

nqb commented Jul 15, 2021

@jrouzierinverse, could you provide a feedback on this PR ?

@jrouzierinverse
Copy link
Member Author

The expected results is the kernel module not loaded but pfacct is still listening to netflow traffic.
Was the kernel module still loaded after the reboot.

@nqb
Copy link
Contributor

nqb commented Jul 15, 2021

Was the kernel module still loaded after the reboot.

Yes, I described in my previous comment. Even after a reboot, kernel module is still loaded.

@julsemaan
Copy link
Collaborator

@nqb and @jrouzierinverse, what prevents this from being merged?

@jrouzierinverse
Copy link
Member Author

@nqb identified an issue with this where the module was still loaded.
I did not verify that issue yet.

@jrouzierinverse jrouzierinverse force-pushed the feature/netflow-module-disable-enable branch from 38fe45d to 9c45529 Compare September 30, 2021 15:57
@fdurand
Copy link
Member

fdurand commented Jul 25, 2022

Isn´t it because even if $Config{advanced}{netflow_kernel_module} is disabled and netflow_enabled is enabled , we add the iptables rule "-I FORWARD -j NETFLOW" that load the kernel module ?

@fdurand
Copy link
Member

fdurand commented Jul 26, 2022

@jrouzierinverse , @extrafu Just a concern, if iptables is using it and you want to disable it then you have to regenerate the iptables rules before using the command pfcmd confignetflow.
If you want to use it then you need to use the command pfcmd confignetflow then regenerate the iptables rules.

So there is no easy way to add it in the iptables systemd script, this have to be done manually.

@extrafu
Copy link
Member

extrafu commented Jul 27, 2022

@fdurand Could we clearly document this somewhere or throw a warning when we toy-around "pfcmd service iptables" ?

@julsemaan julsemaan removed this from the PacketFence-12.1 milestone Oct 25, 2022
@jrouzierinverse jrouzierinverse force-pushed the feature/netflow-module-disable-enable branch from 5d42c42 to 43bddf7 Compare March 17, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the netflow module to be disabled
6 participants