DenyHosts stop problem

Discussion in 'Server Operation' started by Jcorrea920, Apr 26, 2006.

  1. Jcorrea920

    Jcorrea920 New Member

    Apparently my Denyhosts stopped automatically adding intrusion attempts though SSH to the hosts.deny file So now I have to add them mannually what a pain. How should I fix this without breaking the denial? I guess a better questions is is DenyHosts still working properly or should I assume that the whole thing is broken?:eek:
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you get any error messages when you restart DenyHosts?
     
  3. Jcorrea920

    Jcorrea920 New Member

    That was it!

    Falko,
    Thanks so much for your help. DenyHosts wasn't even running. Imagine that. I had rebooted the computer and forgot to start Deny Hosts. Is there any way to set my server to boot it automatically on start up? :D
     
  4. Jcorrea920

    Jcorrea920 New Member

    What I discovered about DenyHosts...

    So I was searching for a way to tweak my server so that DenyHosts starts up on boot up of the server and I discovered that I have an older version of Deny Hosts and would like to upgrade to the newest version that came out this month. How should I go about upgrading? Should I install right on top of the old installation? Will it delete my hosts.deny file? I wouldn't like that much. Let me know what you suggest.:confused:
     
  5. falko

    falko Super Moderator ISPConfig Developer

    If you are on Debian, do this:
    Code:
    update-rc.d denyhosts defaults
    Yes.

    No.
     
  6. Jcorrea920

    Jcorrea920 New Member

    I run Fedora Core 4

    I have Fedora Core 4 Perfect Setup.
    What would be the command for that.
    My concern is that my version is a little dated
    Code:
    [root@ccs02 ]# denyhosts.py --version
    DenyHosts version: 2.0
    
    Should I just wget the rpm from the red hat depository or mirrors and rpm -Uvh it would that ruin my style?:cool:
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Run
    Code:
    chkconfig --levels 235 denyhosts on
    I'd compile it again from the sources, as described in the tutorial.
     
  8. Jcorrea920

    Jcorrea920 New Member

    Problems Compiling new version from sources

    Falko,
    I installed the new version right on top of the older version without any problems, follows directions on the tutorial. Although the tutorial is designed for Debian I am installing it on Fedora Core 4. Now when I run:

    Code:
    [root@ccs02 denyhosts]# denyhosts.py --version
    DenyHosts version: 2.4b
    You can tell that the newest version is installed, although now I cannot get it to start:

    Code:
    [root@ccs02 denyhosts]# /etc/init.d/denyhosts start
    starting DenyHosts:    /usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg
    Can't read: /private/var/log/system.log
    [Errno 2] No such file or directory: '/private/var/log/system.log'
    Error deleting DenyHosts lock file: /var/lock/subsys/denyhosts
    [Errno 2] No such file or directory: '/var/lock/subsys/denyhosts'
    It seems to have problems fininding the log and lock files. I have a feeling that from version 2.0 to 2.4b the directories where these files live have changed causing my errors. Would like to get it running soon. What do you think?:(
     
  9. Jcorrea920

    Jcorrea920 New Member

    Problem Solved!

    Falko,
    This is what I did, and I don't recommend anyone from repeating this at all. I overwrote the denyhosts.cfg with the new 2.4b denyhost.cfg-dist file. Not the wisest of decisions. So to remedy the situation I just took the old denyhost.cfg-dist file from the 2.0 version replaced the working denyhosts.cfg file and added a parameter

    Code:
    DENY_THRESHOLD_RESTRICTED = 1
    Aparrently this did the trick. :cool:
    Thank you for your advice.
    Jorge
     

Share This Page