Using Hosts files to avoid mistaken access to malicious websites

Source: Internet
Author: User
Tags live chat

From CCID

Recently, live chat viruses are rampant. These viruses mainly send malicious website addresses that are infected with viruses through QQ, MSN, and other instant chat tools.

How can we prevent unauthorized access to known malicious websites? Here we will introduce you to a simple and effective defense method-using Hosts files to prevent mistaken access to malicious websites!

Analysis

When we use a domain name to access a website, the DNS server in the network will interpret the domain name as the corresponding IP address. If the domain name of a malicious website interferes with the explanation result before being interpreted as the corresponding IP address, will it not achieve our goal?

Solution

The Hosts file can help us implement this idea. Take the Win98 system as an example. The Hosts file is located in the "C: Windows" directory. It can be regarded as a local DNS system and has a higher priority than the DNS server on the network. We can open it in notepad, and you will see instructions for using the Hosts file. For example, we can write the following line: 127.0.0.1 www.test.com

Save and run: ping www.test.com in the MS-DOS window

What do you see? Yes! The system interprets the domain name www.test.com as 127.0.0.1 (local IP address), which is exactly what we want! Of course, we can also specify the IP address of the website that we usually visit. Do you understand this? We can describe all the domain names of known malicious websites to the IP addresses of the cost machines, that is, 127.0.0.1. After this setting, when we mistakenly access a malicious website, Hosts will interpret the domain name as the address of the cost server to prevent unauthorized access to the malicious website. After I write several example website addresses (not real URLs) into the Hosts file, When you access these URLs, you will directly access 127.0.0.1:

127.0.0.1 www.123.com
127.0.0.1 321.123.com
127.0.0.1 213.123.com
127.0.0.1 321.123.com

Note: The default file name stored in the Hosts file is Hosts. sam. After modification, you must remove the extension. sam; otherwise, the file is invalid.

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.