VectorLinux
October 31, 2014, 12:34:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Deny Hosts  (Read 923 times)
flip city
Packager
Vectorite
****
Posts: 340


Way Out In HyperSpace


« on: February 06, 2010, 11:14:36 pm »

Request for Deny Hosts.
limk to : http://sourceforge.net/projects/denyhosts/files/
Logged

stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #1 on: February 07, 2010, 12:02:36 am »

I've packaged this an uploaded it to the repositories. Flip, if you want to give is a go your self, it's pretty easy with sbbuilder. 
Use sbbuilder in the terminal with this line...
sbbuilder --type=python --package=DenyHosts --version=2.6 --user=you

This will generate a series of folders 'DenyHost', '2.6', and 'src' which will contain a ready made slackbuild.

Then copy or download the DenyHosts-2.6.tar.gz into the 'src' directory along with the DenyHosts.Slackbuild

Open a terminal inside that directory become a root user and run
sh ./DenyHosts.Slackbuild

After the slackbuild finishes running type...
cd ../ (in the terminal)
then
installpkg DenyHosts-2.6-i586-1vl60.tlz

That's it.  You then have to complete the instructions in the readme.txt file You can find it in the sourcefiles, before you can use it.
Code:
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


Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!