Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Arnaud MARTIN <arnaud@bsa.net.my>
To: netfilter@vger.kernel.org
Subject: ebtables brouting of all tcp and udp traffic
Date: Tue, 15 Jul 2008 15:26:21 +0800	[thread overview]
Message-ID: <200807151526.21545.arnaud@bsa.net.my> (raw)

I have created a bridge on my server and I would like to bridge only the protocols other than tcp and udp. For these protocols I have an application running on the box that is listening in promiscuous mode to catch these packets. 
The application is only interested in the packets not directly destined to the server itself.

I'm using the scrpt below to realize that:

MAC_OF_BR0=<MAC of my bridge>

ebtables -t broute --flush
ebtables -t broute -A BROUTING -d $MAC_OF_BR0 -p ipv4 -j redirect --redirect-target DROP
ebtables -t broute -A BROUTING -p ipv4 --ip-proto tcp -i eth0 -j DROP
ebtables -t broute -A BROUTING -p ipv4 --ip-proto tcp -i eth1 -j DROP
ebtables -t broute -A BROUTING -p ipv4 --ip-proto udp -i eth0 -j DROP
ebtables -t broute -A BROUTING -p ipv4 --ip-proto udp -i eth1 -j DROP

So far the brouting seems to work but as soon as I run this script, I'm not able to ssh to the server anymore. Also my application running on the server, has to connect to other server in the same configuration but it is not able to do it anymore. This is the reason why I added the 2nd line in the script but it doesn't work.

To sum up I need to broute all udp and tcp traffic, except the traffic destined to the bridge IP/interface.
How can I do it ?

             reply	other threads:[~2008-07-15  7:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15  7:26 Arnaud MARTIN [this message]
2008-07-15  9:25 ` ebtables brouting of all tcp and udp traffic Arnaud MARTIN

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=200807151526.21545.arnaud@bsa.net.my \
    --to=arnaud@bsa.net.my \
    --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