QUESTION :
Here is the output of the ip addr
command:
I tried out this command for showing network traffic:
sudo tcpdump -n host google.com
But it’s giving output like this:
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
I also pinged google.com, but it is still showing no packets.
ANSWER :
You haven’t assigned an IP address to your eth0
. So tcpdump
and ping
cannot work via eth0
.
So either assign one if you are connected to a wired network or use your wlan0
interface instead.
E.g. ping -I wlan0 www.google.com
or tcpdump -i wlan0 -n host google.com
.