From owner-freebsd-current@freebsd.org Sun Oct 28 21:39:30 2018 Return-Path: Delivered-To: freebsd-current@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 4A3B110E23A1 for ; Sun, 28 Oct 2018 21:39:30 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADF5271A21 for ; Sun, 28 Oct 2018 21:39:29 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w9SLdPhb054097; Sun, 28 Oct 2018 14:39:25 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w9SLdO58054096; Sun, 28 Oct 2018 14:39:24 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201810282139.w9SLdO58054096@pdx.rh.CN85.dnsmgr.net> Subject: Re: 12.0-BETA1 vnet with pf firewall In-Reply-To: <5BD61458.9040402@gmail.com> To: Ernie Luzar Date: Sun, 28 Oct 2018 14:39:24 -0700 (PDT) CC: "Bjoern A. Zeeb" , FreeBSD current X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2018 21:39:30 -0000 > Bjoern A. Zeeb wrote: > > On 28 Oct 2018, at 15:31, Ernie Luzar wrote: > > > >> Tested with host running ipfilter and vnet running pf. Tried loading > >> pf from host console or from vnet console using kldload pf.ko command > >> and get this error message; > >> > >> linker_load_file: /boot/kernel/pf.ko-unsupported file type. > >> > >> Looks like the 12.0 version of pf which is suppose to work in vnet > >> independent of what firewall is running on the host is not working. > > > > You cannot load pf from inside a jail (with or without vnet). Kernel > > modules are global objects loaded from the base system or you compile > > the devices into the kernel; it is their state which is virtualised. > > > > If you load multiple firewalls they will all be available to the base > > system and all jails+vnet. Whichever you configure in which one is up > > to you. Just be careful as an unconfigured firewall might have a > > default action affecting the outcome of the overall decision. > > > > For example you could have: > > > > a base system using ipfilter and setting pf to default accept everything > > and a jail+vnet using pf and setting ipfilter there to accept everything. > > > > > > Hope that clarifies some things. > > > > /bz > > > > Hello Bjoern. > > What you said is correct for 10.x & 11.x. But I an talking about > 12.0-beta1. I have the ipfilter options enabled in rc.conf of the host > and on boot ipfilter starts just like it all ways does. Now to prep the > host for pf in a vnet jail, I issue from the host console the > "kldload pf.ko" command and get this error message; > > linker_load_file: /boot/kernel/pf.ko-unsupported file type. > > Something is wrong here. This is not suppose to happen according to your > post above. > > Remember that in 12.0 vimage is included in the base system kernel. Confirmed, if I boot a clean install and issue: kldload ipfilter.ko kldload pf.ko my dmesg has: IP Filter: v5.1.2 initialized. Default = pass all, Logging = enabled linker_load_file: /boot/kernel/pf.ko - unsupported file type -- Rod Grimes rgrimes@freebsd.org