From owner-freebsd-pf@freebsd.org Thu Dec 13 12:06:04 2018 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CFC11321EAC for ; Thu, 13 Dec 2018 12:06:04 +0000 (UTC) (envelope-from srs0=hdnw=ow=vega.codepro.be=kp@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C19885275 for ; Thu, 13 Dec 2018 12:06:02 +0000 (UTC) (envelope-from srs0=hdnw=ow=vega.codepro.be=kp@codepro.be) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id 9863B4037E; Thu, 13 Dec 2018 13:06:00 +0100 (CET) Received: by vega.codepro.be (Postfix, from userid 1001) id 793E23C325; Thu, 13 Dec 2018 13:06:00 +0100 (CET) Date: Thu, 13 Dec 2018 13:06:00 +0100 From: Kristof Provost To: Goran =?utf-8?B?TWVracSH?= Cc: freebsd-pf@freebsd.org Subject: Re: VNET jails and PF service Message-ID: <20181213120559.GB49515@vega.codepro.be> References: <20181213000232.vk4qoapuqyqly2jx@thinker.home.meka.rs> <20181213083012.GA49515@vega.codepro.be> <20181213113505.7utf6ddl3rkr7zsd@hal9000.home.meka.rs> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181213113505.7utf6ddl3rkr7zsd@hal9000.home.meka.rs> X-Checked-By-NSA: Probably User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 8C19885275 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dmarc=fail reason="" header.from=sigsegv.be (policy=none); spf=pass (mx1.freebsd.org: domain of srs0=hdnw=ow=vega.codepro.be=kp@codepro.be designates 2a01:4f8:162:1127::2 as permitted sender) smtp.mailfrom=srs0=hdnw=ow=vega.codepro.be=kp@codepro.be X-Spamd-Result: default: False [-4.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:162:1127::2]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx2.codepro.be]; RCVD_IN_DNSWL_MED(-0.20)[2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.7.2.1.1.2.6.1.0.8.f.4.0.1.0.a.2.list.dnswl.org : 127.0.9.2]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; IP_SCORE(-2.79)[ip: (-8.11), ipnet: 2a01:4f8::/29(-3.31), asn: 24940(-2.52), country: DE(-0.01)]; FORGED_SENDER(0.30)[kristof@sigsegv.be,srs0=hdnw=ow=vega.codepro.be=kp@codepro.be]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; FROM_NEQ_ENVFROM(0.00)[kristof@sigsegv.be,srs0=hdnw=ow=vega.codepro.be=kp@codepro.be]; DMARC_POLICY_SOFTFAIL(0.10)[sigsegv.be : SPF not aligned (relaxed), No valid DKIM, none] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 12:06:04 -0000 On 2018-12-13 12:35:05 (+0100), Goran Mekić wrote: > On Thu, Dec 13, 2018 at 09:30:12AM +0100, Kristof Provost wrote: > > On 2018-12-13 01:02:32 (+0100), Goran Mekić wrote: > > > I can't start PF as service from vnet jail. I have devfs rule to unhide > > > bpf (for dhclient) and pf that the jail is using. I can run "pfctl -e -f > > > /etc/pf.conf" but "service pf start" fails with: > > > > > > kldload: can't load pf: Operation not permitted > > > /etc/rc.d/pf: WARNING: Unable to load kernel module pf > > > > > Yes, jails can't load kernel modules, for obvious reasons. > > Your host needs to load the pf module, then the jail will be able to use > > it. > > I did load it on the host, that's why "pfctl -e -f /etc/pf.conf" works > in the jail, but "service pf start" doesn't. I can't seem to reproduce that. How did you start your jail? (The output of 'jls -na' might be helpful too) Regards, Kristof