If you are using Windows 8, you can move the mouse up to the top right-hand corner of your screen to show the “charm bar,” then click on “Control Panel”. Alternately, hold down the Windows key while pressing C and click on “Settings”. [1] X Research source

Open the “Exceptions” tab. Un-check the program for which you want to block access to the internet. Click “OK” when prompted.

If you are using Windows 8, you can move the mouse up to the top right-hand corner of your screen to show the “charm bar,” then click on “Control Panel”. Alternately, hold down the Windows key while pressing C and click on “Settings”.

This process is reversible. If you want to enable the network connection later, you can do so by right-clicking on the WiFi connection and clicking “Enable”. You must be logged on as an administrator or a member of the Administrators group in order to complete this process. If your computer is connected to a network, network policy settings may also prevent you from disabling the connection.

To undo this, simply repeat the process but instead of selecting Disable, select Enable.

On Apple OS X, you can configure the built-in parental controls to disable access to the internet for certain accounts.

Internally, the script merely toggles the status of your Network Adapter (also known as the LAN adapter or Ethernet card) thus shutting down the Internet for you. If you were to disable or enable the Network Adapter manually, the steps would be Control Panel -> Network and Internet -> View Network Status -> Change Adapter Settings.