• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

TCPDump Examples

Heyas,

I can't seem to find a decent example of how to use the tcpdump with the following parameters.

tcpdump [ipaddress] [interface] [port]

Any assistance is welcome.

Thank you.
0
Zack
Asked:
Zack
  • 5
  • 3
1 Solution
 
TintinCommented:
tcpdump -i eth0 port 80 src 10.1.1.1
0
 
simon3270Commented:
On RedHat I need

     tcpdump -i eth0 port 80 and src 10.1.1.1
0
 
simon3270Commented:
You can make more complex statements too:

    tcpdump -i eth0 port 80 and \( src 10.10.10.101 or dst 10.10.10.102 \)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ZackGeneral IT Goto GuyAuthor Commented:
Thank you for the info.
0
 
simon3270Commented:
Just out of interest, which OS are you doing this on?

Thanks,
Simon
0
 
ZackGeneral IT Goto GuyAuthor Commented:
Knoppix
0
 
simon3270Commented:
I think you may have accepted the wrong answer.  On Knoppix 7.2:

knoppix@Microknoppix:~$ sudo tcpdump -i eth0 port 80 src 10.1.1.1
tcpdump: syntax error
knoppix@Microknoppix:~$ sudo tcpdump -i eth0 port 80 and src 10.1.1.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes

Open in new window


It needs the "and".
0
 
ZackGeneral IT Goto GuyAuthor Commented:
It worked on the system I was on at the time, I was remotely logged into a Knoppix machine via SSH.
0
 
simon3270Commented:
OK, no problem.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now