LinHES Forums
http://forums.linhes.org/

syntax for hosts.allow/hosts.deny for sshd on R5.5
http://forums.linhes.org/viewtopic.php?f=6&t=19929
Page 1 of 1

Author:  graysky [ Sat Jun 06, 2009 8:50 am ]
Post subject:  syntax for hosts.allow/hosts.deny for sshd on R5.5

I've been reading on the arch wiki, that one needs to use /etc/hosts.allow and /etc/hosts.deny (see this article). I'd like to lock down my R5.5 box a bit by only allowing connections from my LAN IP ranges (say 192.168.0.2 - 192.168.0.5).

Can someone more experienced help me w/ this? When I add the line in /etc/hosts.deny that is suggested in the wiki article, I can't connect at all - this is after I added the exception in /etc/hosts.allow for my IP range for ssh.

Thanks for the help as always!

Example /etc/hosts.allow:
Code:
sshd: 192.168.0.2


Example /etc/hosts.deny:
Code:
ALL: ALL: DENY


I thought the hosts.allow would trump the hosts.deny but apparently not unless I have it setup incorrectly.

Author:  manicmike [ Mon Jun 08, 2009 5:19 pm ]
Post subject:  Re: syntax for hosts.allow/hosts.deny for sshd on R5.5

graysky wrote:
Example /etc/hosts.allow:
Code:
sshd: 192.168.0.2



Try

Code:
sshd : 192.168.0.2 : allow


Mike

P.S. Good article on this at http://closedsrc.org/_static/dn-articles/hosts_allow.html

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/