DenyHosts readme翻譯

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.(安裝denyhosts模塊到python的套件目錄)

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,缺省的,將會創建目錄:/usr/share/denyhosts,並且一個示例配置文件將被放進去.
一個示例用的daemon-control腳本也將被拷貝進這個目錄)


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:
(denyhosts配置文件必須在它運行之前被創建.
示例配置文件denyhosts.cfg-dist包含絕大部分可能的設置,
它們都應該被拷貝過去,並且可以像這樣被編輯:)

# 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).
(一旦你編輯了配置和daemon control控制文件,務必確認daemon control腳本是可以執行的)

# chown root daemon-control

# chmod 700 daemon-control


STARTING DENYHOSTS MANUALLY(手工啓動denyhosts)
===========================

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(自動啓動denyhosts)
================================

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章