Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Mike Tubby" <mike.tubby@thorcom.co.uk>
To: Payal Rathod <payal-iptables@staticky.com>,
	netfilter@lists.netfilter.org
Subject: Re: finding out the culprit ip
Date: Thu, 4 Sep 2003 20:07:16 +0100	[thread overview]
Message-ID: <006b01c37317$c1cfd0d0$0a90a8c0@zen> (raw)
In-Reply-To: 20030905183420.GA1850@linux.local


----- Original Message ----- 
From: "Payal Rathod" <payal-iptables@staticky.com>
To: <netfilter@lists.netfilter.org>
Sent: Friday, September 05, 2003 7:34 PM
Subject: finding out the culprit ip


> Hi,
> A particular machine in my LAN is affected by SoBig virus and is sending
> mails to remote sites. I need to find that IP. The only lead I have is
> that it is that IP which is generating maximum SMTP traffic. How do I
> find it out and block it (or maybe clean it)?
>
> Any ideas on this?
> With warm regards,
> -Payal
>


Here's my ideas:

**Assumption** :- you have a private internal network connected via a Linux
box as a firewall using NAT to the outside world.

then:

a) log and block direct SMTP connections

Log direct connection attempts from your clients to the world:

$IPTABLES -A FORWARD -i $LAN_IFACE -p tcp --dport 25 -m limit --limit
20/minute --limit-burst 10 -j LOG --log-level DEBUG --log-prefix "Fw: Deny
SMTP:"

this will cause entries in syslog. And block your internal machines from
doing
direct SMTP connections to the outside world with something like this:

$IPTABLES -A FORWARD -i $LAN_IFACE -p tcp --dport 25 -j REJECT --reject-with
icmp-port-unreachable

where $LAN_IFACE is the name if your inside interface.


b) on your Linux box install a good quality SMTP agent, like Exim
(www.exim.org)
or god-forbid sendmail (if you must).


c) arrange so that all internal machines send their legitimate email via the
mail relay on box


d) now inspect the Exim/Sendmail logs - you should see only good emails here


e) inspect /var/log/messages you should see machines that try to email
direct
being logged here


f) you can test the blocking is working from a machine on the inside with
something
like:

        C:> telnet post.thorcom.com 25

If you get the SMTP greeting then the blocking is NOT working - if you get a
Connection Refused error message then the blocking IS working.



Mike



  reply	other threads:[~2003-09-04 19:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-05 18:34 finding out the culprit ip Payal Rathod
2003-09-04 19:07 ` Mike Tubby [this message]
2003-09-04 15:49   ` Jason
2003-09-04 19:49   ` Lane Powers
2003-09-04 21:13 ` Tom Marshall
2003-09-05 11:47 ` Dharmendra.T
2003-09-05 11:57 ` Dharmendra.T
2003-09-05 13:21   ` Mark Vevers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='006b01c37317$c1cfd0d0$0a90a8c0@zen' \
    --to=mike.tubby@thorcom.co.uk \
    --cc=netfilter@lists.netfilter.org \
    --cc=payal-iptables@staticky.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox