How to install iptables-mod-filter?

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
mosesofmason
DD-WRT Novice


Joined: 12 Aug 2017
Posts: 7

PostPosted: Wed Oct 06, 2021 13:20    Post subject: How to install iptables-mod-filter? Reply with quote
Hi,

I wanna install OpenWRT `iptables-mod-filter` package. I followed https://wiki.dd-wrt.com/wiki/index.php/Installing_Entware installed the `opkg` command. The installation is successful, but after running `opkg upgrade` command, it prompts there is no iptables-mod-filter.

How can I install this package on my router Question

Thanks in advance.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Wed Oct 06, 2021 16:51    Post subject: Reply with quote
I do not know what the relation is with OpenWRT, but with Entware you can install a lot of additional packages (see: https://bin.entware.net/armv7sf-k3.2/ )

The forum guidelines have many helpful pointers about how and where to post:
https://forum.dd-wrt.com/phpBB2/viewforum.php?f=44

As far as I know there are not even Entware packages for PPC.

Maybe you are posting in the wrong forum but if so I cannot move your post as you do not state your router model and build number as requested by the forum guidelines to get optimal support Sad

_________________
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
mosesofmason
DD-WRT Novice


Joined: 12 Aug 2017
Posts: 7

PostPosted: Wed Oct 06, 2021 18:36    Post subject: Reply with quote
My router is Netgear R6400v1.

I checked the link you give (https://bin.entware.net/armv7sf-k3.2/ ). It seems Entware does not have iptables-mod-filter package...

egc wrote:
I do not know what the relation is with OpenWRT, but with Entware you can install a lot of additional packages (see: https://bin.entware.net/armv7sf-k3.2/ )

The forum guidelines have many helpful pointers about how and where to post:
https://forum.dd-wrt.com/phpBB2/viewforum.php?f=44

As far as I know there are not even Entware packages for PPC.

Maybe you are posting in the wrong forum but if so I cannot move your post as you do not state your router model and build number as requested by the forum guidelines to get optimal support Sad
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Wed Oct 06, 2021 19:02    Post subject: Reply with quote
Moved your post to the right Broadcom forum.

Perhaps tell us what your problem is you are trying to solve so that we can think of a solution.

Oh and tell us what build you are running, not all builds can be recommended.

_________________
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
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14225
Location: Texas, USA

PostPosted: Wed Oct 06, 2021 19:04    Post subject: Reply with quote
What exact kernel or iptables module or functionality are you even looking for? That might help someone tell you where to look or how to enable it.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mosesofmason
DD-WRT Novice


Joined: 12 Aug 2017
Posts: 7

PostPosted: Wed Oct 06, 2021 19:40    Post subject: Reply with quote
I want to apply some iptables BPF bytecode rules, e.g.:
Code:
iptables -A INPUT -p udp --dport 53 -m bpf --bytecode "xx xx xx xx xx xx" -j DROP

Firmware: DD-WRT v3.0-r44715 std
Kernel: Linux 4.4.241 #1322 SMP armv7l
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Thu Oct 07, 2021 8:46    Post subject: Reply with quote
Although not related, but your build is old and deprecated and has security issues, so consider upgrading.

See the forum guidelines with helpful pointers about what and where to download and many more helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

About the subject, I think you need xt_bpf.ko maybe it is in the iptables or ip full Entware package

Otherwise you have to compile the module yourself, I can normally do that for you but I am currently on holiday.

_________________
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Thu Oct 07, 2021 17:23    Post subject: Reply with quote
I had internet today so fired up the old build system at home.
Attached xt_bpf.ko

Maybe it works maybe not or maybe it needs dependent modules but worth a try.

It is build for build 47510

Have fun



xt_bpf.zip
 Description:

Download
 Filename:  xt_bpf.zip
 Filesize:  993 Bytes
 Downloaded:  113 Time(s)


_________________
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
mosesofmason
DD-WRT Novice


Joined: 12 Aug 2017
Posts: 7

PostPosted: Fri Oct 08, 2021 12:19    Post subject: Reply with quote
Thanks. Please forgive me for asking what might be a dumb question, but I'm slightly unclear how to use the file. Embarassed Is there a detailed guide I can follow?

Best Regards.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Fri Oct 08, 2021 12:28    Post subject: Reply with quote
My mistake I thought someone using this knows how to do that.

Copy to permanent storage on the router, you can copy it to /tmp but then it is gone on reboot.

Let say you copy it to jffs.
Then insmod the module with
Code:
insmod /jffs/xt_bpf.ko


Of course unzip first Smile

_________________
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12893
Location: Netherlands

PostPosted: Fri Oct 08, 2021 12:49    Post subject: Reply with quote
I am not sure what your exact usage is, but using ipset could be an alternative.

Ipset has been added recently.

Documentation is a sticky in the Advanced Networking forum, link in my signature.

_________________
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   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum