Download the hosts file for Windows 7. HOSTS file


For everyone who has problems with this file!!! The file was checked by Kaspersky, Nod 32, Doctor Web antiviruses - everything is clean! Download the file, unzip it, copy it to the Windows/system32/drivers/etc directory (if Windows asks for permission to replace files, we agree; if it writes an error that you are not an Administrator, try replacing the file using the Total Commander program) and enjoy life. The file is suitable for all latest operating systems:
The file is required mainly for VKontakte users who cannot open any sites, as well as for those who cannot access anti-virus sites or update anti-viruses. Description of the file. Downloading is completely free, without annoying SMS. An article on how to create a hosts file yourself, the article can help you solve your problem.
Also, one of the users provided us with his host file so that you can use it.It blocks all malicious and advertising sites that can harm your computer. We express our gratitude to the user Diman8369 for providing such a file.

Creating and editing a host file in Windows XP

Windows 7, 8, 8.1 and 10


About 8 thousand computers per day are infected with Trojan Hosts

The Doctor Web company reported increasing cases of websites being hacked in order to download malicious programs of the Trojan.Hosts family to users’ computers. The scale of the spread of this threat at the beginning of 2013 became almost epidemic. The peak of the distribution of Trojan.Hosts occurred in January and mid-February, when about 9,500 cases of infection were recorded on user computers every day. In March, Trojan.Hosts infect about 8,000 computers per day.


To hack websites, attackers use FTP protocol, connecting to resources using previously stolen logins and passwords. Then a special command interpreter (shell) is loaded onto the hacked site, using which the .htacess file is modified, and a malicious script is placed on the site.

As a result, when visiting an infected site, the script presents the visitor with a web page containing links to various malicious applications. In particular, this is how Trojans from the Trojan.Hosts family have recently begun to spread widely.

The main purpose of the Trojan.Hosts family of malware is modification host file s located in the system Windows folder and responsible for the broadcast network addresses sites. As a result of malicious actions, when trying to go to one of the popular Internet resources, the user of the infected computer is redirected to a web page belonging to the attackers.

The hosts file is responsible for establishing a correspondence between the domain and the site's IP address. Contacting the host has priority over sending a request to the DNS server, and the file is stored on the computer and controlled by the administrator, which makes it an important element of security Windows operation. In some cases, users are faced with the need to restore the hosts file to its original state. Delete extra entries from it you can do it in two ways: manually and automatically, using special software.

Manual recovery

Typically, restoring the hosts file is required after an action malicious applications, adding new entries to it. A typical attack looks like this: you open Odnoklassniki or VKontakte, and the site reports that your account is blocked and asks you to send an SMS to confirm your login. As a result, money is withdrawn from the phone, and you later find out that instead of VKontakte, the hosts file redirected you to a fake page.

But the host has nothing to do with it: it only turned out to be a tool in the hands of a malicious software. Therefore after Windows cleaning You need to use your antivirus to start restoring the hosts.

Another option is to go to C:\Windows\System32\drivers\et and simply open hosts via Notepad. Inside you will see a lot of text on English language. You need to make sure there are no extra entries in the host. By default, the text should end with the line "# ::1 localhost". Everything after it should be deleted, especially if you yourself did not enter anything into the file.

However, this cleaning may not be complete, so we strongly recommend that you match the contents of your host with the information provided on the support page at https://support.microsoft.com/ru-ru/kb/972034. On Windows 7, the contents of hosts should look like this:

To make sure there are no extra entries, delete the old host and create a new file:


Now the old host will not function, and there will definitely be nothing unnecessary inside the new one, so you don’t have to worry about the safety of your money and personal data.

Automatic recovery

If manual recovery seems complicated, you can fix the host with special utilities. For example, technical Microsoft support in the article about fixing the hosts file on different versions of Windows, it suggests downloading Fix utility It, after launching which unnecessary entries will be deleted without user intervention.

Another way is to use antivirus program AVZ. This powerful tool research and recovery of Windows, but we will consider only one of its functions - cleaning the hosts file.

After entering the required site in the browser, suppose Google.com , the browser sequentially (according to priority) looks for a match between this domain name and the IP addressee (because it is IP addresses that network devices work with).

A) the specified site is checked in the hosts file, if it finds a match (let’s assume 1.1.1.1 Google.com is written in the hosts file), then the contents of IP - 1.1.1.1 will open for you, if there is no specified domain name, proceed to the next step;

b) cache dns is checked (if you have previously opened Google.com, then most likely the IP of this site is saved in DNS cache your computer/laptop), if the IP of the site is indicated there, then the page opens for you, if not, proceeds to the last stage;

V) the request goes to the DNS server (it is registered manually in the settings network connection or issued via DHCP), if the DNS server does not have the specified site, it will “ask” another DNS servers, until it is found (if, of course, it exists at all) and the site opens successfully.

The hosts file is located at C:\Windows\System32\Drivers\etc\hosts (if C- system disk). You can open it with a regular notepad. If you have not made changes to the hosts file, then the following will be written there:

Hosts file in Windows XP:
# Copyright (c) 1993-1999 Microsoft Corp.
#
#


#space.
#

#
# For example:
#

127.0.0.1 localhost

Hosts file in Windows Vista:
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost

Hosts file in Windows 7:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server

# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

Hosts file in Windows 8

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

As you can see, regardless of the version, the host file is not very different, but if a virus “worked” on the hosts file, various sites and IPs can be added there. For example:

127.0.0.1 ftp.kasperskylab.ru
127.0.0.1 ids.kaspersky-labs.com
127.0.0.1 vk.com
127.0.0.1 drweb.com

Such additions to the file prevent you from accessing the specified sites.

1.2.3.4 ftp.kasperskylab.ru
1.2.3.4 ids.kaspersky-labs.com
1.2.3.4 vk.com
1.2.3.4 drweb.com

Such additions in the file when opening the specified sites will redirect you to other sites, possibly infected with viruses (IP-1.2.3.4- are fictitious).

If you find that the hosts file has been changed, it needs to be corrected. In Windows XP, the file is simply opened in Notepad, the necessary changes are made and saved (you must log in as an administrator). On other versions (Windows Vista, 7, 8), you must give permission to change the file. To do this, open the folder in which hosts is located C:\Windows\System32\Drivers\etc(if drive C is system). Click right click mouse on hosts and choose "Properties".

Select a tab "Safety", then select the user under which you work on your computer/laptop (in in this example this is the site) and click the button "Change". A window will open "Permissions for the group "hosts"", select the user again and assign full rights on the file, click "OK", in the window "Properties: hosts", Same "OK".

After that, open hosts with Notepad and return the file to its original state, and save the changes when finished.

What is the Hosts file for?
The purpose of this system file- assigning certain website addresses a specific IP.
This file is very popular with all kinds of viruses and malware in order to write their data into it or simply replace it.
The result of these actions may be signs of “insertion” of a site into browsers, which will ask to send an SMS when opening the browser, or blocking of various sites, at the discretion of the creators of the virus.

Where is the hosts file in windows?
For different versions OS Windows location hosts file is slightly different:

Windows 95/98/ME: WINDOWS\hosts
Windows NT/2000: WINNT\system32\drivers\etc\hosts
Windows XP/2003/Vista/Seven(7)/8: WINDOWS\system32\drivers\etc\hosts


Moreover, the ending hosts, it already is final file, not a folder. He doesn't have it.

What it should look like correct file hosts?
The "contents" of the hosts file are also slightly different for different versions windows, but not really. It “writes” in English why it is needed and how to make exceptions, giving one example. All lines starting with a # sign mean that they are commented out and do not affect the file.
Content original file hosts for Windows XP:


#

#




#space.
#


#
# For example:
#



127.0.0.1 localhost


Contents of the original hosts file for Windows Vista:

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost::1 localhost


Contents of the original hosts file for Windows 7:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost


Contents of the original hosts file for Windows 8:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost


As you can see, the contents of the host file for different windows versions, there are no significant differences.

How to open and edit the hosts file?
The hosts file can be standard Notepad Windows.
This is probably the most interesting part of the article.
First of all, you need to understand why change this file at all? Yes, in order to deny access to certain sites. Thus, by changing this file and having entered the site address into it, the user will not be able to access it through any .
In order to change the hosts file, it is advisable to open it as administrator () by right-clicking on the file and selecting "Run as administrator". Or open Notepad this way and open the file in it.

For quick action, you can simply click the Start button and select Run ( win+r) () and enter in the line:

notepad %windir%\system32\drivers\etc\hosts



As a result, this file will open in Notepad.

In order to block access to the site(let's assume it will be test.ru), you just need to add a line with this site at the very bottom:

127.0.0.1 test.ru


As a result, the file will have the following content:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
#space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a "#" symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# This HOSTS file created by Dr.Web Anti-rootkit API

# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 test.ru


Every new site you want to block must start with new line and register, not forgetting the local IP address 127.0.0.1

Also, to edit the hosts file, there is a program HOSTS EDITOR, which you can download and read the description from.
The way it works is that it helps edit the hosts file.
From the screenshot below the principle of its operation is clear; everything is done in a couple of clicks. Adding is done by clicking on +.


After editing, do not forget to click on the save button (2 button "Save changes" to the left of the "+" button).

You can also change this file for good purposes, for example speed up site loading.
How it works?
When you access the site, you see it Domain name, which has letters. But all sites on the Internet have an IP address, and names are already assigned using DNS. I won’t go into details of this process; that’s not what the article is about. But here you need to know that the hosts file has priority when accessing sites, and only after it does a request to DNS occur.
In order to speed up the loading of a site, you need to know its IP address and domain.
The IP address of a site can be found using various services, for example or.
A domain is the name of a website.
For example, let's speed up the loading of this site where you are reading an article by explicitly specifying the IP address and domain to the file.
Then the added line will be:

91.218.228.14 website


This speeds up page loading in a couple of seconds, and sometimes can give access if standard means You cannot access the site.

Still possible redirect to another site using hosts file.
To do this, you need to know the IP address of the site and its domain (as in the case described above), then the added line will be like this:

91.218.228.14 test.ru


And now, after entering address bar browser of the site test.ru, you will be redirected to the site specified in the IP address..

If you want to clean hosts file, then you can do this by simply deleting the content and inserting the original text from the description above (under spoilers).

Some nuances in the hosts file:

  • Always make sure you have a scroll bar on the side and always scroll to the bottom of the window. This is due to the fact that some viruses are registered in an area hidden outside the window.
  • In some cases, usually if you can’t save the file, you need to log in account Administrator.
  • Sometimes, due to viruses, this file may be hidden. Read the article.
  • The two methods described (redirection and acceleration) may not produce the desired result. The fact is that several sites can be located on one IP address, this is especially true for external IP addresses provided by services.
  • Due to the fact that viruses love this file, its attributes can be changed to Hidden And Read-only.
  • Check the file attributes if the hosts file cannot be saved.

    This way you can easily and free of charge block access to sites in Windows by editing the hosts file.

  • Speaking in simple language file Hosts- This text file without extension which contains a database of domain names and converts them into an IP address. When you enter the name of a site into the browser, the computer converts the name of the site (letters) into numbers (IP address of the site)

    Why do you need hosts?

    Also block access to sites via hosts may malware. In addition, by changing the hosts file and making an appropriate entry in it, they can redirect to another site- a twin site, externally similar to a popular resource, where an inattentive user entering a login and password will lose his credentials from the real site, because they will go to the criminals.

    How to fix HOSTS

    If you encounter problems related to visiting Internet pages - you cannot access the site or are redirected to another site, etc., check the hosts file and correct it if necessary.

    In order to fix hosts need to know where is the hosts file located. The HOSTS file in Windows XP, 2003, Vista and 7 is by default located in the etc folder on the disk partition with the operating system - usually this is partition C, full path

    C:\WINDOWS\system32\drivers\etc

    If your system is on a different partition, then look for hosts file should be there, for example on D

    D:\WINDOWS\system32\drivers\etc

    On other Windows operating systems find host possible at the address

    WINNT\system32\drivers\etc - for NT and 2000

    WINDOWS\hosts - for 95, 98 and ME

    Because HOSTS text file, then it is torn off using any or regular Notepad built into the system

    In different operating systems hosts file looks different, there are slight differences

    hosts for Windows XP and Windows Server 2003

    # (C) Microsoft Corp. 1993-1999 # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost

    hosts for Windows Vista and Windows Server 2008

    # (C) Microsoft Corp. 1993-2006 # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost::1 localhost

    hosts for Windows 7

    # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

    # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost

    Copy the code required for your system and paste it in place of the old one. The myth that in order to save changes to the HOSTS file you first need to rename it is incorrect. I easily edit the hosts file and all changes are saved.





    

    2024 gtavrl.ru.