What is the least convoluted way to do it? To start a process with no networking, unshare -n -r
does the job reliably.
Asked
Active
Viewed 74 times
0
unshare
command. Standard iptables or nftables does not have the ability to block traffic by pid. This answer suggests moving the process into a cgroup and then blocking network access for that cgroup. – larsks Jan 22 '24 at 23:23gdb
solution. – aviro Jan 23 '24 at 13:26