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 do write and do experiments with online tools, software, and games. When he is not doing anything, he will be sleeping for sure. Eating, being online in the night is what he usually does.
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.