Solved

Host.Allow, Host.Deny

Posted on 2007-11-21
6
2,142 Views
Last Modified: 2013-12-17
I want to refuse a whole set of IP from all services except sending email to us.
eg. IP 89.
In the host.allow file :
sendmail: 89.

In the host.deny file:
ALL: 89.

Is this correct ?

0
Comment
Question by:ChanYiuPong
6 Comments
 
LVL 10

Expert Comment

by:ssvl
ID: 20332903
Yes you are right


order is this:

1. Allow the connection if it matches a line in hosts.allow. End.

2. Deny the connection if it maches a ling in hosts.deny. End.

3. Allow the connection.

Since the default is to allow any connection that doesn't match,
0
 

Author Comment

by:ChanYiuPong
ID: 20333429
But will the ALL override the sendmail. Do you mean that when it saw sendmail in host.allow with the IP, then it will not check host.deny ?
0
 

Author Comment

by:ChanYiuPong
ID: 20333441
And I should use "sendmail" and not "email" or something like that ?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 3

Expert Comment

by:amirs80
ID: 20333541
--------/etc/hosts.allow--------
ALL : attack_ip : DENY
sendmail : attack_ip : DENY
smtp : attack_ip : DENY

please check this
0
 
LVL 3

Expert Comment

by:mediaonegraphics
ID: 20338630
I agree with ssvl. The allow is parsed before deny. Also just put a sendmail allow and not smtp as it is handled by the sendmail daemon.
0
 
LVL 10

Accepted Solution

by:
ssvl earned 500 total points
ID: 20345982
But will the ALL override the sendmail. Do you mean that when it saw sendmail in host.allow with the IP, then it will not check host.deny

Yes(it check and reject the 2nd occurrence.)



And I should use "sendmail" and not "email" or something like that ?

You should use a service name

FYR
http://www.softpanorama.org/Net/xinetd_and_tcp_wrappers.shtml
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now