How to Modify the Hosts File to Block Bad IPs (RIAA / MPAA Etc)

A Guide to the Hosts File

ssb
Why modify the Hosts file?

The Hosts file is consulted every time you connect to a website. It's like an address directory.

If the site is listed in the list of allowed sites in the Hosts file, access is allowed. If the site is listed in the list of banned sites of the Hosts file, access is blocked.

By altering the Hosts file, you can:

* Prohibit access to certain sites,

* Accelerate access to sites that you prefer and which you know the IP address

Changing the hosts files is easy, and you can also reverse any changes that you make.

Where is the original Hosts file?

The original Hosts file is here ---> C: \ WINDOWS \ system32 \ drivers \ etc \ hosts

What does it contain?

It should contain this if it is intact:

-------------------------------------------------- --------------------------

Copyright (c) Microsoft Corp..

#

# This is a sample HOSTS file used by Microsoft TCP / IP

# For Windows.

#

# This file contains matches IP addresses to host names.

Each # entry should be on a clean line. The IP address should be placed

# In the first column, followed by the corresponding host name. The address

IP and # hostname must be separated by a space.

#

# Additionally, comments (like this) can be inserted.

# They are given by

# Symbol '#'.

#

# For example:

#

# # 101.53.93.96 hello.ads.com source server

37.24.62.11 x.ads.com # # x client host

127.0.0.1 localhost

-------------------------------------------------- ------------------------------

Modifying

First, to ease your work, we will create a shortcut on the desktop to directly edit the famous Hosts file.

Right click on the desktop on an empty space New> Shortcut

In the "Location" (or "Target"), paste this (unedited, with the quotation marks!)

"C: \ Program Files \ Windows NT \ Accessories \ wordpad.exe" "C: \ WINDOWS \ system32 \ drivers \ etc \ hosts"

Now we are going to do something useful, add sites to block:

Select this: (Note that a space between 127.0.0.1 daddy.com TAB)

127.0.0.1 daddy.com

127.0.0.1 mummy.com

127.0.0.1 sonny.com

127.0.0.1 monday.com

127.0.0.1 yact.com

127.0.0.1 scroll.com

* 127.0.0.1 bump.com

* 127.0.0.1 compost.com

* 127.0.0.1 hunger.com

It is obvious that you can add all the addresses that you want.

Attention, however, if your Hosts file becomes large, it may be a problem with the ClientDNS of Windows that would duplicate (which puts the process svchost to 99% in your Task Manager), so be careful.

We just have to disable this service if you want to use a large Hosts file:

Start / Run / type services.msc / look in the right column ClientDNS / set it to "disable".

Restore the Hosts file to its original state

Malware may modify the Hosts file to redirect to another server. They can also block access to sites, such as anti-virus, to make disinfection of the machine more difficult.

To restore the Hosts file to its original state, download the program rhosts. Run it and click Restore. Simple!

Published by ssb

View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.