Skip to content

Ufw status check relies on English locales and breaking other languaes #154

Description

@jwesemann

The ufw-docker script will check for a running/healthy ufw-process directly after the __main__remark. It greps the output of the command ufw status (which needs running as root) looking for the string Status: active.

This will only work in English language environments and dies in all other cases.

Being in a German environment $LANG and $LANGUAGE are set to de_DE.UTF-8 which results into Status: Aktiv (please note the small difference active compares to Aktiv when running sudo ufw status.

I solved it temporarily and added export LANGUAGE=en_US.UTF-8 as the second line within your "ufw-docker" script. I did not test for any side effects of my change.

Probably there is a more robust way to check for the real status of ufw.

Thx for your great work with while providing script which solves a common and serious security topic within my local docker setup.

Best regards
Jörg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions