This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Filtering dropped packages

Hi.

What is the appropriate way to package capture dropped packets using tcpdump?

Lets say I want to capture all dropped packages on eth3 to or from 1.2.3.4?

I guess it is something like:

tcpdump -i eth3 host 1.2.3.4

... but as I see, this is only capturing passed packets. How to do the opposite?

Regards, Lars.


This thread was automatically locked due to age.
  • Go to the source:  Manpage of TCPDUMP


    Yeah... Actually I went there before posting, and double checked right now. I can't see where it lists how to filter dropped packages?

    Regards, Lars.
  • Ah ok, I see what you want.  TCPDump is just looking at the raw data in the packet headers (first 96bytes) and there isn't such a thing as drop.  I suppose you could filter for only FIN which is used to terminate a connection.  You might be better off looking in the firewall logs.
  • So there is no equivalent way to lets say BSD's:

    tcpdump -n -e -ttt -i pflog0 host a.b.c.d

    which will give me a live output of what is blocked and logged reg. host a.b.c.d?

    What would be the smartest approach on Sophos UTM 9 to find which ports are being blocked from or to a given host? I have tried the livelog on the web interface, and honestly I find it to be very complicated to work with.

    Regards, Lars.
  • tcpdump -n -e -ttt -i pflog0 host a.b.c.d
    BSD sets up a virtual interface for it's packetfilter logging, which UTM doesn't do.

    What would be the smartest approach on Sophos UTM 9 to find which ports are being blocked from or to a given host? I have tried the livelog on the web interface, and honestly I find it to be very complicated to work with.
    Three possibilities.  1)  Use the live log, at the top under the address bar there is a filter box, add in the IP you are filtering for here.  2)  Tail and grep the log from the shell (see http://stackoverflow.com/questions/7161821/how-to-grep-a-continuous-stream for some tips).  Logs are in /var/log/.  3)  You can send data via Syslog (Logging & Reporting > Log Settings > Remote Syslog Server) to a database server (Splunk works nice), then you can filter to your hearts content.  Slight delay from real-time, but very flexible in useability.