Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hosts.deny and hosts.allow

Status
Not open for further replies.

Stinney

IS-IT--Management
Nov 29, 2004
2,031
US

If I have the following entry in my hosts.allow

%A in.telnetd : ALL
sshd : ALL


and I put the following entry in my hosts.deny

%A in.telnetd : 10.1.1.1

Will all users other than the user with IP address 10.1.1.1 be allowed access to the system through tty. And will 10.1.1.1. be denied through tty?

- Stinney

Favorite all too common vendor responses: "We've never seen this issue before." AND "No one's ever wanted to use it like that before.
 
init@server1> cat hosts.allow
#
# 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.
#
ALL:192.11.13.*
ALL:142.44.*.*
ALL:10.1.77.2
--------------------------------------------------------------------------------
init@server1> cat hosts.deny
# disable everything by default
ALL:ALL


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
The answer to your question is yes

try "man hosts.deny", "man hosts.allow", "man hosts_access"

The access control software consults two files. The search
stops at the first match:

o Access will be granted when a (daemon,client) pair
matches an entry in the /etc/hosts.allow file.

o Otherwise, access will be denied when a (daemon,client)
pair matches an entry in the /etc/hosts.deny file.

o Otherwise, access will be granted.


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top