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

Disabling port alias does nothing #5594

Closed
2 tasks done
vdavy opened this issue Feb 23, 2022 · 4 comments
Closed
2 tasks done

Disabling port alias does nothing #5594

vdavy opened this issue Feb 23, 2022 · 4 comments
Assignees
Labels
bug Production bug

Comments

@vdavy
Copy link

vdavy commented Feb 23, 2022

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

If you create a rule with a port alias, when you disabled the used port alias, the rule is not disabled and still working.
You can test it by validating the rule by trying to make a connection.
And if you log in using SSH to the opnsense instance and run the commande diff /tmp/rules.debug /tmp/rules.debug.old, no difference is shown.

In the documentation about aliases here https://docs.opnsense.org/manual/aliases.html, there is nothing about the enabled of aliases.
I used this page to manage aliases : /ui/firewall/alias

To Reproduce

  1. Go to the alias page /ui/firewall/alias and create an port alias which is enabled
  2. Go to the firewall rule page /firewall_rules.php?if=lan (or for another interface) and create a rule using this port alias
  3. Check the rule is properly working
  4. Disable the port alias and don't forget to apply
  5. Check the rule again, it is still working

Expected behavior

The rule should not be working if port alias is disabled.

If you do the same test but an IP alias instead of the port alias, you can see using the command pfctl -t testip -T show showing the list of IP in the alias added and removed when you enable or disable the IP alias. And the rules using this one are properly disabled when the alias is it also.

Describe alternatives you considered

Obvisouly, you can disabled the rule directly to have it disabled, instead of disabled the port alias. But this is really confusing.
Alias disabling function should be more explicit in the documentation about the what it is doing.

Relevant log files

I check in the following logs diff /tmp/rules.debug /tmp/rules.debug.old showing no differences in the rules when disabling a port alias.

Environment

System is up to date on this day.

  • OPNsense 22.1.1_3-amd64
  • FreeBSD 13.0-STABLE
  • OpenSSL 1.1.1m 14 Dec 2021

Feel free to ask more explanation or more information is something is unclear

@AdSchellevis AdSchellevis self-assigned this Feb 23, 2022
@AdSchellevis AdSchellevis added the bug Production bug label Feb 23, 2022
@AdSchellevis
Copy link
Member

@vdavy 88837ed should fix the issue. easy to try locally using opnsense-patch 88837ed on a console. Thanks for reporting!

@AdSchellevis
Copy link
Member

needs 99c70a5 on top of 88837ed, install both using opnsense-patch 88837ed 99c70a5

@vdavy
Copy link
Author

vdavy commented Feb 24, 2022

I have just tested it and it works perfectly.

2 questions please :

  • any idea when this fix will be available for update in the repos ?
  • should I remove the patch (with opnsense-patch -e) before next update or this is not necessary ?

Thanks a for your quick fix and happy to help on a such amazing software. Keep going !

@AdSchellevis
Copy link
Member

@vdavy thanks for letting us know.

An update will overwrite the files, just keep an eye on the change log to know if it's in. Could be the next release or the one after.

fichtner pushed a commit that referenced this issue Feb 28, 2022
…s ignored. closes #5594

(cherry picked from commit 88837ed)
(cherry picked from commit 99c70a5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants