-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
[Bug] nftables chain policy is not restored when disabling the firewall #1225
Comments
Hi @aCursedComrade , Issue reproduced, thanks for the detailed bug report. I'll take a look at it. |
The quickest fix would be to send 2 configuration changes: one to change the policy and another one to disable the firewall: opensnitch/ui/opensnitch/dialogs/firewall.py Lines 326 to 328 in 36f9242
fwcfg = self._nodes.get_node(addr)['firewall']
self.send_notification(addr, fwcfg)
time.sleep(0.5)
fwcfg.Enabled = True if enable else False
self.send_notification(addr, fwcfg) There's a problem reloading files that would require deeper changes. |
gustavo-iniguez-goya
added a commit
that referenced
this issue
Dec 16, 2024
When disabling the fw, we change the default input and output policy to Accept, not to block connections. Due to a problem reloading the fw in the daemon, the policy was not changed as expected. This problem must be fixed in the daemon, but for the time being, sending two configuration changes solves the issue (one for changing the policy, and another one for disabling the fw). Closes: #1225 (cherry picked from commit d825f1e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The daemon does not restore nftables input chain policy when disabling the firewall. So when the input policy was configured to be
deny
, it remains asdeny
which causes all incoming traffic to fail. This includes traffic fromlocalhost
as the associated rule for excluding local traffic from the filter is removed when the firewall is disabled.Linux comrade-arch 6.11.2-4-MANJARO #1 SMP PREEMPT_DYNAMIC Tue Oct 8 11:52:01 UTC 2024 x86_64 GNU/Linux
To Reproduce
# nft list chain inet filter input
through CLI# nft list chain inet filter input
through CLIPost error logs:
(handpicked from high volume of logs and moved to additional context section)
Expected behavior (optional)
When disabling the system firewall management, the policy (specifically for
inet->filter->input
) needs be restored toaccept
if it has been modified todeny
to prevent any inconvenience.Screenshots
2024-11-30.20-28-09.mp4
Additional context
Currently, the version packaged by Manjaro is 1.6.5 version. When disabling the firewall, the notable log line are these (on DEBUG level):
I downloaded the daemon from 1.6.6 release and observed the same behavior when disabling the firewall, but something new got printed:
It seems that the daemon only counts the chains created by libvirt and not the "standard" filter, nat and mangle tables/chains. I cannot see lines marked as errors or warns regarding this in the log.
Following is my usual nftables rule set:
The text was updated successfully, but these errors were encountered: