Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fail2Ban Setup with NGINX and Cloudflare tunnels

Featured Replies

Can you explain why the container needs to be privileged? Is it just so that it can access the /var/log directory and if so would it be possible to map this somewhere else so that the container can be run without privileged mode?

  • 9 months later...

i just cant get this to work..my fail2ban log shows that my work ip is blocked.. but the page still loads and i can still enter my username and password and keep trying and refreshing..

i'm just at a loss here...

 

tried everything i could think of.. only thing i just changed is the priviliged mode and going to try that now.

edit: priviliged mode did not change anything.. i can still keep pressing F5 and trying new passwords etc..

also added my iptables -nvL from the host. as you can see the reject tables are present.. but something is preventing them from being blocked..

authelia.txt fail2banlog.txt filter authelia-auth.local.txt jail authelia-auth.local.txt

iptables -nvL.txt

Edited by furian

  • 3 weeks later...

I setup fail to ban and it seems to be banning ips.  I checked with my iphone on lte.  I am however getting some errors in the log.

 

2023-11-09 16:23:02,147 fail2ban.utils          [1]: ERROR   148091209830 -- stderr: 'iptables: No chain/target/match by that name.'
2023-11-09 16:23:02,147 fail2ban.utils          [1]: ERROR   148091209830 -- returned 1
2023-11-09 16:23:02,148 fail2ban.actions        [1]: ERROR   Failed to execute ban jail 'bitwarden' action 'iptables-allports' info 'ActionInfo({'ip': '209.171.85.61', 'family': 'inet4', 'fid': <function Actions.ActionInfo.<lambda> at 0x1480911b9120>, 'raw-ticket': <function Actions.ActionInfo.<lambda> at 0x1480911b98a0>})': Error starting action Jail('bitwarden')/iptables-allports: 'Script error'

 

Is this anything to be concerened with?  Also in my jail.local file bantime and findtime are in seconds.  What the standard settings that most use?  Also how can I unban someone if they get accidently banned?  I am currently set to 300 seconds for testing.  Also is it possible to put my ip at home on an ignore list?

Edited by Gragorg

  • 4 months later...

Hello, I use Nginx Proxy Manager but not cloudflare.
Do I need some special config for fail2ban?
Regards.

  • 2 months later...

I am running fail2ban with host network.

 

However this container's iptables is different from UnRaid's iptables.

 

How can we make sure they are the same?

  • 1 month later...
On 11/9/2023 at 4:36 PM, Gragorg said:

I setup fail to ban and it seems to be banning ips.  I checked with my iphone on lte.  I am however getting some errors in the log.

 

2023-11-09 16:23:02,147 fail2ban.utils          [1]: ERROR   148091209830 -- stderr: 'iptables: No chain/target/match by that name.'
2023-11-09 16:23:02,147 fail2ban.utils          [1]: ERROR   148091209830 -- returned 1
2023-11-09 16:23:02,148 fail2ban.actions        [1]: ERROR   Failed to execute ban jail 'bitwarden' action 'iptables-allports' info 'ActionInfo({'ip': '209.171.85.61', 'family': 'inet4', 'fid': <function Actions.ActionInfo.<lambda> at 0x1480911b9120>, 'raw-ticket': <function Actions.ActionInfo.<lambda> at 0x1480911b98a0>})': Error starting action Jail('bitwarden')/iptables-allports: 'Script error'

 

Is this anything to be concerened with?  Also in my jail.local file bantime and findtime are in seconds.  What the standard settings that most use?  Also how can I unban someone if they get accidently banned?  I am currently set to 300 seconds for testing.  Also is it possible to put my ip at home on an ignore list?

Hey was wondering if you were able to solve this, seeing a similar error on myself when trying to use the iptables-allports.

-Cheers!

On 7/19/2024 at 11:36 PM, Healzangels said:

Hey was wondering if you were able to solve this, seeing a similar error on myself when trying to use the iptables-allports.

-Cheers!

No I never did figure out the error or find anyone who knew anything about it. 

Shucks, well thanks for the update! If I get it setup and working will report back.

  • 5 months later...

Im trying to get this container to Work. When i setup thing the container starts but all directories in /data are just empty like jail.d etc.

but when i check inside the container the files are in /etc/fail2ban/ all files are there. But when i link to that the contain just fails to start. So no way i can edit the files. And im not going inside the container it self to edit all files each time i want to change something.

 

So something goes wrong. I also dont use cloudflare.

  • 1 year later...

I successfully installed linuxserver's fail2ban unraid container and i absolutely disagree with the idea that fail2ban needs privileged mode, nor do i understand how people can choose this mode for a container to "protect" their enivironment.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.