Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/fail2ban/templates/jail.erb

Issue 29364214: Issue 2487 - Introduce fail2ban module (Closed)
Patch Set: Created Nov. 24, 2016, 3:09 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/fail2ban/templates/jail.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/fail2ban/templates/jail.erb
@@ -0,0 +1,12 @@
+<% @jail_config.each do |name, config| -%>
+<% if !config['logpath'].empty? -%>
+[<%= name %>]
+
+enabled = <%= config['enabled'] ||= true %>
+port = <%= config['port'] ||= 'all' %>
+filter = <%= name %>
+logpath = <%= config['logpath'] %>
+maxretry = <%= config['maxretry'] ||= 6 %>
+bantime = <%= config['bantime']||= 3600 %>
mathias 2016/11/24 16:08:48 The key-by-key assignment is limiting the user/con
f.lopez 2016/11/25 15:13:49 I agree but I couldn't find a way to make this hap
+<% end -%>
+<% end -%>

Powered by Google App Engine
This is Rietveld