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

Clarify UFW documentation #9344

Closed
wants to merge 1 commit into from
Closed

Conversation

ubombi
Copy link

@ubombi ubombi commented Dec 23, 2024

SUMMARY

Clarification of potentially misleading documentation.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

community.general.ufw

ADDITIONAL INFORMATION

It may be a weird use-case, but:

  1. Enable firewall
  2. Edit /etc/ufw/user.rules
  3. Run playbook with state: enabled
  4. Rules aren't reloaded.
  5. Run playbook with state: reloaded
  6. Rules are reloaded

ufw -h explains commands like:

enable enables the firewall
disable disables the firewall
reload reload firewall
reset reset firewall

state: enabled or ufw -f enable does not reload firewall. New rules are visible in ufw status, but the iptables aren't updated.

And the part about "enabled"/"disabled" working on boot is incorrect either because the change is immediate. Like systemctl enable --now

ufw -h explains commands like:
 enable                          enables the firewall
 disable                         disables the firewall
 reload                          reload firewall
 reset                           reset firewall

The claim that "enabled" reloads anything is incorrect. Rules aren't reloaded. `ufw status` will show them, but iptables aren't updated.

The part about "enabled"/"disabled" working "on boot" is incorrect either. Change is immediate and permanent.
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added docs docs_only module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Dec 23, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch labels Dec 23, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

The current descriptions match what ufw's man page is saying about the commands, check for example https://manpages.org/ufw/8 (or in raw form, https://git.launchpad.net/ufw/tree/doc/ufw.8):

enable
reloads firewall and enables firewall on boot.

disable
unloads firewall and disables firewall on boot

reset
Disables and resets firewall to installation defaults. Can also give the --force option to perform the reset without confirmation.

If you think that ufw doesn't do what it documents, please file a bug against ufw so they fix their documentation. Once they do that, we can also update our descriptions.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Dec 23, 2024
@russoz
Copy link
Collaborator

russoz commented Dec 29, 2024

hi @ubombi are you still going to pursue some change here? If not, could you please close the PR, or let us know and we'll be happy to do it.

@ubombi
Copy link
Author

ubombi commented Dec 31, 2024

Sure.

@ubombi ubombi closed this Dec 31, 2024
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch docs_only docs module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants