I need to implement a VLAN based transparent LAN service on Linux. Meaning I need to take configured VLAN and forward it directly to the specified port (all broadcast/multicast and unicast packets).
The trivial solution will be defining 1 to 1 bridge between the VLAN interface and specified port. The downside of this solution is that I becoming aware of all mac addresses on this tunnel. I'm running on an embedded device with limited mac table and want to avoid polluting mac table with devices from to networks I'm connecting.
I was trying to find some way to use ebtables for this task but seems like -o options of ebtables is useful only on the FORWARD chain which happens to be after mac learning. BROUTING chain is the one that I need but seems like I can't force the packet to egress on the specific interface from this point.
So, ebtables seems to be a dead end. Any other options? In the ideal world, I would prefer to have a TLS service based on any key and not only VLAN, but VLAN will do for now.