[Windows] C:/Windows/system32/Drivers/etc/hosts file

Source: Internet
Author: User
Tags website domain names

C:/Windows/system32/Drivers/etc/hosts file

 

 

Host is a system file without an extension and can be opened using notepad and other tools. Its function is to associate some common website domain names with their corresponding IP addresses with a "Database ", when a user enters a URL in the browser to log on to, the system will first automatically find the corresponding IP address from the hosts file. Once found, the system will immediately open the corresponding webpage. If not found, the system then submits the website address to the DNS domain name resolution server for IP Address Resolution. Now I will introduce three special advantages of this document.

Retrieve "invalid" website
I was very ashamed to mention this. I had logged on to Sohu's site several times the other day, but I couldn't open the homepage, so I decided that Sohu may shut down the Server due to internal adjustments, I even sent text messages to my friends to report the news I found "! When I know that I can open the legendary Sohu website on almost all other computers, but I cannot open it myself, I am so stupid. Is it really a "Character Problem" that my friends say "......
In the run box, enter "Ping Www.sohu.com And found that the returned IP address is not the "220.181.26.133" corresponding to Sohu, but rather the "127.0.0.1 "! So far, some malicious web scripts have modified the author's hosts file, that is, a "127.0.0.1 Www.sohu.com "Record, when I enter the Sohu URL in the address bar, the IP address resolved by the system is not the correct" 220.181.26.htm "but" 127.0.0.1 ", so it is natural that I cannot open it.
The solution is very simple. Find the hosts file in the C:/Windows/system32/Drivers/etc folder and open it with notepad (for Windows 9x/me systems, find the hosts file in the C:/Windows Folder ), record the error (for example, "127.0.0.1 Www.sohu.com ") Or delete all records, save the file and exit, then log on to the site of Sohu should be unobstructed.
Tip: If you feel like you are manually searching for the hosts file and manually specifying the notepad tool to open the hosts file
Automatic shielding of malicious Web plug-ins
Watching free movies online is a hobby of the author. Some time ago, after being recommended by a Hero Friend, I finally found a very good online movie site, however, before opening each movie play page, the site will send a webpage requesting the installation of Baidu tool bar and enter the download and installation status immediately without the user's consent! Although this webpage window can be closed, it is not a movie to watch. Every time you connect to the download page, it will definitely affect the normal webpage opening speed and the smoothness of the video being played.
Through observation, the Baidu tool bar installation window from Dan in each movie play page is the same web site. Because the original web site is long, we use Http://www.123.com/aa.exe Next, open the hosts file in the system folder, open a new line in the file, and enter "0.0.0.0 Http://www.123.com/aa.exe "(The entered content is not enclosed in quotation marks, but there is a space between the IP address and the URL), then save the file and exit. When the movie site tries to open Http://www.123.com/aa.exe Page, the system automatically resolves it to an impossible IP address such as "0.0.0.0", thus shielding the web page plug-in.
Tip: 1. Users can use the same method to completely block other malicious plug-ins, various webpage Dan ads, and some illegal websites from being added to the hosts file. In addition, if you need to add a blocked URL to the hosts file frequently, you do not need to go to the system directory to find the hosts file every time: Switch "" to the "Edit hosts table" tab, click the Add button to add blocked URLs to the hosts file in batches.
2. have you ever experienced such a strange thing: When you normally browse the webpage or perform other office operations, IE will automatically generate the whole screen webpage advertisement at intervals and the content of these webpage advertisements will be automatically and randomly changed! However, the URL format is relatively fixed: for example Http://www.xxx.net , Http://www.xxx.net/v/ And Http://www.xxx.net/new /, In fact, this is a series of Trojan viruses similar to "win32.troj. popweb". You can also resolve these URLs to "0.0.0.0" in the above method to get rid of virus harassment.
One-click logon to the specified server on the LAN
The Organization's "senior engineer" built a CS battle server in the company's Lan, so we were the only single man who had enough food for the whole family and now had a good place to spend their time off work. However, there is a weakness. No DNS server is set up in the LAN, so we can only enter IP addresses for Logon at a time. Although the number is not a large number, the numbers are boring after all!
In this case, we can modify the hosts file to log on to the CS server in the LAN with one click: Open the hosts file, enter "221.555.78.122 aa.com" in the blank line (assuming 221.555.78.122 is the IP address of the CS server in the LAN ), in this way, you can directly log on to the CS server on the LAN by entering "aa.com.
Computer enthusiasts Www.0595sos.com Ben Article Address Http://www.0595sos.com/viewthread.php? Tid = 15353

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.