Here I'm using my RaspberryPi as a WLAN router. It is connected to my LAN by wire (which leads to my DSL router), additionally it is equipped with a USB WLAN stick. I'm using hostapd for providing the access point functionality. There is also dnsmasq running as the DHCP server. IPv4 forwarding is enabled and working fine.
But I have to log all IPs which my WLAN users are trying to connect to (stupid german laws).
The first idea, using iptables to log the destination IPs, fails because the destination IP of the incoming packets on wlan0 is always the IP address on wlan0 (it is the standard gateway for the WLAN clients).
What I need is a way to log when was which destination IP contacted, nothing more. Preferably a solution without all the bells and whistles. ;)