Skip to content

Commit

Permalink
Use secure log on RHEL systems not auth.log
Browse files Browse the repository at this point in the history
Signed-off-by: Seth Vargo <sethvargo@gmail.com>
  • Loading branch information
tas50 authored and sethvargo committed Aug 24, 2013
1 parent 42ef081 commit 0290222
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -9,6 +9,6 @@

depends "yum"

%w{ debian ubuntu redhat centos fedora scientific amazon oracle}.each do |os|
%w{ debian ubuntu redhat centos fedora scientific amazon oracle }.each do |os|
supports os
end
3 changes: 3 additions & 0 deletions recipes/default.rb
Expand Up @@ -33,6 +33,9 @@
group "root"
mode 0644
notifies :restart, "service[fail2ban]"
variables(
:auth_log => node['platform_family'] == 'rhel' ? "secure" : 'auth.log'
)
end
end

Expand Down
10 changes: 5 additions & 5 deletions templates/default/jail.conf.erb
Expand Up @@ -95,7 +95,7 @@ action = %(action_)s
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
logpath = /var/log/<%= @auth_log %>
maxretry = 6

[dropbear]
Expand All @@ -117,7 +117,7 @@ filter = pam-generic
port = all
banaction = iptables-allports
port = anyport
logpath = /var/log/auth.log
logpath = /var/log/<%= @auth_log %>
maxretry = 6

[xinetd-fail]
Expand All @@ -135,7 +135,7 @@ maxretry = 2
enabled = false
port = ssh
filter = sshd-ddos
logpath = /var/log/auth.log
logpath = /var/log/<%= @auth_log %>
maxretry = 6

#
Expand Down Expand Up @@ -207,7 +207,7 @@ maxretry = 6
enabled = false
port = ftp,ftp-data,ftps,ftps-data
filter = pure-ftpd
logpath = /var/log/auth.log
logpath = /var/log/<%= @auth_log %>
maxretry = 6


Expand All @@ -216,7 +216,7 @@ maxretry = 6
enabled = false
port = ftp,ftp-data,ftps,ftps-data
filter = wuftpd
logpath = /var/log/auth.log
logpath = /var/log/<%= @auth_log %>
maxretry = 6


Expand Down

0 comments on commit 0290222

Please sign in to comment.