This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Place this content in a new file /etc/nftables.d/bridge.sh | |
| . /lib/functions/network.sh | |
| network_flush_cache | |
| network_find_wan NET_IF | |
| network_get_device NET_DEV "${NET_IF}" | |
| NET_MAC="$(ubus -S call network.device status \ | |
| "{'name':'${NET_DEV}'}" | jsonfilter -e "$['macaddr']")" | |
| nft add table bridge filter |