I guess a simple way to explain it is, relabling everything in the namespace with a different context so that SELinux can enforce that. For example like : sandbox_web_t or container_web_t
I’ll link some videos and articles here going through that. I have extensive notes on the topic. . .
My nftables knowledge is a bit rusty, but I recall it being possible to match traffic based on user and group IDs (UID/GID). So using this you could probably run the application under a different user or group and route the traffic based on that.
No idea what the exact config for that would be though, and it is probably not easy. I remember using that option to block all outgoing traffic for my podman user on alpine linux.
i appreciate the interest. I do have to reorganize my notes and have a project I need to revisit in conjunction so I will be doing this as I think it would contribute positively to the Fedora User base.
I do need to revisit some of the SELinux labels as Dan Walsh’s blog was down the last time I visited them.