如何修改HOST文件 本机DNS修改 (很实用建议大家来了解)
(2014-12-28 19:50:19)分类: 网络 |
如何修改HOST文件 本机DNS修改 (很实用建议大家来了解)
今天下载了个绿色无广告版的KUGOO
用过的就知道本来打开后默认进入 KUGOO 音乐首页
但是我打开后却无法显示音乐首页 大网站一般不会出现无法访问 一分析可能是HOST被修改
完了后果然是这样
现在教大家如何修改这个HOST文件
(如果别人可以打开的网站在你电脑上打不开 就有用了 仔细学咯)
举例现在你朋友可以访问我网站www.iqshw.com 而你电脑打不开
1:首先叫你朋友 点开始→运行→CMD→输入命令 ping
www.iqshw.com (注意ping后面有个空格)
Pinging www.iqshw.com [218.93.210.178] with 32 bytes of data:
Reply from 218.93.210.178: bytes=32 time=257ms TTL=113
Reply from 218.93.210.178: bytes=32 time=257ms TTL=113
Reply from 218.93.210.178: bytes=32 time=252ms TTL=113
Reply from 218.93.210.178: bytes=32 time=312ms TTL=113
Ping statistics for 218.93.210.178:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 252ms, Maximum = 312ms, Average = 269ms
2:说明218.93.210.178 就是www.iqshw.com 的正确解析IP
你电脑估计是中流氓软件 强行修改了你的HOST文件
就是本机DNS文件 强行不让你解析到正确的IP 所以你打不开我网站 你朋友却可以
解决
我们找到HOST文件地址
XP的在C盘 C:WINDOWSsystem32driverset
我们用记事本打开后 修改
HSOT源文件为
# 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
127.0.0.1 localhost
我们在后面添加 www.iqshw.com 的 ip 刚刚朋友帮你ping到的IP是218.93.210.178 我们在最后一段那添加一句
218.93.210.178 www.iqshw.com (注意IP与域名之间有空格)
改完后HOST文件内容为
# 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
127.0.0.1 localhost
218.93.210.178 www.iqshw.com
保存 就可以 然后重新打开网站就OK了
后记: 现在流氓软件很多 有的 仅屏蔽某个网站的访问
因此如果大家遇到 别人可以打开的网站 在你机器上就是打不开的话
那可以断定你机器HOST被而已修改了
这时候你就可以利用上述的方法 来修改自己的电脑 HOST 来达到修复的目的