DenyHosts is a utility developed by Phil Schwartz which aims to
thwart sshd (ssh server) brute force attacks.
Please refer to http://www.denyhosts.net/faq.html
INSTALLATION:
=============
SOURCE DISTRIBUTION
===================
If you downloaded the source distribution file (DenyHosts-#.#.#-tar.gz)
then:
$ tar zxvf DenyHosts-#.#.#-tar.gz (Where #.#.# is the version)
$ cd DenyHosts-#.#.#
as root:
# python setup.py install
This will install the DenyHosts modules into python's site-packages
directory.
BINARY DISTRIBUTION (rpm, deb, etc)
===================
It is assumed that you are familiar with installing a binary package
on your particular operating system. If you are unsure how to do
this, you may wish to install from souce instead.
ALL DISTRIBUTIONS
=================
Once you have installed DenyHosts, by default the directory
/usr/share/denyhosts will be created and a sample configuration
file will be copied into it. A sample daemon-control script will
also be copied into the /usr/share/denyhosts directory.
DenyHosts requires that a configuration file be created before
it can function. The sample configuration file denyhosts.cfg-dist
contains most of the possible settings and should be copied and
then edited as such:
# cp denyhosts.cfg-dist denyhosts.cfg
# <edit> denyhosts.cfg
(where <edit> is your preferred text editor such as emacs, vi, etc)
The sample configuration file contains informational comments that
should help you quickly configure DenyHosts. After you have
edited your configuration file, save it.
Next, if you intend to run DenyHosts in daemon mode (recommended)
copy the sample daemon-control.dist script as such:
# cp daemon-control-dist daemon-control
Edit the daemon-control file. You should only need to edit this section
near the top:
###############################################
#### Edit these to suit your configuration ####
###############################################
DENYHOSTS_BIN = "/usr/bin/denyhosts.py"
DENYHOSTS_LOCK = "/var/lock/subsys/denyhosts"
DENYHOSTS_CFG = "/usr/share/denyhosts/denyhosts.cfg"
These defaults should be reasonable for many systems. You
should customize these settings to match your particular
system.
Once you have edited the configuration and daemon control files
make sure that the daemon control script it executable (by root).
# chown root daemon-control
# chmod 700 daemon-control
STARTING DENYHOSTS MANUALLY
===========================
Assuming you have configured DenyHosts to run as a daemon, you
can use the daemon-control script to control it:
# daemon-control start
You should refer to the daemon log (typically /var/log/denyhosts)
to ensure that DenyHosts is running successfully. If you
notice any problems you may wish to consult the FAQ at
http://www.denyhosts.net/faq.html
If you wish to run DenyHosts from cron rather than as a
daemon, please refer to the FAQ.
STARTING DENYHOSTS AUTOMATICALLY
================================
METHOD 1 (preferred)
====================
Create a symbolic link from /etc/init.d such as:
# cd /etc/init.d
# ln -s /usr/share/denyhosts/daemon-control denyhosts
If you have chkconfig installed you can then use it to
ensure that DenyHosts runs at boot time:
# chkconfig --add denyhosts
If you do not have chkconfig (or similar) installed you can either manually
create the symlinks in /etc/rc2.d, /etc/rc3.d, /etc/rc5.d but that is beyond
the scope of this document.
METHOD 2
========
Add an entry into the /etc/rc.local file:
/usr/share/denyhosts/daemon-control start
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共36个文件
py:26个
txt:3个
sh:2个
DenyHosts-2.6. 应用于linux系统,DenyHosts是Python语言写的一个程序,它会分析sshd的日志文件(/var/log/secure),当发现重 复的攻击时就会记录IP到/etc/hosts.deny文件,从而达到自动屏IP的功能。 当你的linux服务器暴露在互联网之中,该服务器将会遭到互联网上的扫描软件进行扫描,并试图猜测SSH登录口令。 你会发现,每天会有多条SSH登录失败纪录。那些扫描工具将对你的服务器构成威胁,你必须设置复杂登录口令,并将尝试多次登录失败的IP给阻止掉,让其在一段时间内不能访问该服务器。
资源推荐
资源详情
资源评论
收起资源包目录
DenyHosts-2.6.tar.gz (36个子文件)
DenyHosts-2.6
MANIFEST.in 353B
PKG-INFO 533B
LICENSE.txt 18KB
scripts
restricted_from_invalid.py 884B
restricted_from_passwd.py 906B
denyhosts.py 6KB
DenyHosts
util.py 4KB
restricted.py 681B
denyfileutil.py 7KB
report.py 2KB
sync.py 4KB
deny_hosts.py 19KB
counter.py 2KB
prefs.py 9KB
python_version.py 841B
loginattempt.py 12KB
purgecounter.py 2KB
__init__.py 13B
lockfile.py 1KB
plugin.py 483B
regex.py 2KB
daemon.py 4KB
version.py 14B
allowedhosts.py 4KB
filetracker.py 2KB
constants.py 2KB
old-daemon.py 4KB
CHANGELOG.txt 16KB
plugins
README.contrib 898B
shorewall_deny.sh 85B
test_deny.py 119B
shorewall_allow.sh 84B
README.txt 3KB
setup.py 1KB
denyhosts.cfg-dist 20KB
daemon-control-dist 4KB
共 36 条
- 1
资源评论
disremember2015
- 粉丝: 20
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 卡方数据.sav
- Python实现基于Django框架的二手物品购物网站设计源码+数据库.zip
- 基于Python和Django的二手物品购物网站设计源码+数据库脚本.zip
- 【计算机毕业设计】基于h5的移动网赚项目小程序【源码+lw+部署文档+讲解】
- 【计算机毕业设计】基于ssm-vue的oa系统设计与实现【源码+lw+部署文档+讲解】
- 基于pytorch实现的YOLOV5+SORT的车辆行人目标识别及追踪系统源码.zip
- 【计算机毕业设计】基于servlet+jdbc的在线选房系统设计与实现【源码+lw+部署文档+讲解】
- 投身科技创新,勇担时代先锋.pptx
- 【计算机毕业设计】基于SSM的仿微博系统的设计与实现【源码+lw+部署文档+讲解】
- 使用 Web Components 实现,遵循 Material You 设计规范的 Web 前端组件库
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功