From owner-freebsd-current@freebsd.org Sun Oct 28 22:08:07 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 5924B10E2CDB for ; Sun, 28 Oct 2018 22:08:07 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (plan-b.pwste.edu.pl [IPv6:2001:678:618::40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plan-b.pwste.edu.pl", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6C607265E for ; Sun, 28 Oct 2018 22:08:06 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from fomalhaut.potoki.eu ([IPv6:2001:470:71:d47:ddfe:5821:4756:bf60]) (authenticated bits=0) by plan-b.pwste.edu.pl (8.15.2/8.15.2) with ESMTPSA id w9SM83L2039797 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 28 Oct 2018 23:08:03 +0100 (CET) (envelope-from zarychtam@plan-b.pwste.edu.pl) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=plan-b.pwste.edu.pl; s=plan-b-mailer; t=1540764483; bh=P6tjhXnOWW8WAVR7KAKgEghuk+FeNxCDar2gaJy94gc=; h=To:References:From:Subject:Date:In-Reply-To; b=RoFf4BvyCBcGu9KJ+4inftclLyVgnYGJoD7oZzFmKNsZnzywaDDngeojKWd1SVqQk Hfj9/KECOThHCqBWENjUJCuSbXyb0koEuQrj9tinRpHNjPVj8wi7UFdJIc+V/Q0t/C CQF79T4/hIlrpQVKPsfXNWprqnarm8rImCx2mS8O01tAkAfEvzFP+srLjNfwpZ/pCG TpXIbqubtm9TgBZFi0UD2ZVywXr063qdnNN2dqqXzUtY6kzR2gvgWyg0KQY1/6MjX6 RftMKdgyotjvcK6YXV+u36kS68MrS+vpOPrGy13FBg/D9mGTlMNFrBNlrYUJTkELDc axTQDjR6np6Wg== X-Authentication-Warning: plan-b.pwste.edu.pl: Host [IPv6:2001:470:71:d47:ddfe:5821:4756:bf60] claimed to be fomalhaut.potoki.eu To: freebsd-current@freebsd.org References: <201810282139.w9SLdO58054096@pdx.rh.CN85.dnsmgr.net> From: Marek Zarychta Openpgp: preference=signencrypt Autocrypt: addr=zarychtam@plan-b.pwste.edu.pl; prefer-encrypt=mutual; keydata= xsBNBFfi3cMBCADLecMTFXad4uDXqv3eRuB4qJJ8G9tzzFezeRnnwxOsPdytW5ES2z1ibSrR IsiImx6+PTqrAmXpTInxAi7yiZGdSiONRI4CCxKY9d1YFiNYT/2WyNXCekm9x29YeIU7x0JB Llbz0f/9HC+styBIu2H+PY/X98Clzm110CS+n/b9l1AtiGxTiVFj7/uavYAKxH6LNWnbkuc5 v8EVNc7NkEcl5h7Z9X5NEtzDxTOiBIFQ/kOT7LAtkYUPo1lqLeOM2DtWSXTXQgXl0zJI4iP1 OAu4qQYm2nXwq4b2AH9peknelvnt1mpfgDCGSKnhc26q6ibTfMwydp+tvUtQIQYpA6b9ABEB AAHNLk1hcmVrIFphcnljaHRhIChQV1NURSkgPHphcnljaHRhQHB3c3RlLmVkdS5wbD7CwHoE EwEIACQCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AFAlfi61cCGQEACgkQHZW8vIFppoKb Qgf+IlZ71gjdVsvBykXUyxF6tZvpdPS0jnPqZBG/+WKIv6D2YfQ1wAQCkApv1CGz3XPdWDhh 0vGmF8ZCN/fKDpMGT4pIJkn5ZZxSmediy44BGUqFBqWSsZaFb6Ub6EbRHDvfBssRQZT9TMB9 abZtF5ZZOXmxlTuDDGL1PMp5XYVSMXfBH6qU8DSv5mBQr3v1IYJyxc6ylyE6lhg52eZ73NAl uxZelDIZX+uTK2GhpP1YWDucTUBUCpquhQjpNd6jw2uhmeF1ZgbS1WiTyK4j1VqT+j1HqiLB zOq9dC52g/wEGZet82Of5EFIpp1+o3PXkAVf9CpSsm3aavp9463QlksxA87ATQRX4t3DAQgA 10h6RCXuBLMHxq5B8X/ZIlj9sgLoeyfRdDZEc9rT2KUeUJVHDsbvOFf4/7F1ovWYhJbA6GK/ LUZeHHTjnbZcH1uDYQeHly4UOLxeEvhGoz4JhS2C7JzN/uRnwbdOAUbJr8rUj/IYa7gk906r ktsc/Ldrxrxh7O6WO0JCh2XO/p4pDfEwwB37g4xHprSab28ECYJ9JMbtA8Sy4M55g3+GQ28F vSlGnx48OoGXU2BZdc1vZKSQmNOlikB+9/hDX8zdYWVfDaX1TLQ8Ib4+xTUmapzamV/bxIsa ZRBw+jFjLQHhTbIMfPEU+4mxFDvTdbKPruKPqVf1ydgMnPZWngowdwARAQABwsBfBBgBCAAJ BQJX4t3DAhsMAAoJEB2VvLyBaaaC6qkIAJs9sDPqrqW0bYoRfzY6XjDWQ59p9tJiv8aogxac QNCfAu+WkJ8PNVUtC1dlVcG5NnZ80gXzd1rc8ueIvXlvdanUt/jZd8jbb3gaDbK3wh1yMCGB l/1fOJTyEGYv1CRojv97KK89KP5+r8x1P1iHcSrunlDNqGxTMydNCwBH23QcOM+mu4spKnJ/ s0VRBkw3xoKBZfZza6fTQ4gTpAipjyk7ldOGBV+PvkKATdhK2yLwuWXhKbg/GRlD1r5P0gxz SqfV4My+KJuc2EDcrqp1y0wOpE1m9iZqCcd0fup5f7HDsYlLWshr7NQl28f6+fQbsylq/j67 2BHXsdeqf/Ip9V4= Subject: Re: 12.0-BETA1 vnet with pf firewall Message-ID: <113f7b4f-0a72-7f0f-afe0-f9f9885011e6@plan-b.pwste.edu.pl> Date: Sun, 28 Oct 2018 23:07:56 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <201810282139.w9SLdO58054096@pdx.rh.CN85.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7M791gwMT7B1IgjNjyRkBSq1eWh9UlbY1" 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 22:08:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7M791gwMT7B1IgjNjyRkBSq1eWh9UlbY1 Content-Type: multipart/mixed; boundary="qDamPaM7igb0SPWAdO6xxVB77XmxGWXra"; protected-headers="v1" From: Marek Zarychta To: freebsd-current@freebsd.org Message-ID: <113f7b4f-0a72-7f0f-afe0-f9f9885011e6@plan-b.pwste.edu.pl> Subject: Re: 12.0-BETA1 vnet with pf firewall References: <201810282139.w9SLdO58054096@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201810282139.w9SLdO58054096@pdx.rh.CN85.dnsmgr.net> --qDamPaM7igb0SPWAdO6xxVB77XmxGWXra Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US W dniu 28.10.2018 o=C2=A022:39, Rodney W. Grimes pisze: >> 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= =20 >>>> pf from host console or from vnet console using kldload pf.ko comman= d=20 >>>> 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=20 >>>> 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= =20 >>> modules are global objects loaded from the base system or you compile= =20 >>> 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= =20 >>> system and all jails+vnet. Whichever you configure in which one is u= p=20 >>> to you. Just be careful as an unconfigured firewall might have a=20 >>> 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 everyth= ing >>> and a jail+vnet using pf and setting ipfilter there to accept everyth= ing. >>> >>> >>> Hope that clarifies some things. >>> >>> /bz >>> >> Hello Bjoern. >> >> What you said is correct for 10.x & 11.x. But I an talking about=20 >> 12.0-beta1. I have the ipfilter options enabled in rc.conf of the hos= t=20 >> and on boot ipfilter starts just like it all ways does. Now to prep th= e=20 >> 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 yo= ur=20 >> 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 =3D pass all, Logging =3D enabl= ed > linker_load_file: /boot/kernel/pf.ko - unsupported file type > The same when loading pf.ko combined with ipsec.ko, both can't be loaded on the same running kernel # kldload ipsec && echo ok || echo fail ; kldload pf && echo ok || echo f= ail ok kldload: an error occurred while loading module pf. Please check dmesg(8) for more details. fail Another try in reverse order (both modules unloaded first): # kldload pf && echo ok || echo fail ; kldload ipsec && echo ok || echo fail=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ok kldload: an error occurred while loading module ipsec. Please check dmesg(8) for more details. fail Some time ago I submitted a PR about this, but I was unaware that the case of failure during loading ipsec.ko is caused by the presence of already loaded pf.ko https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228854 --=20 Marek Zarychta --qDamPaM7igb0SPWAdO6xxVB77XmxGWXra-- --7M791gwMT7B1IgjNjyRkBSq1eWh9UlbY1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEMOqvKm6wKvS1/ZeCdZ/s//1SjSwFAlvWM0EACgkQdZ/s//1S jSx3hwgAm3+FVffppWhuNTMVq0jXDdBV2fn+PjsQWaiPhLffHxDZ5ocFYiZxqakj PRHD9jYHUbnait99sEhpgqw2AyJeftQT88G+AjOjT5FhnUi/LVwUjjE1HBNHzsUW fG5DYRZu6gQqDvMj41nTxffispaayC2qxAndUSzBw9w4U5ZkUA7686/L7oO4q+u7 5SCgVsVujQB7nJKbKx+4vUuzJ3Jl3zhvkt5hu1avlTn66mnLYtue7B4GhD8F0Q3I PkejsyLf8FYHIYIz5Y2NhJwZ30FwwcyyF+CMjHPukztXTJxst0Eb35k7OmdLR2Vf UZdcTVMmolhoY/Ky5oV5qE+NOiBwRQ== =1aH1 -----END PGP SIGNATURE----- --7M791gwMT7B1IgjNjyRkBSq1eWh9UlbY1--