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
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.
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:
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 Google.com”
Make a note of the website name displayed above the IP address. This is the name of the site associated with the IP address.
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.
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.
Click Start, then click “All Programs” and select “Accessories” from the list. Right-click “Notepad,” select “Run as Administrator” and then click “Yes.”
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.
Scroll to the bottom of the file and, on a new line, type “127.0.0.1” (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.
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 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.