ca499bc
Summary: Ban IPs that make too many password failures
ca499bc
Name: fail2ban
6ebbe08
Version: 0.8.7.1
6ebbe08
Release: 1%{?dist}
473ded4
License: GPLv2+
ca499bc
Group: System Environment/Daemons
ca499bc
URL: http://fail2ban.sourceforge.net/
6ebbe08
Source0: https://github.com/downloads/%{name}/%{name}/%{name}_%{version}.orig.tar.gz
2d07810
Source1: fail2ban-logrotate
Axel Thimm af90cd2
Source2: fail2ban-tmpfiles.conf
8bfc6bb
Patch0: fail2ban-0.8.3-init.patch
6ebbe08
Patch1: fail2ban-0.8.7.1-sshd.patch
41c8d5a
Patch6: fail2ban-0.8.3-log2syslog.patch
91ef859
Patch7: asyncserver.start_selinux.patch
6ebbe08
Patch8: fail2ban-0.8.7.1-notmp.patch
ca499bc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
bed4e7c
BuildRequires: python-devel >= 2.3
ca499bc
BuildArch: noarch
bed4e7c
Requires: iptables, tcp_wrappers, shorewall, gamin-python
Axel Thimm af90cd2
Requires: python-inotify
Axel Thimm af90cd2
Requires: initscripts
ca499bc
Requires(post): /sbin/chkconfig
ca499bc
Requires(preun): /sbin/chkconfig
ca499bc
Requires(preun): /sbin/service
ca499bc
ca499bc
%description
ca499bc
Fail2ban scans log files like /var/log/pwdfail or
ca499bc
/var/log/apache/error_log and bans IP that makes too many password
ca499bc
failures. It updates firewall rules to reject the IP address.
ca499bc
ca499bc
%prep
4ab5ea7
%setup -q
ca499bc
%patch0 -p1 -b .init
959d57f
%patch1 -p1 -b .sshd
41c8d5a
%patch6 -p1 -b .log2syslog
91ef859
%patch7 -p1 -b .fd_cloexec2
Axel Thimm af90cd2
%patch8 -p1 -b .notmp
ca499bc
ca499bc
%build
ca499bc
python setup.py build
ca499bc
ca499bc
%install
ca499bc
rm -rf %{buildroot}
ca499bc
python setup.py install -O1 --root %{buildroot}
6ebbe08
mkdir -p %{buildroot}%{_initddir}
6ebbe08
install -p -m 755 files/redhat-initd %{buildroot}%{_initddir}/fail2ban
959d57f
mkdir -p %{buildroot}%{_mandir}/man1
959d57f
install -p -m 644 man/fail2ban*.1 %{buildroot}%{_mandir}/man1
2d07810
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
2d07810
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/fail2ban
Axel Thimm af90cd2
install -d -m 0755 %{buildroot}%{_localstatedir}/run/fail2ban/
Axel Thimm af90cd2
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/fail2ban/
Axel Thimm af90cd2
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
Axel Thimm af90cd2
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/tmpfiles.d/fail2ban.conf
bd068d0
ca499bc
%clean
ca499bc
rm -rf %{buildroot}
ca499bc
ca499bc
%post
ca499bc
/sbin/chkconfig --add %{name}
ca499bc
ca499bc
%preun
ca499bc
if [ $1 = 0 ]; then
ca499bc
  /sbin/service %{name} stop > /dev/null 2>&1
ca499bc
  /sbin/chkconfig --del %{name}
ca499bc
fi
ca499bc
ca499bc
%files
ca499bc
%defattr(-,root,root,-)
bed4e7c
%doc README TODO ChangeLog COPYING
959d57f
#doc config/fail2ban.conf*
959d57f
%{_bindir}/fail2ban-server
959d57f
%{_bindir}/fail2ban-client
959d57f
%{_bindir}/fail2ban-regex
ca499bc
%{_datadir}/fail2ban
6ebbe08
%{_initddir}/fail2ban
959d57f
%{_mandir}/man1/fail2ban-*.1*
959d57f
%dir %{_sysconfdir}/fail2ban
959d57f
%dir %{_sysconfdir}/fail2ban/action.d
959d57f
%dir %{_sysconfdir}/fail2ban/filter.d
959d57f
%config(noreplace) %{_sysconfdir}/fail2ban/fail2ban.conf
959d57f
%config(noreplace) %{_sysconfdir}/fail2ban/jail.conf
959d57f
%config(noreplace) %{_sysconfdir}/fail2ban/action.d/*.conf
959d57f
%config(noreplace) %{_sysconfdir}/fail2ban/filter.d/*.conf
2d07810
%config(noreplace) %{_sysconfdir}/logrotate.d/fail2ban
Axel Thimm af90cd2
%dir %{_localstatedir}/run/fail2ban/
Axel Thimm af90cd2
%config(noreplace) %{_sysconfdir}/tmpfiles.d/fail2ban.conf
Axel Thimm af90cd2
%dir %{_localstatedir}/lib/fail2ban/
ca499bc
ca499bc
%changelog
6ebbe08
* Thu Oct 11 2012 Orion Poplawski <orion@cora.nwra.com> - 0.8.7.1-1
6ebbe08
- Update to 0.8.7.1
6ebbe08
- Drop fd_cloexec, pyinotify, and examplemail patches fixed upstream
6ebbe08
- Rebase sshd and notmp patches
6ebbe08
- Use _initddir macro
6ebbe08
358d708
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4-29
358d708
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
358d708
744512b
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.4-28
744512b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
744512b
Axel Thimm af90cd2
* Sat Apr  9 2011 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.4-27
Axel Thimm af90cd2
- Move tmp files to /var/lib (suggested by Phil Anderson).
Axel Thimm af90cd2
- Enable inotify support (by Jonathan Underwood).
Axel Thimm af90cd2
- Fixes RH bugs #669966, #669965, #551895, #552947, #658849, #656584.
f7225b0
91ef859
* Sun Feb 14 2010 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.4-24
91ef859
- Patch by Jonathan G. Underwood <jonathan.underwood@gmail.com> to
91ef859
  cloexec another fd leak.
91ef859
4ab5ea7
* Fri Sep 11 2009 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.4-23
4ab5ea7
- update to 0.8.4.
4ab5ea7
1a350e8
* Wed Sep  2 2009 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3-22
1a350e8
- Update to a newer svn snapshot to fix python 2.6 issue.
1a350e8
41c8d5a
* Thu Aug 27 2009 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3-21
41c8d5a
- Log to syslog (RH bug #491983). Also deals with RH bug #515116.
41c8d5a
- Check inodes of log files (RH bug #503852).
36b030b
08b9eed
* Sat Feb 14 2009 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3-18
08b9eed
- Fix CVE-2009-0362 (Fedora bugs #485461, #485464, #485465, #485466).
08b9eed
508c8e4
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.8.3-17
508c8e4
- Rebuild for Python 2.6
508c8e4
8bfc6bb
* Sun Aug 24 2008 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.3-16
8bfc6bb
- Update to 0.8.3.
8bfc6bb
473ded4
* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.8.2-15
473ded4
- fix license tag
473ded4
7069b0f
* Thu Mar 27 2008 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.2-14
7069b0f
- Close on exec fixes by Jonathan Underwood.
7069b0f
bd068d0
* Sun Mar 16 2008 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.2-13
bd068d0
- Add %%{_localstatedir}/run/fail2ban (David Rees).
bd068d0
bed4e7c
* Fri Mar 14 2008 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.2-12
bed4e7c
- Update to 0.8.2.
bed4e7c
129a6fe
* Thu Jan 31 2008 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 0.8.1-11
129a6fe
- Move socket file from /tmp to /var/run to prevent SElinux from stopping
129a6fe
  fail2ban from starting (BZ #429281)
129a6fe
- Change logic in init file to start with -x to remove the socket file in case
129a6fe
  of unclean shutdown
129a6fe
25ce90b
* Wed Aug 15 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.1-10
25ce90b
- Update to 0.8.1.
25ce90b
- Remove patch fixing CVE-2007-4321 (upstream).
25ce90b
- Remove AllowUsers patch (upstream).
25ce90b
- Add dependency to gamin-python.
25ce90b
372f288
* Thu Jun 21 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.0-9
372f288
- Fix remote log injection (no CVE assignment yet).
372f288
8c6d2a1
* Sun Jun  3 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.0-8
8c6d2a1
- Also trigger on non-AllowUsers failures (Jonathan Underwood
8c6d2a1
  <jonathan.underwood@gmail.com>).
8c6d2a1
ea3c694
* Wed May 23 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.0-7
ea3c694
- logrotate should restart fail2ban (Zing <zing@fastmail.fm>).
2d07810
- send mail to root; logrotate (Jonathan Underwood
2d07810
  <jonathan.underwood@gmail.com>)
2d07810
959d57f
* Sat May 19 2007 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.8.0-4
959d57f
- Update to 0.8.0.
959d57f
- enable ssh by default, fix log file for ssh scanning, adjust python
959d57f
  dependency (Jonathan Underwood <jonathan.underwood@gmail.com>)
959d57f
ca499bc
* Sat Dec 30 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.6.2-3
ca499bc
- Remove forgotten condrestart.
ca499bc
ca499bc
* Fri Dec 29 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.6.2-2
ca499bc
- Move /usr/lib/fail2ban to %%{_datadir}/fail2ban.
ca499bc
- Don't default chkconfig to enabled.
ca499bc
- Add dependencies on service/chkconfig.
ca499bc
- Use example iptables/ssh config as default config.
ca499bc
ca499bc
* Mon Dec 25 2006 Axel Thimm <Axel.Thimm@ATrpms.net> - 0.6.2-1
ca499bc
- Initial build.