Add C:\windows\system32\drivers\etc\hosts To Exclusions To Prevent License Blacklisting

 Posted admin
Add C:\windows\system32\drivers\etc\hosts To Exclusions To Prevent License Blacklisting Average ratng: 9,2/10 2686 votes

The Hosts file in Windows 10/8/7, is used to map hostnames to IP addresses. This Hosts file is located deep down in the Windows folder. It is a plain text file, and the size of the original default Hosts file is around 824 bytes.

I do web server development and testing on my Windows 7 PC. However, Norton keeps removing my entries in the hosts file thinking they are hacking attempts. How do I get this to stop happening without having to turn off anti-virus protection? Norton seems to do this several times per day and it is driving me nuts! The clerk accepts the check and asks to see your driver’s license. You show the clerk your driver’s license, and the clerk looks at it, looks at you, looks at your driver’s license again, writes the driver’s license number on the check, asks whether you’ve gained some weight since the picture was taken, and then accepts the check.

Hosts File in Windows

In this post, we will see its location and also how to manage, lock or edit the Hosts file.

Host file location

The Hosts file in Windows is located at the following location:

Lock Hosts file to prevent hijacking

Imagine clicking on www.thewindowsclub.com and seeing a completely different website load in your browser. Malware can redirect Web addresses on your computer by altering your hosts file. This is referred to as the Host File Hijack.

Hosts File Download

To prevent Host file hijacks, you may navigate to it, right-click on it, select Properties and make it a Read-only file. This will lock down your Hosts file and prevent anyone or any malware from writing to it.

Block website using Hosts file

To block a website using the Hosts File, simply add the following entry:

127.0.0.1 blocksite.com

Although I do not do it, many users like to manually add entries to it in order to block the opening of one or more particular websites. Others, like to download and use List from well-known sources like mvps.org, to add entries which block malware sites from opening.

Edit Hosts file

If you need to edit the Hosts file, navigate to the following folder location:

Here you will see the Hosts file. Right-click on it and select Notepad. Make the changes and Save.

But sometimes, even when you are logged on with administrative credentials, you may receive the following error message:

Access to C:WindowsSystem32driversetc hosts was denied

Or

Cannot create the C:WindowsSystem32driversetchosts file. Make sure that the path and file name are correct.

In this case, type Notepad in start search and right-click on the Notepad result. Select Run as administrator. Open the Hosts file, make the necessary changes, and then click Save.

HostsMan

While you can always manually manage or edit Hosts file manually, I would like to suggest that you use a third-party freeware tool like HostsMan to do it.

HostsMan is a feature-rich tool that lets you add, remove, edit entries in the Hosts file. It also lets you easily add third-party Hosts lists that help in blocking malware sites and lets you easily enable or disable the hosts file. It includes a built-in hosts file updater & a hosts editor. It lets you scan the hosts file for errors, duplicates, and possible hijacks – and also lets you create an Exclusion list. One more useful feature it offers is the Hosts file backup manager. Backup your Hosts file to a safe place and use it to restore it, should the need arise.

Hostman also lets you Flush DNS cache, open Hosts with a text editor, count the number of hosts, find duplicates, replace IP, scan hosts for malicious entries, rearrange hosts, manage DNS Client Service and more. In short, its the only Hosts Manager that you will even need. You can download it from its home page. SysMate Hosts File Manager is another tool that lets you do so.

How to manually reset Hosts file back to default in Windows may also interest you.

If your browser has been hijacked, you might find this post on Browser Hijacking and Free Browser Hijacker Removal Tools helpful.

TIP: Download this tool to quickly find & fix Windows errors automatically

Related Posts:Asp.net 4.0 black book pdf free download pdf.

Windows 8 takes a new approach to the hosts file by default – it won’t allow you to block Facebook and other websites by modifying your hosts file. Luckily, there’s a way to bypass this restriction.

When you add certain website addresses to Windows 8’s hosts file, Windows 8 will automatically remove them, effectively ignoring your changes. Microsoft isn’t just doing this to annoy us – there’s a good reason for it.

What’s a Hosts File?

When you access a website, your computer contacts your domain name system (DNS) server and requests its numerical IP address. For example, Facebook.com maps to 66.220.158.70. Your computer will then connect to this numerical IP address and access the website.

Add C:\windows\system32\drivers\etc\hosts To Exclusions To Prevent License Blacklisting

Your hosts file is a file, local to your computer, that can override this behavior. By editing your hosts file, you can point Facebook.com at any IP address you want. Some people use this trick to block websites – for example, you could point Facebook.com at 127.0.0.1, which is your computer’s local IP address. When someone tries to access Facebook.com on your computer, your computer will attempt to connect to itself at 127.0.0.1. It won’t find a web server, so the connection will immediately fail.

Why the Restriction is in Place

Unfortunately, malware often edits the hosts file to add such lines. For example, the malware could point Facebook.com at a different IP address entirely – one run by a malicious organization. The malicious website could even be disguised as Facebook.com. A user would look at their address bar, see Facebook.com, and never consider that they may be looking at a phishing site.

To prevent this from taking place, Windows 8 (more specifically, the Windows Defender antivirus included with Windows 8) monitors your hosts file. When it notices that a website such as Facebook.com has been added to your hosts file, it immediately removes the entry and allows connections to the normal Facebook.com website.

This is actually an important security feature for many users that would never consider editing their hosts file. However, if you’re a tech savvy user that wants to edit your hosts file to block a website, you can disable this restriction.

Ways to Bypass the Restriction

Because this restriction is put in place by the Windows Defender (formerly known as Microsoft Security Essentials) antivirus included with Windows 8, you have several options for bypassing it:

  • Exclude the hosts file from being monitored in Windows Defender – If you want to use Windows Defender instead of a third-party antivirus, this is your best option. This does mean that Windows won’t protect you from malicious hosts file entries added by malware, however.
  • Install a Third-Party Antivirus – Many third-party antivirus applications won’t be as aggressive about policing your hosts file. Many, such as avast! and AVG, are free. When you install a third-party antivirus, Windows Defender will disable itself.

You can also disable Windows Defender entirely, but that isn’t a good idea unless you’re using a third-party antivirus. Even if you’re a careful computer user, having multiple layers of protection is a good security practice.

Excluding the Hosts File

To exclude the hosts file from being monitored in Windows Defender, first open Windows Defender – press the Windows key, type Windows Defender, and press Enter.

Click the Settings tab and select the Excluded files and locations category.

Click the Browse button and navigate to the following file:

C:WindowsSystem32Driversetchosts

(If you installed Windows to a different directory, start in that directory instead of C:Windows)

Click the Add button and then click Save Changes to save your changes.

You may now edit the hosts file normally.

Editing Your Hosts File

You’ll have to edit your hosts file as administrator. If you open it normally and try to save it, you’ll see a message stating you don’t have permission to save a file in its location.

To launch Notepad as administrator, press the Windows key, type Notepad, right-click the Notepad application that appears, and select Run as administrator. (You can also launch any other text editor you prefer, such as Notepad++.)

Click File –> Open in the Notepad window and navigate to the following file:

C:WindowsSystem32Driversetchosts

You’ll have to select All Files in the file type box at the bottom of the open dialog or the hosts file won’t appear in the list.

Add a line for each website you want to block. Type the number 127.0.0.1, followed by a space or tab, and then type the name of a website. For example, the following lines would block both facebook.com and example.com:

127.0.0.1 facebook.com

127.0.0.1 example.com

Save the file after you’re done. Your changes will take effect immediately and the website will be blocked – no system or browser restart required.

READ NEXT
  • › How Do Internet Speed Tests Work? (and How Accurate Are They?)
  • › How to Stream UFC 239 Jon Jones vs. Santos Online
  • › How to Check Your Wi-Fi Signal Strength
  • › What Is “Upscaling” on a TV, and How Does It Work?
  • › How to See the Applications Using Your Network on Windows 10