]>
Commit | Line | Data |
---|---|---|
465f8f11 | 1 | Summary: Ban IPs that make too many password failures |
2312737e | 2 | Summary(pl.UTF-8): Blokowanie IP powodujących zbyt dużo prób logowań z błędnym hasłem |
465f8f11 | 3 | Name: fail2ban |
4 | Version: 0.6.0 | |
5 | Release: 1 | |
6 | License: GPL | |
7 | Group: Daemons | |
8 | URL: http://fail2ban.sourceforge.net/ | |
9 | Source0: http://dl.sourceforge.net/fail2ban/%{name}-%{version}.tar.bz2 | |
10 | # Source0-md5: 129c4e76539a22ab60d025fbf137f962 | |
465f8f11 | 11 | BuildRequires: dos2unix |
80cab974 | 12 | BuildRequires: python-devel |
ddeb0306 | 13 | BuildRequires: rpmbuild(macros) >= 1.219 |
56c86c91 | 14 | Requires(post,preun): /sbin/chkconfig |
465f8f11 | 15 | Requires: python-log4py |
56c86c91 | 16 | Requires: rc-scripts |
465f8f11 | 17 | BuildArch: noarch |
80cab974 | 18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
465f8f11 | 19 | |
20 | %description | |
21 | Fail2Ban scans log files like /var/log/secure and bans IP that makes | |
22 | too many password failures. It updates firewall rules to reject the IP | |
23 | address. These rules can be defined by the user. Fail2Ban can read | |
24 | multiple log files including sshd or Apache web server logs. | |
25 | ||
2312737e JR |
26 | %description -l pl.UTF-8 |
27 | Fail2Ban skanuje pliki logów takie jak /var/log/secure i blokuje IP | |
28 | powodujące zbyt dużo prób logowań z błędnym hasłem. Uaktualnia regułki | |
29 | firewalla, aby odrzucić adres IP. Regułki te mogą być definiowane | |
30 | przez użytkownika. Fail2Ban potrafi czytać wiele plików logów włącznie | |
31 | z sshd czy plikami logów serwera WWW Apache. | |
cac37698 | 32 | |
465f8f11 | 33 | %prep |
34 | %setup -q | |
ddeb0306 ER |
35 | dos2unix config/redhat-initd |
36 | rm setup.cfg | |
465f8f11 | 37 | |
38 | %build | |
465f8f11 | 39 | %{__python} setup.py build |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
cac37698 | 43 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
3f2a7d0f | 44 | |
465f8f11 | 45 | PYTHONPATH=$RPM_BUILD_ROOT%{py_sitescriptdir}; export PYTHONPATH |
46 | ||
47 | python setup.py install \ | |
ddeb0306 | 48 | --optimize=2 \ |
465f8f11 | 49 | --root=$RPM_BUILD_ROOT |
50 | ||
ddeb0306 | 51 | %{py_postclean} |
465f8f11 | 52 | install config/redhat-initd $RPM_BUILD_ROOT/etc/rc.d/init.d/fail2ban |
53 | install config/fail2ban.conf.default $RPM_BUILD_ROOT%{_sysconfdir}/fail2ban.conf | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | /sbin/chkconfig --add %{name} | |
60 | %service %{name} restart | |
61 | ||
62 | %preun | |
63 | if [ "$1" = "0" ]; then | |
64 | %service -q %{name} stop | |
65 | /sbin/chkconfig --del %{name} | |
66 | fi | |
67 | ||
68 | %files | |
465f8f11 | 69 | %defattr(644,root,root,755) |
3f2a7d0f | 70 | %doc CHANGELOG README TODO |
71 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
465f8f11 | 72 | %attr(755,root,root) %{_bindir}/%{name} |
cac37698 | 73 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
465f8f11 | 74 | %{py_sitescriptdir}/* |