I'd like to write a bash/shell script that "turns off" the machine's ability to communicate over it's network card, effectively shutting down all networking. From the command line:
# To turn all networking off sh networking.sh OFF # Then to turn it back on sh networking.sh ON
The only way I can think of doing this would be at the port-level via
IPTABLES, but having never experimented with that before, I'm not sure if I'm even heading down the right avenue or if I'm way off base. Thanks in advance.