Skip to content

Instantly share code, notes, and snippets.

@nanosonde
nanosonde / bridge.sh
Last active September 17, 2026 15:38
OpenWRT 25.x NFT Filtering Bridge with DNS interception
# 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