Discussion:
[Pkg-exim4-users] Probe, every 27 mins, from one IP addr - how to block?
Ron Leach
2016-03-02 15:28:29 UTC
Permalink
List, good afternoon,

I run an Exim4 system using Debian oldstable (Wheezy) and, in the
mainlog, *every* 27 minutes, is:
no host name found for IP address <ipv4>
(where <ipv4> is one, specific, IP address, every time).

whois indicates that the IP address is that of a commercial entity in
another continent, with whom we have no connection as far as we know.
There is no other type of log entry related to this IP address,
there is no log of either an attempted send to one of our users, nor
any attempt to relay elsewhere. The logged entry is every 27 minutes
irrespective of any other incoming messages, of which there are
relatively few; this is not a high volume MTA.

Archived comments on various exim lists suggest that this log entry is
merely a 'warning', and caused by the sender having no rDNS entry.
Nevertheless, despite the entry being only a warning, and despite the
- apparent - absence of any other attempt to send a message either to
us or to relay elsewhere or, even, to send a (detectedly) malformed
message, or attempt to authorise, its continuing, regular, appearance
is puzzling. I've decided to block that IP.

We use the single file of exim conf which includes a section for
defining a local list of IP addresses that should be blocked. The
list should be in the file
/etc/exim4/local_host_blacklist
which I've created and contains the single entry of that logged IP
address.

On updating the conf and restarting exim

# update-exim4.conf
- which did not report any config problems
# service exim restart

I was disappointed to see that the suspect IP is still being logged as
'no host name' every 27 minutes.

Is there any way I can prevent this IP address reaching exim?

I would be interested to understand better what type(s) of incoming
signal could trigger this log entry, and whether the entry can mean
anything other than absent rDNS.

Any insights would be much appreciated,

regards, Ron
Iain Mac Donald
2016-03-02 15:55:45 UTC
Permalink
On Wed, 02 Mar 2016 15:28:29 +0000
Post by Ron Leach
Is there any way I can prevent this IP address reaching exim?
IPTables?
Something like this:
https://www.rosehosting.com/blog/blocking-abusive-ip-addresses-using-iptables-firewall-in-debianubuntu/

You could also use /etc/hosts.deny but it is a little less flexible:
https://jamalahmed.wordpress.com/2010/03/19/using-etchosts-allow-and-etchosts-deny-to-secure-unix/

Regards,
Iain.
J G Miller
2016-03-02 16:19:56 UTC
Permalink
At 15:55h, on Wednesday, March 02, 2016,
in message <***@flora.coachhouse>,
on the subject of "Re: [Pkg-exim4-users] Probe, every 27 mins, from one IP addr - how to block?", you wrote -
Post by Iain Mac Donald
IPTables?
https://www.rosehosting.com/blog/blocking-abusive-ip-addresses-using-iptables-firewall-in-debianubuntu/
Yes that would help prevent connections and onc could also consider using fail2ban with a hand
crafted regexp.
Post by Iain Mac Donald
https://jamalahmed.wordpress.com/2010/03/19/using-etchosts-allow-and-etchosts-deny-to-secure-unix/
Which assumes that exim is built with tcpwrappers support, which *is* the case
on Debian, but possibly not on other distributions, eg Arch Linux
"Jul 16, 2011 - tcp_wrappers support is being dropped from all package".)

See Q0705 at <http://doc.dvgu.ru/admin/exim/FAQ_7.html> for an example
of tcpwrapper contol configuration.

Incidentally in view of the "just a probe" nature of this intrusion, has Ron Leach
checked his logs to see if this remote host is in fact doing a port scan to get
information on all ports which are open on his machine for a potential attack?
basti
2016-03-02 16:12:18 UTC
Permalink
You can also try fail2ban
(https://github.com/fail2ban/fail2ban/tree/master/config/filter.d) there
is a "basic" exim filter.
Build your own filter-regex in a new jail for your type of error and set
there specific bantime and findtime ...

So you dont need to maintenance your ip list.

Regards
<http://www.dict.cc/english-german/maintenance.html>
Post by Iain Mac Donald
On Wed, 02 Mar 2016 15:28:29 +0000
Post by Ron Leach
Is there any way I can prevent this IP address reaching exim?
IPTables?
https://www.rosehosting.com/blog/blocking-abusive-ip-addresses-using-iptables-firewall-in-debianubuntu/
https://jamalahmed.wordpress.com/2010/03/19/using-etchosts-allow-and-etchosts-deny-to-secure-unix/
Regards,
Iain.
_______________________________________________
Pkg-exim4-users mailing list
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exim4-users
Loading...