For a WiFi hotspot I want to record each guest's internet access.
Not the full data, only source/dest/timestamp/duration.
I didn't found any open source software to do this.
Question 1: does someone know a software to log internet access ? TCP + UDP
So I plan to use netfilter/iptables.
My ideas with netfilter:
iptables -A OUTPUT -o eth0 -m state --state NEW -j LOG
This correctly log source and destination IP adresses and ports.
This correctly log TCP and UDP first packet.
I will have to also log INVALID packets (and RELATED ?).
But this does not log when the connections end.
Question 2: any idea to detect "end of connection" with netfilter ?