Date: Mon, 20 Aug 2018 22:15:08 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Stefan Bethke <stb@lassitu.de> Cc: FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: Bind to port <1024 in jail Message-ID: <a48b9796-be88-a803-41fa-46836aa53f0e@grosbein.net> In-Reply-To: <89646FDB-F1A9-4070-87EC-22C0CFAFF4E7@lassitu.de> References: <75536186-7D58-498C-BFC6-9284EB7CB444@lassitu.de> <6bfc8608-946d-39eb-cc57-88b3dc3bd7c5@grosbein.net> <89646FDB-F1A9-4070-87EC-22C0CFAFF4E7@lassitu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
20.08.2018 22:02, Stefan Bethke wrote: >> The trick is that mac_portacl provides a way to selectively give permission for non-root UID >> to bind low ports: >> >> security.mac.portacl.rules=uid:88:tcp:80,uid:88:tcp:443,uid:53:tcp:53,uid:53:udp:53 >> >> It works just fine for a host and I use it for name servers utilizing port 53 >> for a box with dynamically created interfaces, so it may bind the port for distinct IP addresses >> after it dropped privilegies when new interface is created and get new IP assigned. >> >> I have not tried it for a jails, though. Please try and respond. > > Thanks, but do I understand correctly that the security.mac.portacl.rules are system-wide and not per-jail? It seems so. It is small kernel module and it should not be so hard to make it VNET-aware for one already familiar with the code. You may want to fill a PR for that, so it would became possible to have per-jail settings for VIMAGE-enabled jails.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a48b9796-be88-a803-41fa-46836aa53f0e>