Here's a simple bash script that will toggle between two commands. It saves the current state in a hidden file in your home directory, and checks it each time to see what should be done. If the hidden file doesn't exist or doesn't contain the correct information, it defaults to running the "off" command.
Code:
#!/bin/bash
[[ -r $HOME/.netonoff ]] && . $HOME/.netonoff
case ${status:-on} in
off) [insert "ON" command here]
status=on
;;
*) [insert "OFF" command here]
status=off
;;
esac
echo "status=$status" > $HOME/.netonoff
exit 0
You'll need to add the commands you want to use in the appropriate places.
Just save this to a text file, chmod it to make it executable, then create a shortcut to launch it. Assuming no complications, that should do it.