Thursday, July 11, 2024
HomehowtosMethods To Block An IP Address On A PC

Methods To Block An IP Address On A PC

Although you can find unique programs which might allow you to block access to specified IP addresses on a PC, exactly the same outcomes are possible by editing the Windows hosts file, present on all Windows computers. The factor of the hosts file is to plan host names of IP addresses. Changing the IP address in the hosts file blocks any outgoing connections to the specified site, enabling you to increase network security or control browsing activity. Attaching towards the websites blocked via the hosts file, it will be impossible, preventing any harmful code or viruses downloading onto your computer or network.

Steps To Block An IP Address On A Computer

Step 1

Simply click the Start button and then type “cmd” (without the quotation marks) in the “search programs and files box.” Press “Enter” to open the command prompt.

How to Block an IP Address on a Computer23445654

Step 2

Type “nslookup” (without the quotation marks) and then the IP address which you like to block. For example, if the IP address is 99.999.999.99, you would type the following:
nslookup 99.999.999.99
Then press “Enter.” If you need the IP address of a website, type “ping” (without the quotation marks) followed by the URL of a website. For instance, “ping”

How to Block an IP Address on a Computer123445665657

Step 3

Make a note of the website name displayed above the IP address. This is the name of the site associated with the IP address.

How to Block an IP Address on a Computer13234454565

Step 4

Open Windows Explorer and navigate to your Windows installation folder, by default on the primary (C:) drive in the “Windows” folder. Open “System32,” “drivers” and then the “etc” folder to display the hosts file.

How to Block an IP Address on a Computer2354654765867

Step 5

Right click the file named “hosts” and select “Copy.” Right-click anywhere inside the folder and click “Paste.” Click “Continue” to create a file named “hosts – copy” which serves as a backup in case you do anything wrong and need to restore the hosts file.

Step 6

Click Start, then click “All Programs” and select “Accessories” from the list. Right-click “Notepad,” select “Run as Administrator” and then click “Yes.”

Step 7

Click “File” and then select “Open” from the File menu. Select “All files” from the drop-down menu next to “File name” to display all file types, and then select “hosts.” Click “Open” to open the hosts file with administrator privileges, necessary in order to save the file.

Step 8

Scroll to the bottom of the file and, on a new line, type “” (without the quotation marks.) Leave a space, and then type the name of the website associated with the IP address that you want to block.

How to Block an IP Address on a Computer3254654657654

Step 9

Save and close the hosts file and restart your computer for the changes to take effect. The IP address associated with the blocked site will no longer be accessible.

Sahil Shah
Sahil Shah
Sahil Shah is B.E passed out. He loves to write and do experiments with online tools, software, and games. He is an expert tech writer for 10+ years. He is a part-time scientist as well. Eating, and being online at night is what he usually does.


Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

- Advertisment -