2

I have recently setup my Raspberry PI as a WLAN hotspot using this guide. Everything works as intended I can login to the hotspot with my smartphone or laptop and browse the internet.

Now my question is what tools can I / should I use if I want to log certain data about the clients using the hotspot via the Raspberry PI.

Like:

Client: LG-Smartphone (or MAC address) visited site www.google.de on [date]

Client: LaptopHome (or MAC address) visited site raspberrypi.stackexchange.com on [date+1]

I already fooled around with things like tcpdump but only could see which sites were accessed (when filtering over port 80) but not WHO initially requested said site. As for the tcpdump it was always the PI sending the request.

1

To log network activity in the NAT table execute the following commands for tracking activity in their respective chains

sudo iptables -t nat -I PREROUTING 1 -j LOG
sudo iptables -t nat -I POSTROUTING 1 -j LOG
sudo iptables -t nat -I OUTPUT 1 -j LOG

results will be stored in /var/log/messages. To see "in live" logging, type :

sudo tail -f /var/log/messages

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.