3

I want to filter with TCPDUMP only incoming and ip v4 packets.

tcpdump -i eth0 inbound and ip -w res.pcap give me incoming packets with ipv4 and ipv6

How can I filter by ipv4 only?

1 Answer 1

6

When I specify ip at the end of the command, it gives me only IPv4 packages like this

tcpdump -i eth0 ip

Though I am not sure why the "inbound and ip" part in your command is not a syntax error...

1
  • its actually the word "ip" at the end. not an actual IP, which I mistakenly thought. thanks, your exact command works.
    – Vicer
    Mar 14, 2022 at 3:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .