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: 337128544fadfc428746de5ad28bec19
13 URL: http://denyhosts.sourceforge.net/
15 BuildRequires: python-devel
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 DenyHosts is a script intended to be run by Linux system
21 administrators to help thwart SSH server attacks.
23 If you've ever looked at your SSH log (/var/log/secure on Redhat,
24 /var/log/auth.log on Mandrake, etc...) you may be alarmed to see how
25 many hackers attempted to gain access to your server. Hopefully, none
26 of them were successful (but then again, how would you know?).
27 Wouldn't it be better to automatically prevent that attacker from
28 continuing to gain entry into your system?
31 DenyHosts jest skryptem dla administratorów systemów Linux, którego
32 zadaniem jest odparcie ataków na serwery SSH.
34 W logach SSH mo¿na znale¼æ wiele informacji o próbach uzyskania
35 dostêpu do serwera poprzez us³ugê SSH. Dobrze jest zapobiec kolejnym
36 próbom w³amania przez odciêcie w³amywaczom dostêpu do serwera.
42 echo 'VERSION="%{version}"' > version.py
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/etc/rc.d/init.d,%{_sbindir},/var/lib/%{name}}
49 python setup.py install \
50 --root=$RPM_BUILD_ROOT \
53 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
54 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
55 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
56 mv $RPM_BUILD_ROOT%{_datadir}/denyhosts/daemon-control-dist $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
57 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
58 rm -r $RPM_BUILD_ROOT%{_datadir}/denyhosts
59 echo "127.0.0.1" > $RPM_BUILD_ROOT/var/lib/%{name}/allowed-hosts
62 rm -rf $RPM_BUILD_ROOT
65 /sbin/chkconfig --add %{name}
66 if [ -r /var/lock/subsys/DenyHosts ]; then
67 /etc/rc.d/init.d/DenyHosts restart >&2
69 echo "Run \"/etc/rc.d/init.d/DenyHosts start\" to start DenyHosts."
73 if [ "$1" = "0" ]; then
74 if [ -r /var/lock/subsys/DenyHosts ]; then
75 /etc/rc.d/init.d/DenyHosts stop >&2
77 /sbin/chkconfig --del %{name}
81 %defattr(644,root,root,755)
82 %doc README.txt CHANGELOG.txt
83 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.cfg
84 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
85 %attr(755,root,root) %{_bindir}/*
86 %attr(755,root,root) %{_sbindir}/*
87 %attr(755,root,root) /etc/rc.d/init.d/%{name}
89 /var/lib/%{name}/allowed-hosts
90 %dir %{py_sitescriptdir}/%{name}
91 %{py_sitescriptdir}/%{name}/*.py[co]