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 ?

  • Are you really, really sure you want to log every single packet? That's a LOT of data. – dirkt Oct 7 '16 at 9:46
  • @dirkt: "source/dest/timestamp/duration" != "every single packet" – Gregory MOUSSAT Oct 7 '16 at 13:18
  • I can read "not full data", thank you. Yes, I meant "source/dest/timestamp" (and not contents) of every single packet. That's a LOT of data. Logging a few hundred packets for diagnostic purposes is different from logging millions of packets during normal use. – dirkt Oct 7 '16 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.