R9000 - nftables bridge filtering not working (r63355)

Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware
Author Message
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Mon Feb 02, 2026 12:28    Post subject: R9000 - nftables bridge filtering not working (r63355) Reply with quote
Hi,

I've upgraded my R9000 to r63355 (full reset) and my rules to block DHCP from another router are not working.

These are the ebtables rules i had working on previous version (r55109):
ebtables -A INPUT --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 --log-level notice --log-prefix "EBDROP " --log-ip -j CONTINUE
ebtables -A INPUT --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 -j DROP
ebtables -A FORWARD --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 --log-level notice --log-prefix "EBDROP " --log-ip -j CONTINUE
ebtables -A FORWARD --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 -j DROP
ebtables -A OUTPUT --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 --log-level notice --log-prefix "EBDROP " --log-ip -j CONTINUE
ebtables -A OUTPUT --protocol ipv4 --ip-proto udp -s 40:AE:30:96:BB:50 --ip-dport 67:68 -j DROP

These are the nft equivalent rules i have now on r63355:
nft add chain bridge filter INPUT { type filter hook input priority -10 \; }
nft add chain bridge filter OUTPUT { type filter hook output priority -10 \; }
nft add chain bridge filter FORWARD { type filter hook forward priority -10 \; }
nft add chain bridge filter logdrop
nft add rule bridge filter logdrop ct state invalid log prefix "EBDROP " counter drop
nft add rule bridge filter INPUT ether saddr 40:AE:30:96:BB:50 udp dport 67-68 counter jump logdrop
nft add rule bridge filter OUTPUT ether saddr 40:AE:30:96:BB:50 udp dport 67-68 counter jump logdrop
nft add rule bridge filter FORWARD ether saddr 40:AE:30:96:BB:50 udp dport 67-68 counter jump logdrop

Anyone knows what might be wrong?

Should i open a bug?

Thank you.

_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)


Last edited by mvrk on Mon Feb 02, 2026 20:06; edited 1 time in total
Sponsor
Zyxx
DD-WRT Guru


Joined: 28 Dec 2018
Posts: 1110

PostPosted: Mon Feb 02, 2026 12:53    Post subject: Reply with quote
I'd go ahead and try r63600. In your version I wasn't even able to get a simple masquerade iptables/nftables rule to work.

In r63600 my few iptable rules started to work again, I did not even have to fiddle with nftables.
Something I wasnt able to do since early december releases.

Good luck!
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Mon Feb 02, 2026 13:12    Post subject: Reply with quote
Zyxx wrote:
I'd go ahead and try r63600. In your version I wasn't even able to get a simple masquerade iptables/nftables rule to work.

In r63600 my few iptable rules started to work again, I did not even have to fiddle with nftables.
Something I wasnt able to do since early december releases.

Good luck!


For the NAT masquerade issue i found the fix : https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=339466

I will try r63600 to see if bridge filtering works. Thank you.

_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Mon Feb 02, 2026 14:58    Post subject: Reply with quote
issue continues on r63600, it doesn't block the dhcp requests, and all counters are 0 on the bridge filter rules: counter packets 0 bytes 0
_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Mon Feb 02, 2026 19:34    Post subject: Reply with quote
Found the issue:

sysctl net.bridge.bridge-nf-call-iptables
net.bridge.bridge-nf-call-iptables = 0


Fixed with:
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables

_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7417
Location: UK, London, just across the river..

PostPosted: Tue Feb 03, 2026 11:04    Post subject: Reply with quote
hmm interesting case.. i would never use ebtables unless is a must
in general those request will be filtered and not cause issues but depends from case and use
you can block mac addresses and ports and ect via iptables rules
but on bridge you use bridge rules and than again depends from scenarios too and not needed
What i do in my case i just block those macs on WAN if i have more routers on the same layer
and it works as WAN port can receive/filter layer 2&3 and still using iptables rules…
ebtables rules can degrade router performance same for brrules…but you know your case…
10x anyway for the hint

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 66631 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPNCli
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 -OpenWRT Kong 25.12
Netgear XR500 -DD-WRT 66631 GTW/SmDNS-Quic,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT r66631 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x4VLAN,IPset Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 66506 Gateway/SmDNS-Quic,AD-Block,AP Isolation,Firewall,Forced DNS,Vanilla
Dynalink DL-WRX36-DDWRT 66557
Broadcom
Netgear R7000 --DD-WRT 66631 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Tue Feb 03, 2026 16:18    Post subject: Reply with quote
In my scenario, i have 2 routers (Internet ADSL Router and DD-WRT LAB Router) both are on the same lan.

I want to keep DHCP on the ADSL router because my family connect using it's WIFI, if i only had DHCP on my lab router then if it was down due to some maintenance/changes my family couldn't connect.

But i also want that any device connected to my dd-wrt lab router receive DHCP packets only from the DHCP on the dd-wrt lab router, specially because of TFTP setup (which is not possible on my adsl router).

I tried a few years ago to block the DHCP requests via iptables, but i was not very successfully, then i found out about ebtables and worked great.

Though i was not aware that ebtables can degrade performance.

_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
mvrk
DD-WRT User


Joined: 20 Oct 2009
Posts: 72
Location: Czech Republic

PostPosted: Tue Feb 03, 2026 20:17    Post subject: Reply with quote
After a few more tests, i'm thinking now that on older versions of dd-wrt a simple iptables ip rule was not blocking DHCP request because net.bridge.bridge-nf-call-iptables was also probably 0,
so packets crossing a bridge were never sent to iptables,
but then when i discovered about ebtables, and created an ebtables rule probably activated that net.bridge.bridge-nf-call-iptables, and now on newer versions probably doesn't.

Anyway, setting net.bridge.bridge-nf-call-iptables to 1 and adding the rule:
nft add rule ip filter FORWARD ip saddr OTHER_ROUTER_IP udp sport 67 udp dport 68 counter jump logdrop

works fine, blocks the DHCP requests and no need to create/use bridge table rules.

_________________
Netgear R9000
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS, VAPs, SFE off
Firewall / NAT / VLANs / BGP
DNS / DHCP / DDNS / SSH / NTP / Syslog / Cron
Wireguard / OpenVPN
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: Vanilla, N/G, VHT40, TQAM, LDPC, Disassoc Low ACK, Shrt Preamble/GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disass Low ACK, Shrt Preamble/GI, Singl Beamforming, Airt Fairness, WMM, ACK Time 900, WPA2(AES), WPA2 ENTP(AES)

TP-Link Archer C7 v2
DD-WRT v3.0-r63355 std (01/14/26)
Router mode, AP, WDS Station, VAPs, SFE off
SSH / NTP / Syslog / Cron / BGP
USB Storage / Entware (LIGHTTPD & TFTPD)
2.4GHz: N/G, VHT40, LDPC, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
5GHz: DD-WRT, AC/N, VHT80, Disassoc Low ACK, Short Preamble, Short GI, Airtime Fairness, WMM, ACK Timing 900, WPA2 (AES), WPA2 ENTP (AES)
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7417
Location: UK, London, just across the river..

PostPosted: Wed Feb 04, 2026 7:39    Post subject: Reply with quote
hmmm on my R7000 that is on the same LAN with ISP router and on the ISP router there ware clients that i dont want to communicate, nor to see any of its DHCP with my R7000, i used this rule...

iptables -I INPUT -i vlan2 -m mac --mac-source 10:b8:2a:60:c4:70 -j REJECT

in my case vlan2 is my WAN interface... you can tailor this rule to your needs...

the other ebtables rule i have used in the past was to filter the communication inside the bridge that is actually wlan1 my WIFI

ebtables -t broute -I BROUTING -p IPv4 -i wlan1 --ip-dst 192.168.1.2/24 -j DROP

and in this scenario i wanted to make sure that wifi bridge is used only by those subnets that are permitted and all the others are blocked...

currently im still on older build 62606 and haven't played with nftables yet.. and yes
net.bridge.bridge-nf-call-iptables will not be present on the older builds as nftables ware recently introduced, I will check later if it is available on the last build 63600
you can check administration>sysctl for it...and can set it either there or via nvram (if gui doesn't want to keep the new value)

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 66631 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPNCli
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 -OpenWRT Kong 25.12
Netgear XR500 -DD-WRT 66631 GTW/SmDNS-Quic,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT r66631 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x4VLAN,IPset Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 66506 Gateway/SmDNS-Quic,AD-Block,AP Isolation,Firewall,Forced DNS,Vanilla
Dynalink DL-WRX36-DDWRT 66557
Broadcom
Netgear R7000 --DD-WRT 66631 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 4015
Location: Germany

PostPosted: Wed Feb 04, 2026 9:11    Post subject: Reply with quote
Guys, iptables can only handle layer 3, which is why there is also ebtables (Ethernet bridge tables) for layer 2.

nftables can do both...

_________________
Quickstart guides:

use Pi-Hole as simple DNS-Server with DD-WRT

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.6 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum