You can block a program (or several programs) from accessing the Internet. You can block Internet access for the entire computer, or you can temporarily disable Internet access on your computer so that you do not interfere with your work. The easiest way to deny internet access (in any operating system) is to remove the network card or disconnect the network cable. But in this article we will tell you how to block Internet access using software tools.
Steps
Method 1 of 4: Blocking Internet Applications Through a Firewall (Windows)

Step 1. Click Start> Control Panel
In Windows 8, move your cursor to the upper-right corner of the screen to open the Charms bar, and then click Control Panel. Or press Windows + C and then click Settings

Step 2. Open Security Center

Step 3. Open Windows Firewall settings
- Go to the Exceptions tab.
- Uncheck the boxes for the programs that you want to block access to the Internet.
- Click OK.

Step 4. Open the program and try to go online
A program whose Internet access you have blocked in Windows Firewall will not be able to access the Internet. With other programs, in terms of access to the Internet, there should be no problems.
Method 2 of 4: Disconnect a Specific Connection (Windows)

Step 1. Click Start> Control Panel
In Windows 8, move your cursor to the upper-right corner of the screen to open the Charms bar, and then click Control Panel. Or press Windows + C and then click Settings

Step 2. Open the Network and Sharing Center
To do this, in the "Network and Internet" section, click "Network settings, network adapters"> "View network status and tasks" (if you have enabled category view). Or just click on "Network and Sharing Center" (if you have turned on the display of icons).

Step 3. Select the Wi-Fi connection by clicking on it with the left mouse button
Now right click on the highlighted Wi-Fi connection and click Disable. This will block Internet access on that particular Wi-Fi network, but you can use other networks to connect to the Internet (if you don't block them too). This will not affect the ability to connect to this Wi-Fi network from other computers.
- If you later want to unblock this Wi-Fi connection, right-click on it and select “Enable”.
- To use this method, log on as an administrator or a member of the Administrators group. If your computer is connected to a network, network policy settings may prevent the connection from being disconnected.

Step 4. Disable all network connections (if you are an advanced user)
Click Start> All Programs> Accessories, right-click Command Prompt and select Run as Administrator. In the window that opens, enter mmc compmgmt.msc and press Enter. In the left pane of the window that opens, click "Device Manager". Expand the Network Adapters section, right-click each device in turn and select Disable. Restart your computer (optional).
To enable all network connections, repeat the process, but select “Enable” instead of “Disable”

Step 5. Use software that provides parental control capabilities
With the help of such programs, you can block access to the Internet - either completely or to certain sites. Install such a program on your computer. Some programs are paid, but they will make sure that your child is not using the Internet in a way that you would not like.
In macOS, you can activate built-in parental controls and block Internet access for specific accounts
Method 3 of 4: Create a fake proxy server

Step 1. Click Start> Control Panel> Internet Options

Step 2. Go to the "Connections" tab and click "LAN Settings"

Step 3. Uncheck the box next to the "Automatic detection of parameters" option
Then check the box next to the "Use a proxy server" option and enter your fake proxy settings. In this case, when you try to open any site, the browser will give a connection error.

Step 4. Remember that an experienced user can open the settings and get rid of your fake proxy server, that is, restore your network connection
Method 4 of 4: Block Internet Connections Using Programs

Step 1. You can deny Internet access through special programs
Such programs come in handy if you want to temporarily disable Internet access, but do not want to delve into the firewall settings. Perhaps you want to work offline, but don't want to deprive yourself of the ability to quickly connect to the Internet. As a rule, through such programs, you can block Internet access either completely or only to certain sites.

Step 2. Use the Toggle Internet script
This small utility allows you to temporarily disable Internet access on a Windows computer, literally in one click. At the same time, you can restore your Internet connection at any time. First, download the Toggle-Internet.bat file and place it on your desktop.

Step 3. Right click on the utility icon (on the desktop) and select "Run as administrator"
This will instantly disconnect the internet. If you need to restore your Internet connection, right-click on the utility icon and select "Run as administrator".
This script simply toggles the state of your network adapter (network card), thereby blocking access to the Internet. If you want to manually switch the status of the network adapter, please do the following: Click Start> Control Panel> Network and Internet> View Network Status> Change Adapter Settings

Step 4. Use the Let Me Work utility
The Toggle Internet script completely blocks access to the Internet, but if you need to block access only to certain sites, use the Let Me Work utility. In this utility, specify the sites to be blocked, and it will modify the Hosts file to temporarily disable access to these sites.
Advice
- Always check the Exceptions section of your firewall to ensure that there is no program in there that should not be connected to the Internet.
- When we block a program from accessing the Internet, it means that this program will not be able to download updates or send some data. Therefore, make sure that this program does not really need an internet connection.
- Think twice before blocking Internet access (although most of the methods described here involve quickly restoring your Internet connection).
- Blocking Internet access in Linux is as easy as shelling pears. Ubuntu distributions use the ufw package as a firewall.