Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jaga Doe <jaga.doe@aol.com>
Cc: fw@strlen.de, netfilter@vger.kernel.org
Subject: Re: Redirect bridged traffic
Date: Thu, 6 Feb 2020 09:46:44 +0100	[thread overview]
Message-ID: <20200206084644.GN26952@breakpoint.cc> (raw)
In-Reply-To: <1291389071.153642.1580977922721@mail.yahoo.com>

Jaga Doe <jaga.doe@aol.com> wrote:
>       Hello,
> 
>    I have discovered a great mechanism of understanding what is happening, but setting nftrace flag. With that I can see the dataflow:
> 
> trace id 9af9e0b6 bridge tbrFilter cbrRedirect packet: iif "eth1" ether saddr f4:8c:50:fa:1f:e5 ether daddr 00:0c:29:15:7b:a0 ip saddr 192.168.0.21 ip daddr 192.168.0.123 ip dscp 0x04 ip ecn not-ect ip ttl 64 ip id 18388 ip protocol tcp ip length 60 tcp sport 40902 tcp dport 3000 tcp flags == syn tcp window 64240 
> trace id 9af9e0b6 bridge tbrFilter cbrRedirect rule log tcp dport 3000 meta pkttype set host ether daddr set 00:0c:29:15:7b:a0 counter packets 5 bytes 300 meta nftrace set 1 (verdict continue)
> trace id 9af9e0b6 bridge tbrFilter cbrRedirect verdict continue 
> trace id 9af9e0b6 bridge tbrFilter cbrRedirect policy accept 
> trace id 9af9e0b6 inet tlcRedirect clcRedirect packet: iif "br0" ether saddr f4:8c:50:fa:1f:e5 ether daddr 00:0c:29:15:7b:a0 ip saddr 192.168.0.21 ip daddr 192.168.0.123 ip dscp 0x04 ip ecn not-ect ip ttl 64 ip id 18388 ip protocol tcp ip length 60 tcp sport 40902 tcp dport 3000 tcp flags == syn tcp window 64240 
> trace id 9af9e0b6 inet tlcRedirect clcRedirect rule log tcp dport 3000 counter packets 5 bytes 300 redirect to :3000 (verdict drop)
> 
> I don't understand why the redirect rule is leading to the drop verdict.

Most simple explanation: your bridge doesn't have an ip address
(redirect is really just 'dnat to' with the primary address of the
 incoming interface).


  reply	other threads:[~2020-02-06  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1291389071.153642.1580977922721.ref@mail.yahoo.com>
2020-02-06  8:32 ` Redirect bridged traffic Jaga Doe
2020-02-06  8:46   ` Florian Westphal [this message]
2020-02-07 13:09     ` Jaga Doe
     [not found] <54308857.271223.1581007417521.ref@mail.yahoo.com>
2020-02-06 16:43 ` Jaga Doe
     [not found] <1561900038.672905.1580925866433.ref@mail.yahoo.com>
2020-02-05 18:04 ` Jaga Doe
2020-02-05 19:35   ` Florian Westphal

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=20200206084644.GN26952@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=jaga.doe@aol.com \
    --cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox