tcpdump error

OpenSuse 13.2

I get this error

tcpdump: illegal token: ://

after exec this command in xterm

sudo tcpdump -nvvv -c 666 host

Did you read

man tcpdump

and consequently

man pcap-filter

I read nowhere there that you can enter an URL as a field there. Things like host, net, port, etc. In other words network entities. Not URLs describing files on a HTTP server.

Can you please use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

According to some personal testing,

  • I didn’t get the token error you reported, but that may also be because I “su” to root instead of use “sudo.”
  • I found that when you specify a host, you really do need to specify <only> the hostname and not the protocol or URL path to a directory on the host.

So, I found the following works just fine for your what you want to capture(running in a root console)…

tcpdump -nvvv -c 666 host

Of course the above command captures <everything>. If you want to more narrowly capture only http packets, then in the MAN you find examples to specify a port (ie 80 or 443 for http and https).