From: "terry l. ridder" <artisticforge@gmail.com>
To: Sven-Haegar Koch <haegar@sdinet.de>
Cc: netfilter@lists.netfilter.org
Subject: Re: iptables leaking blocked ip addresses.
Date: Mon, 20 Jun 2005 18:04:16 -0500 [thread overview]
Message-ID: <49bf7d70506201604581683e0@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0506210019551.2906@mercury.sdinet.de>
hello;
reply below.
On 6/20/05, Sven-Haegar Koch <haegar@sdinet.de> wrote:
> On Mon, 20 Jun 2005, terry l. ridder wrote:
>
> > On 6/20/05, Sven-Haegar Koch <haegar@sdinet.de> wrote:
> >> On Mon, 20 Jun 2005, terry l. ridder wrote:
> >>
> >>>>> one example of the leak is below:
> >>>>>
> >>>>> 200.0.0.0/8 is dropped if the destination port is 25 (smtp).
> >>>>
> >>>> iptables-save(8) output, please. What you posted here doesn't tell us
> >>>> much.
> >>>>
> >>>
> >>> while i have reservations concerning posting the output of iptables-save
> >>> i have placed it on my web server:
> >>>
> >>> http://204.238.34.206/iptables-save-20jun2005.txt
> >>
> >> You are filtering in the nat table.
> >>
> >
> > yes, i am.
> >
> >> The nat table gets only the first packet from each connection (the one
> >> that would match -m state --state NEW).
> >>
> >
> > that is incorrect. the nat table is getting all packets.
>
> no, it's not.
>
no, that is incorrect.
>
> please have a look at "man iptables":
>
> nat:
> This table is consulted when a packet that creates a new
> connection is encountered. It consists of three built-ins:
> PREROUTING (for altering packets as soon as they come in),
> OUTPUT (for altering locally-generated packets before rout-
> ing), and POSTROUTING (for altering packets as they are
> about to go out).
>
there is no connection, netfilter or tcp.
any packets from 200.0.0.0/8 with destination port 25 (smtp) are
dropped, end of story. they are being dropped in nat prerouting.
they are not source nat'ed or destination nat'ed, they are dropped.
there is no connection, netfilter or tcp, ever established.
>
> Note the "is consulted when a packet that creates a new connection is
> encountered" - once for every new connection, not for all following
> packets.
>
again there is no connection. they are dropped before any connection,
netfilter or tcp, can be established.
>
> >> A retransmit from the blocked IP will not be a new connection,
> >> so it will pass through your rules.
> >
> > again this is incorrect.
>
see above, your logic is flawed.
>
> no - once a connection entry in /proc/net/ip_conntrack is created, a
> restransmit will match this entry even if it's a tcp-syn again.
>
> netfilter-connections are different from tcp connections.
>
it does not matter whether they are different or the same. there
is no connection, netfilter or tcp. the packets are being dropped in
nat prerouting before any type of connection can be established.
>
> >> And on your comment to another mail that you are not using connection
> >> tracking:
> >> This is wrong. If you have the nat table, you must have ip_conntrack
> >> loaded - and if its loaded it tracks your connections, even if you
> >> dont use -m state at all. There is no iptables nat without connection
> >> tracking.
> >
> > i may have been looking at the wrong window, i will check on that.
>
> thr textfile referenced your other mail contains IP_NF_CONNTRACK=m for
> your firewall - connection-tracking is at least built.
>
> And if you load the nat support (aka iptable_nat module) the ip_conntrack
> module will be loaded, too.
>
yes it it. so what?
from the firewall box:
Module Size Used by
ipt_LOG 7008 1
af_packet 21316 0
ipt_limit 2848 3
iptable_nat 27780 1
ip_conntrack 46928 1 iptable_nat
iptable_filter 3264 1
ip_tables 17712 4 ipt_LOG,ipt_limit,iptable_nat,iptable_filter
<snip>
i said i looked at the wrong window and i corrected that mistake.
>
> c'ya
> sven
>
--
terry l. ridder ><>
next prev parent reply other threads:[~2005-06-20 23:04 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-20 15:34 iptables leaking blocked ip addresses terry l. ridder
2005-06-20 15:48 ` Jan Engelhardt
2005-06-20 16:01 ` terry l. ridder
2005-06-20 15:55 ` /dev/rob0
2005-06-20 16:00 ` /dev/rob0
2005-06-20 16:17 ` terry l. ridder
2005-06-20 16:59 ` /dev/rob0
2005-06-20 17:20 ` terry l. ridder
2005-06-20 18:29 ` /dev/rob0
2005-06-20 19:36 ` terry l. ridder
2005-06-20 20:19 ` /dev/rob0
2005-06-21 12:57 ` Jan Engelhardt
2005-06-21 13:10 ` Jozsef Kadlecsik
2005-06-21 13:13 ` Jan Engelhardt
2005-06-21 13:39 ` Jozsef Kadlecsik
2005-06-21 18:05 ` Jan Engelhardt
2005-06-22 7:10 ` Jozsef Kadlecsik
2005-06-22 12:55 ` Jan Engelhardt
2005-06-22 13:16 ` Jozsef Kadlecsik
2005-06-20 20:47 ` terry l. ridder
2005-06-21 12:17 ` /dev/rob0
2005-06-21 14:36 ` terry l. ridder
2005-06-21 14:57 ` Joakim Axelsson
2005-06-20 18:50 ` Jan Engelhardt
2005-06-20 19:12 ` /dev/rob0
2005-06-20 19:30 ` Sven-Haegar Koch
2005-06-20 20:07 ` /dev/rob0
2005-06-20 20:23 ` terry l. ridder
2005-06-20 22:29 ` Sven-Haegar Koch
2005-06-20 23:04 ` terry l. ridder [this message]
2005-06-20 20:39 ` terry l. ridder
2005-06-21 7:11 ` Jozsef Kadlecsik
2005-06-21 7:21 ` terry l. ridder
2005-06-21 7:56 ` Jozsef Kadlecsik
2005-06-21 8:24 ` terry l. ridder
2005-06-21 9:36 ` Feizhou
2005-06-21 9:40 ` Jozsef Kadlecsik
2005-06-21 14:31 ` Cedric Blancher
2005-06-21 16:52 ` Feizhou
2005-06-21 3:24 ` Alistair Tonner
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=49bf7d70506201604581683e0@mail.gmail.com \
--to=artisticforge@gmail.com \
--cc=haegar@sdinet.de \
--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.