Networking Forums

Networking Forums > Computer Networking > Linux Networking > tcpdump filter examples

Reply
Thread Tools Display Modes

tcpdump filter examples

 
 
Kerry Cox
Guest
Posts: n/a

 
      10-18-2003, 10:47 PM
I'm looking for some tcpdump filter examples.
Say I am ssh'ed into machine foo and want to capture everything
without all the ssh packets. How would I filter out all the ssh
packets and simply view the remaining traffic sans ssh packets created
by my connection?
Also, say I want to restrict tcpdump to a single protocol and host.
Meaning, I want to filter on port 80 all traffic from machine foo. I
want foo to be both the source and destination and want to see all
outgoing and incoming requests. But no other traffic on my network.
Thanks much.
KJ
 
Reply With Quote
 
 
 
 
Jem Berkes
Guest
Posts: n/a

 
      10-18-2003, 11:07 PM
> I'm looking for some tcpdump filter examples.
> Say I am ssh'ed into machine foo and want to capture everything
> without all the ssh packets. How would I filter out all the ssh
> packets and simply view the remaining traffic sans ssh packets created
> by my connection?


Try:

tcpdump not port ssh
tcpdump host hostname and not port ssh
tcpdump host hostname and port ssh

--
Jem Berkes
http://www.sysdesign.ca/
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      10-19-2003, 08:29 AM
Jem Berkes <(E-Mail Removed)9__org> wrote:
> > I'm looking for some tcpdump filter examples.
> > Say I am ssh'ed into machine foo and want to capture everything
> > without all the ssh packets. How would I filter out all the ssh
> > packets and simply view the remaining traffic sans ssh packets created
> > by my connection?


> Try:


> tcpdump not port ssh
> tcpdump host hostname and not port ssh
> tcpdump host hostname and port ssh


In addition the OP should try 'info tcpdump' there are a bunch of
examples.

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
Kerry Cox
Guest
Posts: n/a

 
      10-19-2003, 01:16 PM
Excellent. And here I was thinking I had to do something with the TCP
flag bytes, (tcp[13] & 0x10 != 0). Thanks for reminding me about the
simplicity of tcpdump filters.
KJ

Jem Berkes <(E-Mail Removed)9__org> wrote in message news:<Xns9418B869E54A9jbuserspc9org@205.200.16.73> ...
> > I'm looking for some tcpdump filter examples.
> > Say I am ssh'ed into machine foo and want to capture everything
> > without all the ssh packets. How would I filter out all the ssh
> > packets and simply view the remaining traffic sans ssh packets created
> > by my connection?

>
> Try:
>
> tcpdump not port ssh
> tcpdump host hostname and not port ssh
> tcpdump host hostname and port ssh

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
5 ghz Devices: Examples? (PeteCresswell) Wireless Networks 3 01-14-2011 05:57 PM
CAT5/6 Questions, Need best examples please help me?? Crackles McFarly Windows Networking 5 10-24-2007 04:45 AM
CAT5/6 Questions, Need best examples please help me?? Crackles McFarly Network Routers 5 10-24-2007 04:45 AM
LPP (OSI) examples @(none).pl Linux Networking 0 07-05-2004 07:03 AM
tcpdump filter syntax issue vom Linux Networking 0 07-31-2003 08:13 PM



1 2 3 4 5 6 7 8 9 10 11