From: "Michael D. Berger" <m.d.berger@ieee.org>
To: netfilter@lists.netfilter.org
Subject: RE: FW: block + kill connections
Date: Sun, 8 Jan 2006 19:26:33 -0500 [thread overview]
Message-ID: <000001c614b3$583c82e0$2801a8c0@MBRC40> (raw)
In-Reply-To: <200601081728.01152.rob0@gmx.co.uk>
> On Sunday 2006-January-08 17:01, Michael D. Berger wrote:
> > > > I have the same problem. I DROP in the INPUT chain, but
> > > > the connection stays up
>
> Likely so, insofar as your local process knows, as explained in my
> corrected reply to Bob Nichols. But ...
>
> > > > and receives more junk.
>
> No, not if you used a rule as the OP did, with -I to put it
> at the top
> of INPUT rules. If a packet matches the first DROP rule, that's where
> it stops. If a --state RELATED,ESTABLISHED -j ACCEPT rule
> precedes the
> DROP, yes, but that's a different issue.
>
> > > > I await admonition by those more knowledgeable than I.
>
> Does it make sense now?
[...]
It does make sense in theory, but not in practice. Below is an excerpt
from the results of an iptables-save (with numbers zeroed). As you can
see, the QUEUE preceeds any ACCEPT except for -i lo. The extra DROP is
my paranoia in case QUEUE doesn't work. The OUTPUT chain blocks some
output that previous communications indicated should not be there. I
note that when I say that there are packets in both directions after
the DROP I have confirmed this with tethereal, which I have running in
the background. Perhaps there are some timing issues that have not
been mentioned?
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:MDB-IN - [0:0]
[0:0] -A INPUT -j MDB-IN
[0:0] -A OUTPUT -j MDB-OUT
[0:0] -A MDB-IN -i lo -j ACCEPT
[0:0] -A MDB-IN -p tcp -m tcp --dport 80 -j QUEUE
[0:0] -A MDB-IN -p tcp -m tcp --dport 80 -j DROP
[0:0] -A MDB-IN -m state --state RELATED,ESTABLISHED -j ACCEPT
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
prev parent reply other threads:[~2006-01-09 0:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 23:01 FW: block + kill connections Michael D. Berger
2006-01-08 23:28 ` /dev/rob0
2006-01-09 0:26 ` Michael D. Berger [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='000001c614b3$583c82e0$2801a8c0@MBRC40' \
--to=m.d.berger@ieee.org \
--cc=netfilter@lists.netfilter.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.