by mercora · 5y ago · 0 comments
sudo ip netns add lonly
sudo ip netns exec lonly sudo -u $USER -i
this should start an interactive shell session with isolated networking, the shell will only see a separate loopback interface without further ado. anything started like this will share the same isolated network environment but you can add and use as many separate network namespaces as needed... unshare -Ucn program