From: Bill Davidsen <davidsen@tmr.com>
To: Marc Perkel <mperkel@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How would I do this? (expert tricks) OT
Date: Wed, 27 Jun 2007 16:02:14 -0400 [thread overview]
Message-ID: <4682C246.1050609@tmr.com> (raw)
In-Reply-To: <456863.7892.qm@web52512.mail.re2.yahoo.com>
Marc Perkel wrote:
> I have a server with port 25 closed. I was to be able
> to run a script every time someone tries to connect to
> port 25, but from the outside the port remains closed.
> I need the script that I'm going to run get the IP
> address that tried to connect.
>
> I know it's off topic but it's part of an experiment
> to stop spam.
Put a rule in iptables to jump to a user table to do a log and drop. You
are doing it the wrong way, you want to set syslog to write the log
message to a FIFO and have a permanent running program reading it (I do
just this for other things).
Alternatively you can use redirect to send it to a program of your
choosing, which can run a script if you really want to. Beware that rate
limiting is desirable if you are going to start a process for ANY type
of attack packets.
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
prev parent reply other threads:[~2007-06-27 20:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 16:48 How would I do this? (expert tricks) OT Marc Perkel
2007-06-19 16:54 ` Jan Engelhardt
2007-06-19 17:14 ` Marc Perkel
2007-06-19 17:28 ` Jan Engelhardt
2007-06-19 19:36 ` Marc Perkel
2007-06-19 19:37 ` Jan Engelhardt
2007-06-27 20:02 ` Bill Davidsen [this message]
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=4682C246.1050609@tmr.com \
--to=davidsen@tmr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mperkel@yahoo.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