Skip to content

Commit

Permalink
Extend search period and ban time for trackpoint jail
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 24, 2024
1 parent 0ceabfe commit 5fa9775
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cookbooks/fail2ban/resources/jail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
property :logpath, :kind_of => String
property :protocol, :kind_of => String
property :ports, :kind_of => Array, :default => []
property :bantime, :kind_of => [Integer, String]
property :findtime, :kind_of => [Integer, String]
property :maxretry, :kind_of => Integer
property :ignoreips, :kind_of => Array

Expand Down
6 changes: 6 additions & 0 deletions cookbooks/fail2ban/templates/default/jail.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ filter = <%= @filter %>
<% if @logpath -%>
logpath = <%= @logpath %>
<% end -%>
<% if @bantime -%>
bantime = <%= @bantime %>
<% end -%>
<% if @findtime -%>
findtime = <%= @findtime %>
<% end -%>
<% if @maxretry -%>
maxretry = <%= @maxretry %>
<% end -%>
Expand Down
2 changes: 2 additions & 0 deletions cookbooks/web/recipes/frontend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
filter "apache-trackpoints-timeout"
logpath "/var/log/apache2/access.log"
ports [80, 443]
bantime "12h"
findtime "30m"
end

fail2ban_filter "apache-notes-search" do
Expand Down

0 comments on commit 5fa9775

Please sign in to comment.