From nobody Thu Aug 03 14:53:03 2023 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RGsKM5s3Hz3cH93 for ; Thu, 3 Aug 2023 14:53:11 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [46.41.23.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4RGsKL2FPdz4NLD for ; Thu, 3 Aug 2023 14:53:10 +0000 (UTC) (envelope-from sec@42.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=42.org header.s=rsa header.b=S5IfhuME; spf=none (mx1.freebsd.org: domain of sec@42.org has no SPF policy when checking 46.41.23.238) smtp.mailfrom=sec@42.org; dmarc=none Received: by ice.42.org (Postfix, from userid 1000) id 3D261D8B; Thu, 3 Aug 2023 16:53:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=42.org; s=rsa; t=1691074383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7m8P/a338ue148mtAX+6LSfYl//3B3btwhDv0yzO41I=; b=S5IfhuMEJrybQicylZhPObYo+oQfDABtGEvXha3GtNGU/8dNMLjJBvOJ3TgsEBKzwjZ3SY v5CNKTxv3um/MicIJlBbL66A+w0xfPsCKC6zlQ6YFkycHzXkkC/oHJkbnQGf0PTxuvFCKe tg5pbVcpFEahbgUAIlTd3Cb0BNN5QjRh6Fr84PiXRh8G+VlKrNoWKrRL9HV7GNz+1p6iaj Wmo+MW1hs226JuLBUdKluJkVzYhR3oFVqDI3W1QGkemuoEitpVppAZSKBYQvHb99EWj5EX jyyUkaNwPbnEgw3C5y+ylt1UiHVqZo1IjtXyYasaQ9D4IdHRuaT1jav4FNCGEQ== Date: Thu, 3 Aug 2023 16:53:03 +0200 From: Stefan Zehl To: Zane C B-H Cc: net@freebsd.org Subject: Re: Is there a FreeBSD equivalent of 'tcpdump -i any' from Linux? Message-ID: References: <826851ce2108b23515f81a8aca8d9b0e@vvelox.net> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <826851ce2108b23515f81a8aca8d9b0e@vvelox.net> I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ X-Spam-Status: No, score=0.90 X-Spam-Score: 0.90 X-Spamd-Result: default: False [-0.09 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.993]; R_DKIM_ALLOW(-0.20)[42.org:s=rsa]; RCVD_NO_TLS_LAST(0.10)[]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[net@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[42.org:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:15987, ipnet:46.41.0.0/19, country:DE]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[42.org]; R_SPF_NA(0.00)[no SPF record] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4RGsKL2FPdz4NLD Hi, On Tue, Aug 01, 2023 at 13:21 -0500, Zane C B-H wrote: > So what is a good way to get all packets passing through that the kernel > currently sees? Apparently any is not support on non-Linux systems and > pflog would require adding log to all rules. Similarly only logs packets > that match a rule. What I've done in the path is make an if_brige(4) bridge0 interface, put that into monitor mode and joined all the interfaces needed to it. Worked quite well for me. CU, Sec -- There are too many priorities. One has to prioritize priorities. -- Wietse