Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup ethernet bridge br0 that contains two interfaces eth0 and tap0

brctl addbr br0
brctl addif eth0
brctl addif tap0
ifconfig eth0 promisc up
ifconfig tap0 promisc up
ifconfig br0 netmask broadcast 

My default FORWARD chain policy is DROP

iptables -P FORWARD DROP

When i do not add following rule the traffic is not passing through bridge.

iptables -A FORWARD -p all -i br0 -j ACCEPT

As far as I understand iptables is only responsible for IP layer.

ebtables should be responsible for filtering traffic on the ethernet bridge.

So why do I have to add ACCEPT rule in iptable's FORWARD chain?

share|improve this question
up vote 7 down vote accepted

Because of the br-nf code that is available as a patch to linux 2.4 and used in linux 2.6:

The br-nf code makes bridged IP frames/packets go through the iptables chains. Ebtables filters on the Ethernet layer, while iptables only filters IP packets.

Since the traffic you are working is ip, iptables rules still apply because of br-nf passing the bridged packets to iptables.

This is a great resource to read about the interaction and this one details the functionality of br-nf code, including how to disable all or some of the functionalities (i.e. not passing bridge traffic to iptables).

share|improve this answer

You can disable this behaviour (letting iptables handling bridged packets) by typing:

echo "0" > /proc/sys/net/bridge/bridge-nf-call-iptables


share|improve this answer
Also, /proc/sys/net/bridge/bridge-nf-call-ip6tables – MV. Mar 10 '14 at 16:36

The ebtables chains won't see frames entering on a non-forwarding bridge port. Might take a look at this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.