coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
522 stars 260 forks source link

Error loading the coova module in iptables #530

Open yifu opened 3 years ago

yifu commented 3 years ago

I have an error when loading the iptables rules to make xt_coova working:

$ sudo iptables -I FORWARD -o eno1 --src 10.10.0.0/24 -m coova --name chilli -j ACCEPT 
iptables v1.8.4 (legacy): Couldn't load match `coova':No such file or directory

Try `iptables -h' or 'iptables --help' for more information.

While everything looks fine:

$ sudo cat /proc/net/ip_tables_matches
conntrack
conntrack
conntrack
addrtype
coova
udplite
udp
tcp
addrtype
icmp
$ lsmod |grep -i coova
xt_coova               16384  0
x_tables               49152  9 xt_conntrack,iptable_filter,xt_tcpudp,xt_addrtype,ip_tables,xt_MASQUERADE,iptable_mangle,xt_TCPMSS,xt_coova
xewonder commented 2 years ago

Hello,

I am facing the exact same problem. did you get a solution?

Thank you

DD

xewonder commented 2 years ago

it looks like coova-chilli is not calling xt_coova?

lsmod

Module Size Used by

xt_coova 16384 0

It's not used by anyone??

xewonder commented 2 years ago

https://github.com/coova/coova-chilli/issues/560

srisurya97 commented 1 year ago

Hi @xewonder @yifu Any update on this? Module Size Used by xt_coova 16384 0 and iptables v1.8.8 (nft): Couldn't load match coova':No such file or directory Tryiptables -h' or 'iptables --help' for more information.

Because i am facing this on OpenWRT 23 SNAP. If you have resolved can you post your config files and info on how you resolved it? It will be of great help.

xewonder commented 1 year ago

hey @srisurya97 ,

I really can not remember how it was fixed...

I had it on different occasions.

Are you compiling your own firmware?

srisurya97 commented 1 year ago

hey @srisurya97 ,

I really can not remember how it was fixed...

I had it on different occasions.

Are you compiling your own firmware?

Yes

xewonder commented 1 year ago

If i recall correctly, in 1 instance the kernel module was not selected. can you check? image

srisurya97 commented 1 year ago

If i recall correctly, in 1 instance the kernel module was not selected. can you check? image

It is selected and shows under lsmod. But not used it shows 0 for xt_coova under lsmod. And iptable match shows no such file or directory for "coova"

khmtambi commented 11 months ago

Hi all. anyone got any solution to this. I am facing exact same problem on openwrt version 23. I did the following:

whenever I try to run iptables -m coova it throws the message.

There is also another relevant thread going on which is: https://forum.openwrt.org/t/coova-chilli-on-openwrt-22-03-nftables/136941 Really need help as I am stuck bad. I had to move from version Openwrt 21 to openwrt 23. it was working perfectly fine in Openwrt 21

pparent76 commented 10 months ago

Same problem here in snapshot and with firewall4 uninstalled and iptables-legacy installed instead.

pparent76 commented 10 months ago

I'm really wondering what makes the difference in iptables so that one library in /usr/lib/iptables/ is recognized (for example module string), and another no. Is it a difficult problem or only a small thing that makes iptables not take into acount the libxt_coova library?

In /usr/lib/iptables/ if I rename the library string mv /usr/lib/iptables/libxt_test.so /usr/lib/iptables/libxt_string.so then I get iptables v1.8.8 (legacy): Couldn't load match string:No such file or directory when trying to use the string match library, so I guess the library is loaded based on its filename.

The thing is I do have /usr/lib/iptables/libxt_coova.so, but probably there's something failing about this library.

pparent76 commented 10 months ago

I guess there is probably something to adapt in this file

https://github.com/coova/coova-chilli/blob/master/src/linux/libxt_coova.c

Cos the xt library compiled from it does not seem to be recognized by iptables

khmtambi commented 6 months ago

@pparent76 Have you been able to fix it yet? haven't followed the issue since the last post.

pparent76 commented 6 months ago

Yes I have fixed it in this commit: https://github.com/openwrt/packages/commit/61ba390b651f9b563073d6995b863d99830a86ac

I think it was backported to 23.05 as well!

khmtambi commented 6 months ago

Wonderful. I applied the patch. but now I have a different problem: Sat May 25 03:37:13 2024 kern.info kernel: [ 367.877815] seq_file: buggy .next function 0x81cc20d8 did not update position index This is the error I get when a client associates. what do I do in this case? do you think I should undo the changes I have done in the below comment: https://github.com/coova/coova-chilli/issues/530#issuecomment-1853702511

aswanthk07 commented 1 month ago

Wonderful. I applied the patch. but now I have a different problem: Sat May 25 03:37:13 2024 kern.info kernel: [ 367.877815] seq_file: buggy .next function 0x81cc20d8 did not update position index This is the error I get when a client associates. what do I do in this case? do you think I should undo the changes I have done in the below comment: #530 (comment)

Hi, Did you find any fix for this issue?