linuxserver / docker-fail2ban

GNU General Public License v3.0
55 stars 7 forks source link

[BUG] nginx-unauthorized fails #15

Closed Xeroxxx closed 1 year ago

Xeroxxx commented 1 year ago

Is there an existing issue for this?

Current Behavior

Fail2Ban loops within the container when you enable nginx-unauthorzed.

 ['start', 'nginx-unauthorized']]] has failed. Received RegexException("Unable to compile regular expression '.*(?i)plex.*':\nglobal flags not at the start of the expression at position 2")
 2023-05-28 18:49:20,262 FFFF8B868B20 ERROR NOK: ("Unable to compile regular expression '.*(?i)plex.*':\nglobal flags not at the start of the expression at position 2",)
2023-05-28 18:49:20,258 FFFF8CAA4060 ERROR Unable to compile regular expression '.*(?i)plex.*':
global flags not at the start of the expression at position 2

Editing and commenting the string, results in a replacement and loop again.

Workaroud start container and edit nginx-unauthorrized conf.

Expected Behavior

Running and not looping.

Steps To Reproduce

Enable jail for nginx-unauthorized

Environment

No response

CPU architecture

x86-64

Docker creation

docker compose as documentation uses.

Container logs

See above.
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Dilomos commented 1 year ago

I don't think this is related to nginx-unauthorrized default conf but i face similar issue since i've updated to last fail2ban docker image it appear that any regex containing ".(?i)" fail with that same error i have a couple that all trigger the same issue ^ -."(GET|POST|HEAD) (?i)(/autodiscover)."$ ^ -."(GET|POST|HEAD) (?i)(/hnap)*"$ I don't know what has changed in regex parsing but this is an issue

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue is locked due to inactivity