I've managed to create two network namespaces (ns1 and ns2) and connect them via veth connection. They can ping each other fine, and even ssh one into another (provided I started sshd).
What I would want to do now is to start some process inside ns1 (let's say vi) that can't be seen or atleast can't be modified/killed from ns2. Is that possible?
I tried using
unshare -p vi
on ns1 but it's still killable from ns2. I can understand it beeing killable from global/default network namespace since it's derived from it, but ns2 shouldn't be able to kill a process inside ns1. Atleast that's what I want to achieve. Any help would be appreciated.