I have a linux machine configured as a router with two interfaces facing LAN A and LAN B. I want to filter traffic passing from LAN A to LAN B (inbound traffic) using tcpdump, but I don't have the subnet information of the LANs (not this: dst net subnetB)?
I didn't fully understand what you want, but if you want to capture packets that are forwarded (as in, routed) by the kernel from interface
If you also want to log packets that goes the other way around, just insert another iptables rule:
Only packets that are actually forwarded can be seen from wireshark/tcpdump. Packets that are sent from the host, or are received without being forwarded are not captured. But you can still decide to capture them by adding more NFLOG rules in
Also, watch out for the CPU usage: it can be slower to use