Date: Mon, 20 Aug 2018 18:22:11 +0200 From: Stefan Bethke <stb@lassitu.de> To: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> Cc: FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: Bind to port <1024 in jail Message-ID: <2FA29D2E-7C15-4C9D-A59B-98E9EA916891@lassitu.de> In-Reply-To: <D9F9531F-6EB5-44F9-B8F3-523C0C2E0E44@lists.zabbadoz.net> References: <75536186-7D58-498C-BFC6-9284EB7CB444@lassitu.de> <D9F9531F-6EB5-44F9-B8F3-523C0C2E0E44@lists.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 20.08.2018 um 16:59 schrieb Bjoern A. Zeeb = <bzeeb-lists@lists.zabbadoz.net>: >=20 > On 20 Aug 2018, at 14:47, Stefan Bethke wrote: >=20 >> I have a Go program (acme-dns) that wants to bind 53, 80, and 443, = and I=E2=80=99d rather have it run as a non-privileged user. The = program doesn=E2=80=99t provide a facility to drop privs after binding = the ports. I=E2=80=99m planning to run it in a jail. >>=20 >> After some googling, it appears that a couple of years ago I should = have been able to do: >> sysctl net.inet.ip.portrange.reservedhigh=3D0 >> and allow all processes to bind to =E2=80=9Elow=E2=80=9C ports. This = does not work in my jails on a 11-stable host. >>=20 >> $ sudo sysctl net.inet.ip.portrange.reservedhigh=3D0 >> net.inet.ip.portrange.reservedhigh: 1023 >> sysctl: net.inet.ip.portrange.reservedhigh=3D0: Operation not = permitted >>=20 >> Securelevel should not interfere: >> $ sysctl kern.securelevel >> kern.securelevel: -1 >>=20 >> Is there a way to allow regular processes to bind to low ports? >=20 > you have to set it on the base system; alternatively with vnet you = might be able to change it per-jail. Do you feel it=E2=80=99s OK to enable VIMAGE in -stable? When I tried = last in 2016, I had stability issues, I think related to pf. Stefan --=20 Stefan Bethke <stb@lassitu.de> Fon +49 151 14070811
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2FA29D2E-7C15-4C9D-A59B-98E9EA916891>