From owner-freebsd-questions@freebsd.org Tue Jan 10 17:04:14 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9168CCA9832 for ; Tue, 10 Jan 2017 17:04:14 +0000 (UTC) (envelope-from robroy@robroygregg.com) Received: from mail.robroygregg.com (173-13-147-189-sfba.hfc.comcastbusiness.net [173.13.147.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8AA1C42 for ; Tue, 10 Jan 2017 17:04:13 +0000 (UTC) (envelope-from robroy@robroygregg.com) Received: from beak.h.net (beak.h.net [192.168.32.10]) by mail.robroygregg.com (OpenSMTPD) with ESMTP id 447e3629; Tue, 10 Jan 2017 09:04:06 -0800 (PST) Date: Tue, 10 Jan 2017 09:04:06 -0800 (PST) From: Robroy Gregg X-X-Sender: robroy@beak.h.net To: Ernie Luzar cc: freebsd-questions@FreeBSD.org Subject: Re: /dev/bpf in a jail In-Reply-To: <5874C8F9.5020103@gmail.com> Message-ID: References: <5874C8F9.5020103@gmail.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 17:04:14 -0000 Good day Ernie, On Tue, 10 Jan 2017, Ernie Luzar wrote: > I trying to run tcpdump inside of a jail. > Get following error message > tcpdump: (cannot open device) /dev/bpf: No such file or directory > > Is it technical possible to do this? Yeah, I have tcpdump working in a jail on 10.3-RELEASE, named "beak." Here's the jail.conf for it: exec.start = "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.clean; mount.devfs; host.hostname = $name; path = /j/$name; interface = igb0; beak { allow.raw_sockets; devfs_ruleset = 7; enforce_statfs = 1; ip4.addr = 192.168.32.10; } And here's the /etc/devfs.conf for it: [devfsrules_jail_bpf=7] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'bpf*' unhide Wellbeing to you, Ernie. Robroy