Hello!
I'm experimenting with nftables bridge filtering. I want to intercept some bridge ethernet packets and route into local service. I did some research on this in several sources. I'm trying to setup a simple nftables intercept rule.
I use this OpenWRT Docs page as example: https://openwrt.org/docs/guide-user/firewall/fw3_configurations/bridge
I do:
nft add table bridge filter
nft add chain bridge filter prerouting { type filter hook prerouting priority 0\; }
nft add rule bridge filter prerouting meta l4proto { tcp, udp } th dport 53 log
and get
Error: Could not process rule: No such file or directory
nft add rule bridge filter prerouting meta l4proto { tcp, udp } th dport 53 log
^^^^^^^^^^^^
I tried other syntax (inspired by this) with same result:
nft add rule bridge filter prerouting tcp dport 53 log
Error: Could not process rule: No such file or directory
nft add rule bridge filter prerouting tcp dport 53 log
^^^^^^^^^
I'm using OpenWRT 22.03.7-x86-64-generic-squashfs-combined in a VirtualBox VM
I tried the same commands on an AntiX Linux VM, and got no errors.
I suppose, there might be some kernel configuration issues with my OpenWRT. But I din't change any settings since installation, except setting up bridge device in /etc/config/network.
As per above OpenWRT Docs page, I tried to execute
lsmod | grep -e bridge
and got empty result
Thanks for any help.