Skip to content

Fail2Ban is installed properly but not correctly banning the IP #3

@MetaBliss

Description

@MetaBliss

Hi,

I recently installed this Fail2Ban container and got it working on my Synology NAS. However, I am having an issue with Fail2Ban not recognizing and banning the real IP.

My current setup is that I am hosting my bitwarden instance using a domain name (bitw.domainname.com) and I have it behind Nginx Reverse Proxy Manager (NPM). With Fail2Ban set up properly to my bitwarden instance, I tested many fake passwords. The logs show that the IP was banned but it was my reverse proxy IP, not my device's real IP. And I was still able to keep entering fake passwords into my bitwarden instance. So Fail2Ban wasn't actually banning anything.

Is there some kind of incompatibility of f2b with containers behind NPM reverse proxy? For reference, Fail2ban was installed as 'host' on my NAS and NPM is installed as a docker bridge container.

Below is a snippet of my Bitwarden log.

2021-05-29 18:04:12,362 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:12
2021-05-29 18:04:13,966 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:13
2021-05-29 18:04:14,668 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:14
2021-05-29 18:04:15,405 fail2ban.actions [1]: WARNING [bitwarden] 192.168.16.1 already banned
2021-05-29 18:04:15,812 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:15
2021-05-29 18:04:16,917 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:16
2021-05-29 18:04:18,521 fail2ban.filter [1]: INFO [bitwarden] Found 192.168.16.1 - 2021-05-29 18:04:18
2021-05-29 18:04:18,617 fail2ban.actions [1]: WARNING [bitwarden] 192.168.16.1 already banned

So it looks like Fail2Ban is banning IP: 192.168.16.1 which is my NPM reverse proxy address.

Could you please share insights of what the problem could be?

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