TL-WR740N v4 - filtering bridged traffic

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
krzy
DD-WRT Novice


Joined: 25 Sep 2017
Posts: 1

PostPosted: Mon Sep 25, 2017 20:06    Post subject: TL-WR740N v4 - filtering bridged traffic Reply with quote
Hi

I'm trying to filter packets depending on the source port of a bridge. I did it using iptables, xt_physdev & bridge-nf:
Code:
insmod /lib/modules/3.6.11/kernel/net/netfilter/xt_physdev.ko
iptables -t nat -I PREROUTING -p tcp -d 192.168.0.1 -m physdev --physdev-in ath0 -j DROP
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables

I also assigned these commands as rc_startup and rc_firewall. It works until the router is restarted or new configuration is applied. The module is there and iptables are fine but the bridge-nf-call-iptables get overwritten with 0.

Is there any way to force the bridge-nf-call-iptables setting? Or any other way to filter these packets except for unbridging the interfaces?

I'm using TL-WR740N v4 with DD-WRT v24-sp2 (03/25/13) std.

Thanks in advance
Sponsor
Alozaros
DD-WRT Guru


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

PostPosted: Tue Sep 26, 2017 11:51    Post subject: Reply with quote
this router is very basic and some commands/variables might be stripped off and not working it has very small flash size 4MB as well very small ram size 32MB so to install anything on it, it will be very unstable...
_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Tue Sep 26, 2017 12:57    Post subject: Reply with quote
also firmware krzy using is from 2013???
nanvanu1
DD-WRT User


Joined: 30 Mar 2020
Posts: 61

PostPosted: Sat Nov 20, 2021 12:07    Post subject: Re: TL-WR740N v4 - filtering bridged traffic Reply with quote
krzy wrote:
Hi

I'm trying to filter packets depending on the source port of a bridge. I did it using iptables, xt_physdev & bridge-nf:
Code:
insmod /lib/modules/3.6.11/kernel/net/netfilter/xt_physdev.ko
iptables -t nat -I PREROUTING -p tcp -d 192.168.0.1 -m physdev --physdev-in ath0 -j DROP
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables

I also assigned these commands as rc_startup and rc_firewall. It works until the router is restarted or new configuration is applied. The module is there and iptables are fine but the bridge-nf-call-iptables get overwritten with 0.

Is there any way to force the bridge-nf-call-iptables setting? Or any other way to filter these packets except for unbridging the interfaces?

I'm using TL-WR740N v4 with DD-WRT v24-sp2 (03/25/13) std.

Thanks in advance

Can I ask if this software supports 40mhz?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12889
Location: Netherlands

PostPosted: Sat Nov 20, 2021 18:27    Post subject: Reply with quote
@nanavuna1 please stop spamming the forum and hijacking old threads.

See the forum guidelines with helpful pointers about how to research your router, where and what to download, where and how to post and many other helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Atheros WiSOC 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