From owner-freebsd-questions Wed Nov 27 18:16:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 037A137B404 for ; Wed, 27 Nov 2002 18:16:19 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C7C943EC5 for ; Wed, 27 Nov 2002 18:16:17 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b140.otenet.gr [212.205.244.148]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id gAS2G9pu017186; Thu, 28 Nov 2002 04:16:15 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.6/8.12.6) with ESMTP id gAS2G97W033456; Thu, 28 Nov 2002 04:16:09 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by gothmog.gr (8.12.6/8.12.6/Submit) id gAS2G9Xt033455; Thu, 28 Nov 2002 04:16:09 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 28 Nov 2002 04:16:09 +0200 From: Giorgos Keramidas To: Darren Pilgrim Cc: freebsd-questions@FreeBSD.ORG Subject: Re: A program to list off packet target/source addrs as they pass? Message-ID: <20021128021609.GC31196@gothmog.gr> References: <3DE5794D.80003@pantherdragon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DE5794D.80003@pantherdragon.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-11-27 18:02, Darren Pilgrim wrote: > I'm in need of a program that can show me just a list of packets as > they pass through a given interface. The only information I need > are the transport protocol (TCP, UDP, etc) and the source and > destination addresses and ports. > > I don't want to know any other information for various privacy/legal > reasons, this is for debugging and tuning routers and firewalls. > The idea is to run this on an interface to show what's actually > passing through. Use tcpdump. It's in the base system too: gothmog# tcpdump -q -n -l -s 128 -c 10 tcpdump: listening on tun0 04:13:47.771703 212.205.244.148.50189 > 195.74.234.20.110: tcp 0 (DF) 04:13:47.930432 195.74.234.20.110 > 212.205.244.148.50189: tcp 0 (DF) 04:13:47.930510 212.205.244.148.50189 > 195.74.234.20.110: tcp 0 (DF) 04:13:48.116406 195.74.234.20.110 > 212.205.244.148.50189: tcp 92 (DF) 04:13:48.116548 212.205.244.148.50189 > 195.74.234.20.110: tcp 48 (DF) 04:13:48.284387 195.74.234.20.110 > 212.205.244.148.50189: tcp 0 (DF) 04:13:48.314383 195.74.234.20.110 > 212.205.244.148.50189: tcp 61 (DF) 04:13:48.414321 212.205.244.148.50189 > 195.74.234.20.110: tcp 0 (DF) 04:13:51.315990 212.205.244.148.50189 > 195.74.234.20.110: tcp 6 (DF) 04:13:51.477971 195.74.234.20.110 > 212.205.244.148.50189: tcp 9 (DF) ^C 26 packets received by filter 0 packets dropped by kernel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message