From nobody Mon Jun 8 08:36:59 2026 X-Original-To: freebsd-jail@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 4gYllM62Hbz6h5Hw for ; Mon, 08 Jun 2026 08:37:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gYllM5TSKz3fTl; Mon, 08 Jun 2026 08:37:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780907823; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vRAcmuNat77h0S5VMbWtagGO7gNCFwkx7Gl/prFyu4E=; b=WwaJgBEkMsfcFsXd17mz4lktsDOvZG/iwpLvzCCF/fvMsv6xFGowk0LTS0aXRY+U/1UptZ P9g5qO1nTB7XGdfaA3h2FBFzsH58CWtvV0idAIZCCEH6J4mAZhElkunZZwA0Y7B3aRxcBq tYKUsSwh4SrOnz1nZCQSy07LPruKtlxixrDsyu/Rpy76FoTu/1gyDzzNwkcGk7CZIvoC5a A2XlIsfJQhdnaVng07uvHLpTYfP5oawDSvwB5//pxATFaZpSFTN405doo87oNr4k8HrUiD 8NlYlWxcWN6w8XVq4gytt5Sd/J6voHSz9mZ34eXNM8MzJq7po7c5tGsxZbvvFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780907823; a=rsa-sha256; cv=none; b=RQHezPmcCaDJilglru4kX1gix9qLVySPFFxqKuppXR0lseoZ9iGClii/dF+o3VMkCgoOUV B5n3B1DqoDSpCoaUTZq8X9uRPZgte5RTbuPmSIhgQywKtgXJUytLAMXX2kboVVXxzYnsBc BiapgdhSsdbFMlIGupcGbmHClDGp13xvVbCacNAPpAFt3PFMzsycXaoZsHkZtJt1usvaPS OfJ78Xu4P/oGiTCrwe7ZwGV6Ohe2v3F6QsSn29Rc3v+STNE/StVNCdDOADQ73i9ccN0vKG cZR8np8hXvSmFUd/JIxnLrb8U3+d+VGaXxaoE86GUffS3VyaxTMg7YBiGF073A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780907823; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vRAcmuNat77h0S5VMbWtagGO7gNCFwkx7Gl/prFyu4E=; b=NRIfFXX/eh9SH9Ws1UmeNmqBnPY/gQ8seOCSmgw3YHfdZe7x7Dl3A+juIQtEoWpCErbzlx NfgwK3MpxG6H6CES7WutZRulSCruGn4vaCVz3nWMoA1KwADXVq6gJWx9LyWCLlIsieJRWh WjyEeg4FYwY2QLSK6jUdAjhT1KQxzbMntkAVkWoFw4KozTzm9xcWi+J4XIOrFh1cECYYzA CNlPGoznH2meMyC4HxskoWrHipkt5kCGSZsR/WjmmfzfgTps8OXoL7zAVJizHZ3+4+Lhvq nKSPpa9wfC8kPQHVvFIVHusnowC601HuAxQCIEfSmwCTQJQeXktsOyzvFWykHQ== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R12" (not verified)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gYllM47c7zvNf; Mon, 08 Jun 2026 08:37:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id DB6FF223A3; Mon, 08 Jun 2026 10:37:01 +0200 (CEST) From: Kristof Provost To: Doug Rabson Cc: freebsd-jail@freebsd.org Subject: Re: Running pfctl inside a jail Date: Mon, 08 Jun 2026 10:36:59 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: <7C23D3B8-1A14-41B7-839A-580DB61E0403@FreeBSD.org> In-Reply-To: References: <96E80293-2013-452F-859C-B725EA7963CF@FreeBSD.org> List-Id: Discussion about FreeBSD jail(8) List-Archive: https://lists.freebsd.org/archives/freebsd-jail List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-jail@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 8 Jun 2026, at 10:00, Doug Rabson wrote: > In my smallest test-case, the host and jail use the same root filesystem > and the host is running 15.0-RELEASE-p8. I haven't tested with stable/15 > yet. This reproduces the problem for me: > > $ sudo pfctl -s nat > nat on bridge42 inet from to any -> (bridge42) round-robin > nat on bridge42 inet6 from to ! ff00::/8 -> (bridge42) round-robin > nat-anchor "cni-rdr/*" all > rdr-anchor "cni-rdr/*" all > $ cat jail-pfctl-15 > #! /bin/sh > j=$(jail -ic name=pfctl-in-jail15 ip4=inherit ip6=inherit path=/ persist) > jexec $j pfctl -s nat > jail -r $j > $ sudo ./jail-pfctl-15 > pfctl: DIOCGETRULES: Operation not permitted > $ freebsd-version -k > 15.0-RELEASE-p8 > > > Do the pf unit tests cover the case where the jail shares the host vnet? > Oh. No, no they do not. That’s just plain not supposed to work. You only ever get to manage your own pf instance, never the one of a parent jail. Best regards, Kristof