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

Zones and Policies page incorrectly displays the Logging status for each zone #807

Closed
gsanchietti opened this issue Oct 1, 2024 · 4 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@gsanchietti
Copy link
Member

Steps to reproduce:

  1. Access NethSecurity's Zones and policies page.
  2. Observe the Logging field for each zone.
    • Logging is shown as disabled if the zone does not have the log option.
    • Logging is shown as enabled if the zone has the log option, even if set to 0.
  3. To replicate from the command line:
    uci set firewall.ns_wan.log=0
    uci commit firewall
    /etc/init.d/firewall reload

Expected behavior:

  • The Logging field in the Zones and policies page should accurately reflect the logging status based on the zone's configuration.

Actual behavior:

  • The logging field displays enabled even when the log option is set to 0.

Tasks to fix:

  1. Ensure the zone list correctly shows the logging status.
  2. Add functionality to enable or disable logging from the UI.
  3. Document the logging functionality for zones:
    • When logging is enabled, all dropped or rejected packets destined for that zone are automatically logged, even if the log flag in the rule is turned off.

Components:

NethSecurity Image: 8-23.05.4-ns.1.2.0

@gsanchietti gsanchietti added the bug label Oct 1, 2024
@gsanchietti gsanchietti added this to the NethSecurity 8.3 milestone Oct 1, 2024
@gsanchietti gsanchietti moved this to Ready ⏯ in NethSecurity Oct 1, 2024
@gsanchietti gsanchietti moved this from Ready ⏯ to In progress 🛠 in NethSecurity Oct 3, 2024
@gsanchietti gsanchietti self-assigned this Oct 3, 2024
@andre8244 andre8244 self-assigned this Oct 4, 2024
gsanchietti pushed a commit that referenced this issue Oct 7, 2024
Co-authored-by: gsanchietti <gsanchietti@users.noreply.github.com>

#807
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Testing image version: 8-23.05.5-ns.1.2.99-alpha1-57-gece787fcce

@github-actions github-actions bot added the testing Packages are available from testing repositories label Oct 7, 2024
@francio87 francio87 self-assigned this Oct 7, 2024
@francio87
Copy link
Member

Not Verified ❌

The UI show Logging ON even if the option log of the zone is set to 0 :

root@NethSec-test:~# uci show firewall.ns_lan
firewall.ns_lan=zone
firewall.ns_lan.name='lan'
firewall.ns_lan.network='lan'
firewall.ns_lan.input='ACCEPT'
firewall.ns_lan.output='ACCEPT'
firewall.ns_lan.forward='ACCEPT'
root@NethSec-test:~# 
root@NethSec-test:~# 
root@NethSec-test:~# 
root@NethSec-test:~# uci show firewall.ns_guest.log
firewall.ns_guest.log='0'

image

New Zones are created with the option log='0' :

root@NethSec-test:~# uci changes
firewall.ns_new='zone'
firewall.ns_new.name='new'
firewall.ns_new.input='DROP'
firewall.ns_new.forward='DROP'
firewall.ns_new.output='ACCEPT'
firewall.ns_new.log='0'
firewall.ns_new='7'

but the UI only show OFF if the option is missing

@francio87 francio87 removed their assignment Oct 7, 2024
@gsanchietti gsanchietti removed the testing Packages are available from testing repositories label Oct 7, 2024
gsanchietti added a commit that referenced this issue Oct 7, 2024
#807 

Co-authored-by: gsanchietti <gsanchietti@users.noreply.github.com>
@gsanchietti
Copy link
Member Author

@gsanchietti gsanchietti added the testing Packages are available from testing repositories label Oct 7, 2024
@francio87
Copy link
Member

Verified ✅

@francio87 francio87 added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Archived in project
Development

No branches or pull requests

3 participants