1 Summary: Script to help thwart SSH server attacks
2 Summary(pl): Skrypt do blokowania ataków na serwery SSH
7 Group: Applications/System
8 Source0: http://dl.sourceforge.net/denyhosts/%{name}-%{version}.tar.gz
9 # Source0-md5: 1c40bda86884901f125bfbce3d8c35cb
13 URL: http://www.denyhosts.net/
14 BuildRequires: python-devel
15 BuildRequires: python-modules
16 BuildRequires: rpm-pythonprov
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 DenyHosts is a script intended to be run by Linux system
22 administrators to help thwart SSH server attacks.
24 If you've ever looked at your SSH log (/var/log/secure on Redhat,
25 /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how
26 many hackers attempted to gain access to your server. Hopefully, none
27 of them were successful (but then again, how would you know?).
28 Wouldn't it be better to automatically prevent that attacker from
29 continuing to gain entry into your system?
32 DenyHosts jest skryptem dla administratorów systemów Linux, którego
33 zadaniem jest odparcie ataków na serwery SSH.
35 W logach SSH mo¿na znale¼æ wiele informacji o próbach uzyskania
36 dostêpu do serwera poprzez us³ugê SSH. Dobrze jest zapobiec kolejnym
37 próbom w³amania przez odciêcie w³amywaczom dostêpu do serwera.
43 echo 'VERSION="%{version}"' > version.py
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}}
50 python setup.py install \
51 --root=$RPM_BUILD_ROOT \
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
55 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
56 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
57 mv $RPM_BUILD_ROOT%{_datadir}/denyhosts/daemon-control-dist $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
58 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
59 rm -r $RPM_BUILD_ROOT%{_datadir}/denyhosts
60 echo "127.0.0.1" > $RPM_BUILD_ROOT/var/lib/%{name}/allowed-hosts
63 rm -rf $RPM_BUILD_ROOT
66 /sbin/chkconfig --add %{name}
67 if [ -r /var/lock/subsys/DenyHosts ]; then
68 /etc/rc.d/init.d/DenyHosts restart >&2
70 echo "Run \"/etc/rc.d/init.d/DenyHosts start\" to start DenyHosts."
74 if [ "$1" = "0" ]; then
75 if [ -r /var/lock/subsys/DenyHosts ]; then
76 /etc/rc.d/init.d/DenyHosts stop >&2
78 /sbin/chkconfig --del %{name}
82 %defattr(644,root,root,755)
83 %doc README.txt CHANGELOG.txt
84 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
85 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron.d/%{name}
86 %attr(755,root,root) %{_bindir}/*
87 %attr(755,root,root) %{_sbindir}/*
88 %attr(754,root,root) /etc/rc.d/init.d/%{name}
90 %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/allowed-hosts
91 %dir %{py_sitescriptdir}/%{name}
92 %{py_sitescriptdir}/%{name}/*.py[co]