HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   DenyHosts stop problem (http://www.howtoforge.com/forums/showthread.php?t=3938)

Jcorrea920 26th April 2006 20:25

DenyHosts stop problem
 
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?:o

falko 26th April 2006 22:51

Do you get any error messages when you restart DenyHosts?

Jcorrea920 26th April 2006 23:47

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

Jcorrea920 27th April 2006 02:31

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:

falko 27th April 2006 12:42

Quote:

Originally Posted by Jcorrea920
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

If you are on Debian, do this:
Code:

update-rc.d denyhosts defaults
Quote:

How should I go about upgrading? Should I install right on top of the old installation?
Yes.

Quote:

Will it delete my hosts.deny file?
No.

Jcorrea920 28th April 2006 03:45

I run Fedora Core 4
 
Quote:

If you are on Debian, do this:

Code:
update-rc.d denyhosts defaults
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:

falko 28th April 2006 14:12

Quote:

Originally Posted by Jcorrea920
I have Fedora Core 4 Perfect Setup.
What would be the command for that.

Run
Code:

chkconfig --levels 235 denyhosts on
Quote:

Originally Posted by Jcorrea920
Should I just wget the rpm from the red hat depository or mirrors and rpm -Uvh it would that ruin my style?:cool:

I'd compile it again from the sources, as described in the tutorial.

Jcorrea920 28th April 2006 21:45

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?:(

Jcorrea920 28th April 2006 22:10

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


All times are GMT +2. The time now is 08:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.