Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13th September 2006, 09:22 PM
GL1800 Offline
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
Reply With Quote
  #2  
Old 13th September 2006, 09:46 PM
u-noneinc-s's Avatar
u-noneinc-s Offline
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
Reply With Quote
  #3  
Old 14th September 2006, 01:17 AM
a thing's Avatar
a thing Offline
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.
Reply With Quote
  #4  
Old 14th September 2006, 01:26 AM
u-noneinc-s's Avatar
u-noneinc-s Offline
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
Reply With Quote
  #5  
Old 14th September 2006, 02:55 AM
jhetrick62 Offline
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!
Reply With Quote
  #6  
Old 14th September 2006, 12:13 PM
GL1800 Offline
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
Reply With Quote
  #7  
Old 14th September 2006, 01:56 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
The hosts.allow file is case sensitive, so it's "sshd" not "SSHD".
Reply With Quote
  #8  
Old 14th September 2006, 01:58 PM
GL1800 Offline
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
Reply With Quote
Reply

Tags
hostsallow

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/hosts.allow and hosts.deny bigmacbb63 Security and Privacy 9 19th March 2010 10:22 PM
how to configure hosts.allow and hosts.deny nkjha Security and Privacy 4 19th January 2009 03:10 PM
FC3 Web Hosts Cymru Programming & Packaging 0 3rd August 2005 02:36 PM


Current GMT-time: 23:54 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat