OpenWrt Forum Archive

Topic: ipt_mac: How to get it going?

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there everyone, first off, a big thanks to everyone involved in openwrt. Next the problem.

I'm trying to get wifidog going on kamikaze and it turns out i need ipt_mac in order to support the iptables based rules mechanism in the wifidog gateway. The wifidog gatewaycan't find the ipt_mac library and neither can insmod.

I think I might need a ipt_mac.ko and an ipt_mac.so in order to do this. But I cant find them in the kamikaze build tree I have constructed.

Please can someone provide me with a bit of advice on how get ipt_mac working. I'm desperate :-( and don't really understand enough about the Linux kernel and libraries to solve the problem.


Cheers

Ben

Well, fixed my problem by building a new 7.07 tree, configuring all the ipt packages as built in. Wifidog can now see all the ipt stuff.


benevans wrote:

Hi there everyone, first off, a big thanks to everyone involved in openwrt. Next the problem.

I'm trying to get wifidog going on kamikaze and it turns out i need ipt_mac in order to support the iptables based rules mechanism in the wifidog gateway. The wifidog gatewaycan't find the ipt_mac library and neither can insmod.

I think I might need a ipt_mac.ko and an ipt_mac.so in order to do this. But I cant find them in the kamikaze build tree I have constructed.

Please can someone provide me with a bit of advice on how get ipt_mac working. I'm desperate :-( and don't really understand enough about the Linux kernel and libraries to solve the problem.


Cheers

Ben

This is still a problem for me, because I'm relying on the packaged distributions.  Specifically...

root@OpenWRT:~# ipkg files kmod-ipt-ipopt
Package kmod-ipt-ipopt (2.6.22.4-brcm47xx-1) is installed on root and has the following files:
/lib/modules/2.6.22.4/xt_mac.ko
/lib/modules/2.6.22.4/xt_CLASSIFY.ko
/lib/modules/2.6.22.4/ipt_ecn.ko
/lib/modules/2.6.22.4/xt_length.ko
/etc/modules.d/40-ipt-ipopt
/lib/modules/2.6.22.4/ipt_tos.ko
/lib/modules/2.6.22.4/xt_DSCP.ko
/lib/modules/2.6.22.4/xt_mark.ko
/lib/modules/2.6.22.4/ipt_ECN.ko
/lib/modules/2.6.22.4/xt_dscp.ko
/lib/modules/2.6.22.4/xt_MARK.ko
/lib/modules/2.6.22.4/ipt_ttl.ko
/lib/modules/2.6.22.4/ipt_time.ko
/lib/modules/2.6.22.4/ipt_TOS.ko
/lib/modules/2.6.22.4/ipt_TTL.ko

Done.

"lsmod" shows these installed - including "xt_mac" - but that's not the same as "ipt_mac" is it?  Is there a version of this package (or some other package) for 2.6.22.4-brcm47xx-1 which has ipt_mac compiled and installed?

Is there a version of this package (or some other package) for 2.6.22.4-brcm47xx-1 which has ipt_mac compiled and installed?

Problem Solved by upgrading to Kamikaze 7.09, and installing iptables-mod-ipopt, which pulls in kmod-ipt-ipopt as a dependency.  A quick test - adding an iptables rule which includes both mac-address matching and packet-marking - shows that I'm now ready to get wifidog up and running!

By the way, I still can't do this on my 7.07 (r8480) box because of old/new package conflicts:

r8480# ipkg install iptables-mod-ipopt
Installing iptables-mod-ipopt (1.3.8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/brcm47xx-2.6/packages/./iptables-mod-ipopt_1.3.8-1_mipsel.ipk
An error ocurred, return value: 1.
Collected errors:
Package iptables-mod-ipopt wants to install file /usr/lib/iptables/libipt_tcpmss.so
        But that file is already provided by package iptables

No big deal, I prefer the wifidog box to have a fresh installation of the newest release, anyway!

The discussion might have continued from here.