I'm using Tailscale on the router for remote access to hosts inside the LAN, but I would also like to protect a jailed instance of vaultwarden with a reverse proxy in the jail.
I've used Caddy on the other OS, and I really like the fact that it manages the certs, but the installer notes for FreeBSD indicate that it runs as
Following those instructions gives an error for mac_portacl:
I could generate the certs using acme.sh and use a different reverse proxy, or run on the host itself, but this reminded me of something I've been wondering about for a long time:
In general, are jails locked down enough that it's reasonably safe to run as root inside them? How would you compare the risks of running as root in a jail against running as a non-root user on the host?
I've used Caddy on the other OS, and I really like the fact that it manages the certs, but the installer notes for FreeBSD indicate that it runs as
root by default and gives instructions to run as the www user instead:
Code:
# pkg install security/portacl-rc
# sysrc portacl_users+=www
# sysrc portacl_user_www_tcp="http https"
# sysrc portacl_user_www_udp="https"
# service portacl enable
# service portacl start
# sysrc caddy_user=www caddy_group=www
Following those instructions gives an error for mac_portacl:
Code:
root@server:~ # service portacl start
kldload: can't load mac_portacl: Operation not permitted
/usr/local/etc/rc.d/portacl: WARNING: Unable to load kernel module mac_portacl
I could generate the certs using acme.sh and use a different reverse proxy, or run on the host itself, but this reminded me of something I've been wondering about for a long time:
In general, are jails locked down enough that it's reasonably safe to run as root inside them? How would you compare the risks of running as root in a jail against running as a non-root user on the host?