fail2ban implementation for JIRA

Can anyone share your action and filter files for implementing fail2ban on JIRA.

I was trying to configure fail2ban on our system and looking for best methods for implementing it effectively.

Any help is highly appreciated.........

3 answers

Thanks for replying but there regular expressions will trigger only for almost every login page count
failregex = <HOST>.*"GET /login.jsp

but we need these alerts to be triggered based on incorrect counts and not on login page count.

For example if you use above failregex then count will be increased as soon as you open a new tab and enter JIRA login URL.

I had gone through Justin link as well and also added my question(comment) yesterday itself.

So I needed something which has better implementation of filters to encounter all intruders.

The confluence documentation ( is half-baked and might lock you out with successful login attempts. Also  the GET definition seems wrong.

The jail definition in filter.d will work with this (checked on v7.6.2 and Fail2ban 0.9.3)

failregex = <HOST>.*"POST /rest/gadget/1.0/login HTTP/1.1" 200 219
            <HOST>.*"POST /login.jsp HTTP/1.1" 200

#1: this is using the fact that the message size is 220 when it succeeds and 219 when it fails
#2: this is using the fact that a sucessful login will return 302 (redirect) while it returns 200 if the login fails



Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted yesterday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

168 views 12 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot