How to view iptables logs of message sent from devices on same network?

Hi all,

This might be a very stupid question but where can I view the logs of iptables rules?

I created a rule like -

iptables −t raw −A PREROUTING −d ip −j LOG

to log packets going towards to that ip address.

I am sending packets from one of my devices to this ip and want to see the logged messages like in Tcpdump.
I don't see any records of any packets whereas I see them in tcpdump.

What am I doing wrong and where can I find the logs?

Did you check in dmesg and they are not there?

I found the problem.

I am sending packets from a wireless client to a wired client (which I suppose are on the same interface - br-lan). Apparently they are not logged. I can see traffic from the WAN side to LAN side and vice versa but I am not able to capture internal wireless LAN<>LAN wired traffic. Do you have any idea on how to achieve this?

In this case you'd need ebtables.

Okay. Can you tell me how to use them?

They are quite similar to iptables.

1 Like