coova / coova-chilli

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

Traffic counters with xt_coova module #343

Open irongomme opened 7 years ago

irongomme commented 7 years ago

Hi,

With xt_coova, chilli bypass traffic and delegates it to kernel instead of tun / tap interface. But, in this case we can't have acctinputoctets and acctoutputoctets counters sent to Freeradius ... is there any workaround to maintain this feature ?

We need it because we give statistics to our customers and we restrict total download + upload with ChilliSpot-Max-Total-Octets counter for sat internet links.

nzamps commented 7 years ago

It should work fine, we have Interim updates to our radius. The way xt_coova works is that it updates chilli with the byte and packet counts so the values shown in /proc/net/coova/[your module name] should be reflected in chilli_query list and then sent via Radius. Do your counters increase?

irongomme commented 7 years ago

That was due to the debug mode launched without -cmdsocket arg. Now it works as it :

mac=18-92-07-DE-00-00 src=192.168.180.10 state=1 bin=0 bout=1465198 pin=0 pout=52

But bin and pin doesn't increase ...

nzamps commented 7 years ago

That would mean the iptables chilli --dest rule is not being matched.

Check the rule (it should look a bit like e.g. iptables -A FORWARD -d 192.168.1.0/24 -i eth0 -m coova --name chilli --dest -j ACCEPT) or else it could be due to GSO + TSO - so you could try the command in #256.

nzamps commented 7 years ago

[Updated previous] - should be dest rule not source

alex-eri commented 7 years ago

related to #179