Score:0

Forwarding ethernet frames to tap interface using ebtables / ebtables missing broute table

in flag

I spend much time today figuring out how to do this, but I could not find a solution. In my mind it should be possible. I'm trying to setup the following setup:

setup overview

Reading the tap1 interface and forwarding to enp0s3 using Go should work without any problems... I hope. If I do a ping 10.0.0.10 -I tap1 I can see the ether frames in the Go application. (I currently use https://github.com/songgao/water but I will probably migrate to https://github.com/mdlayher/packet if I get this to work)

The problem I have is forwarding the etherframes from enp0s8 to the tap1 interface. I have tried multiple commands but it does not work. I tried using iptables:

iptables -A FORWARD -i enp0s8 -o tap1 -j ACCEPT and similar commands.

I then found this question: Tap0 not receiving traffic where Sherwood Wang said the following:

If you want to force tap0 to recieve its own IP packets, you may use ebtables. When packets are DROPed in the ethernet layer of tap0 at broute table, these packets go into the the IP layer of tap0 instead of eth0. See also: http://ebtables.sourceforge.net/examples/real.html#example1

What sounds exactly what I need. I think I found the command he means here: https://ebtables.netfilter.org/examples/basic.html#ex_brouter

ebtables -t broute -A BROUTING -p ipv4 -i tap1 --ip-dst 172.16.1.1 -j DROP

However I get the following error: ebtables: No chain/target/match by that name. If I look at man ebtables I don't see the broute table mentioned. I do see it here though https://linux.die.net/man/8/ebtables. So am I missing something?

I also tried ebtables -A FORWARD -i enp0s8 -o tap1 -j ACCEPT from https://www.linuxquestions.org/questions/linux-networking-3/ebtables-to-setup-forwarding-and-ethernet-level-nat-4175538316/ but that doesn't work either.

Score:1
mz flag

It's been a few months, you may or may not still be having this issue, or others may stumble across this post in the future. I ran into this same situation. it appears that broute isn't built into the current version of ebtables. use the command ebtables-legacy with the same options (i am using accept as opposed to drop) it will add the rule to the broute table and function as expected

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.