Firejail is an open source Linux sandbox program.
# apt install firejail
To start xterm with unconnected network:
xterm
$ firejail --noprofile --net=none xterm