Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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
tcpdump -i eth0 inbound and ip -w res.pcap
How can I filter by ipv4 only?
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...