 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

13th September 2006, 09:22 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Location: Atlanta, Ga
Age: 77
Posts: 122

|
|
|
hosts.allow
OK, I read and read, and try this and that, not working yet. I want to ALLOW a specific IP address access to my ssh. I am running denyhosts.py normally, and I don't want to get rid of it. I have to put that IP addy in /etc/hosts.allow to let him in. However, I can't get it right, as root keeps getting a denyhosts report that he has been banned from the server. What's the thing I don't understand, here, please?
__________________
Ray -- ray at raymondjones.net www.raymondjones.net
|

13th September 2006, 09:46 PM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862

|
|
It might help if you posted your hosts.allow so someone could see if it was correct, but here's mine (secured of course)
Code:
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
sshd : 127.0.0.1 xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
. I don't use denyhosts, so I can't say whether or not the 2 are compatable. I use /etc/hosts.deny instead
Code:
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd : ALL
.With this, I believe the deny script is read first, and sshd : ALL denies everyone ssh access unless specifically permitted by /etc/hosts.allow
__________________
Mark N.
Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p
411874 Get Counted
|

14th September 2006, 01:17 AM
|
 |
Registered User
|
|
Join Date: May 2005
Posts: 288

|
|
^IIRC everything not specified in hosts.allow is blocked by default.
The problem isn't hosts.allow, it's that the SSH configuration is set to deny logging in as root. It should do that, it makes it more secure. Without being able to log in directly as root via SSH, you have to use whatever authentication is set up for SSH and then use su, so you have to know two passwords.
If you're not using public key cryptography for SSH right now, you should start. I made a how to on that here.
|

14th September 2006, 01:26 AM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: Wine Country, California
Posts: 2,862

|
|
|
a thing: Thanks for the clarification.
GL1800: is the user trying to log in as root or as his_username?
__________________
Mark N.
Perpetual Newbie
--
I wanted to proclaim myself "The Typo King" but there's way too much competion. :p
411874 Get Counted
|

14th September 2006, 02:55 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875

|
|
|
I do run denyhosts. I believe that u-noneinc-s is correct. If you have ALL: sshd in hosts.deny, then all hosts not listed in hosts.allow will be locked out. The hosts.allow file if read first. If a match is found, then it stops and allows the host. If no match is found, then the hosts.deny is found. If no match is found there, the host is allowed access unless such as root, it is specifically banned in the sshd_config file which it is by defuault.
Denyhosts will add a host to the hosts.deny list when they have failed to log-in correctly "x" number of times within a short period of time or possibly "x" number of times before a successful login. I believe that I have mine set for 3 bad attempts in 10 minutes. If a successful one comes in, it then resets the counter.
This blocks the script-kiddies pretty well as long as you have strong passwords.
I like it.
Jeff
__________________
Registered Linux User #411071
If at first you don't suceed, read the man page again!
|

14th September 2006, 12:13 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Location: Atlanta, Ga
Age: 77
Posts: 122

|
|
|
Yes, the man page makes clear it reads .allow first. If found, no need to read .deny. The user is not trying to log in as root, but as a user. How's this?
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
SSHD : 24.99.XX.XX
__________________
Ray -- ray at raymondjones.net www.raymondjones.net
|

14th September 2006, 01:56 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Finland
Posts: 5,076

|
|
|
The hosts.allow file is case sensitive, so it's "sshd" not "SSHD".
|

14th September 2006, 01:58 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Location: Atlanta, Ga
Age: 77
Posts: 122

|
|
|
AHHHH!!! OK, I corrected that, and thank you!
__________________
Ray -- ray at raymondjones.net www.raymondjones.net
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 23:54 (Tuesday, 21-05-2013)
|
|
 |
 |
 |
 |
|
|