# Ebtables - for a bridge with kvm guest?

## dman777

I am going to make a KVM guest and use TUN networking. I will bridge the /dev/tun with the host's eth0 and make a br0. I was going to make some iptables rules to foward the packets to which ever host/guest host.

However, I stumbled upon ebtables. I have been reading about it, but I'm having a hard time understanding how it's use would apply to my situation. Alot of this is because I do not understand how ARP works in detail on a lowest level.

When I bridge the /dev/tun with eth0 to make a br0, did I just make a brouter?

Would ebtables be the best choice for my situation?

Is ebtables meant to replace iptables or do they work together?

----------

## Mad Merlin

You don't bridge /dev/tun, you create a tap device (like tap0) and assign it to the VM. Each VM gets their own tap device. I'm not entirely sure what you're hoping to accomplish with ebtables or iptables, but I'm pretty sure you don't need either (they're not necessary for a regular KVM setup with bridged networking).

To answer your other question, ebtables and iptables complement eachother. IIRC iptables doesn't look at bridged traffic, only ebtables does.

----------

## Hu

You can inspect bridged traffic via iptables.

----------

