mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Santiago Garcia Mantinan <netfilter-devel@manty.net>
To: Chris Rankin <rankincj@yahoo.com>
Cc: netfilter-devel@lists.netfilter.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.12: connection tracking broken?
Date: Sat, 18 Jun 2005 21:25:41 +0200	[thread overview]
Message-ID: <20050618192541.GA27439@pul.manty.net> (raw)
In-Reply-To: <20050618124359.39052.qmail@web52901.mail.yahoo.com>

> I have just tried upgrading my firewall to 2.6.12, but neither of the
> following rules in my FORWARD table was allowing return traffic:

This seems to happen only if you use bridge interfaces, as you said it is
something related to connection tracking otherwise netfilter seems to work
ok.

I have sent this right now to the bridge list, I'm copying it here so that
more info is available about this bug.


---------------------------------------------------------------------------
Hi!

As noted by Chris Rankin on a mail to netfilter-devel and to the
linux-kernel mailing list (subject: 2.6.12: connection tracking broken?),
there is a problem with the connection tracking of iptables when one of the
interfaces is a bridge.

On my tests here I have setup a connection between two machines using a real
interface (eth0) and then the same setup using a bridge interface (br0) to
which that interface had been enslaved:

The setup had modules ipt_LOG, ipt_state, ip_conntrack, iptable_filter and
ip_tables loaded, as well as bridge and I loaded a simple set of rules,
exactly the same set each time but changing the interface name, I'll just
write the setup for br0, but the setup was the same one for eth0 with that
little change:

iptables -A INPUT -i br0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -i br0 -j LOG --log-level 7 --log-prefix "NOTESTABLISHED "
iptables -A INPUT -i br0 -j DROP

this set of rules with eth0 on them worked ok when I tried to telnet a port
on a remote machine (192.168.0.1) from the local machine (192.168.0.2),
concretelly the test was a telnet to port 22 where the ssh daemon was
listening. However, when I did the same test using the br0 interface, I got
this logged:

NOTESTABLISHED IN=br0 OUT= PHYSIN=eth0
MAC=00:50:ba:54:39:8c:00:48:54:6a:58:90:08:00 SRC=192.168.0.1
DST=192.168.0.2 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=22
DPT=48448 WINDOW=5792 RES=0x00 ACK SYN URGP=0 

doing a grep for 192.168.0.1 on /proc/net/ip_conntrack* returned nothing,
however netstat showed the connection:
tcp        0      1 192.168.0.2:48448       192.168.0.1:22          SYN_SENT

I believe that iptables works ok execept for the connection tracking, but I
have not tested this fully.

Machines were I tried this were a Pentium III and an AMD K6II both with
kernel 2.6.12, I know this is happening at least from RC5, but at that time
I didn't have the time to check and I thought it was due to the kernel
bridge firewall being loaded, the tests I did today with 2.6.12 final didn't
have the kernel bridge firewall, just normal bridge and normal iptables.

If you need any other info to check this just ask for it.

Regards...
-- 
Manty/BestiaTester -> http://manty.net

  parent reply	other threads:[~2005-06-18 19:26 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 12:43 Chris Rankin
2005-06-18 14:57 ` Jan Engelhardt
2005-06-18 15:14   ` Tobias DiPasquale
2005-06-18 17:16     ` Chris Rankin
2005-06-20  7:19   ` Harald Welte
2005-06-18 19:25 ` Santiago Garcia Mantinan [this message]
2005-06-18 22:12   ` Santiago Garcia Mantinan
2005-06-19 13:05     ` Patrick McHardy
2005-06-20  0:05       ` Herbert Xu
2005-06-20  0:18         ` David S. Miller
2005-06-20  0:50           ` Herbert Xu
2005-06-20  2:45         ` Patrick McHardy
2005-06-20  6:39           ` Bart De Schuymer
2005-06-20 12:15             ` Patrick McHardy
2005-06-20 18:46               ` Bart De Schuymer
2005-06-20 18:57                 ` Phil Oester
2005-06-20 23:27                   ` Patrick McHardy
2005-06-20 23:22                 ` Patrick McHardy
2005-06-21  7:19                   ` Bart De Schuymer
2005-06-21 15:16                     ` Patrick McHardy
2005-06-21 20:46                       ` Bart De Schuymer
2005-06-21 21:23                         ` Chris Wright
2005-06-21 22:32                           ` David S. Miller
2005-06-21 22:34                             ` Chris Wright
2005-06-22  0:26                             ` Patrick McHardy
2005-06-22 22:58                               ` Chris Rankin
2005-06-23 17:42                                 ` Patrick McHardy
2005-06-23 19:49                                   ` David S. Miller
2005-06-24  8:39                                     ` Patrick McHardy
2005-06-28 23:07                                       ` David S. Miller
2005-06-22  0:45                         ` Patrick McHardy
2005-06-22 21:49                       ` Herbert Xu
2005-06-23  0:02                         ` Carl-Daniel Hailfinger
2005-06-23  3:31                           ` Patrick McHardy
2005-06-23  6:27                           ` [Ebtables-devel] " Bart De Schuymer
2005-06-23  3:26                         ` Patrick McHardy
2005-06-23  3:53                           ` Herbert Xu
2005-06-23  6:23                         ` Bart De Schuymer
2005-06-27  8:32                           ` Harald Welte
2005-06-27 11:46                             ` Patrick McHardy

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=20050618192541.GA27439@pul.manty.net \
    --to=netfilter-devel@manty.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rankincj@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

all inboxes | Powered by JetHome®