修改 Hosts 档案免 VPN 直接连线造访被 DNS 污染网站教学
对于电脑用户而言,可能因为 ISP 电信商,或是身处对岸关系,遇到 DNS 污染或是服务器没有即时更新,导致无法浏览网站情况?这种时候可以修改 Windows 系统资料夹 Hosts 档案来改善这情况,帮助用户们可以顺利造访各大网站与玩游戏,来看教学 ~
使用教学:
如下图电脑打开资料夹 C:\Windows\System32\drivers\etc,找到名为 hosts 档案使用记事本开启。
接着于下方添加相对应网域还有 IP 位置(注意:IP 和网址间有个英文空格,连结不含 https://),完成后按存盘即可。
修改好的 hosts 档案记得要先清除浏览器暂存盘案,接着在网址贴上原本被 DNS 污染无法造访连结,这时链结务必加上 https:// 例如 https://www.google.com/ 。
#备注1:此方法须 IP 仍可识别没有被屏蔽封锁,否则仍须透过 VPN 才能顺利造访。
#备注2:手机装置步骤繁杂安卓需要 root、iPhone 得要越狱权限要求高 之后有空介绍。
Hosts 档案重设回默认值:
Windows 10 hosts 档案默认值如下,可搜寻 %WinDir%\System32\Drivers\Etc 找到档案并进行覆蓋。
# 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
至于 Windows 7 与 XP hosts 档案默认值分别如下,搜寻 %WinDir%\System32\Drivers\Etc 找到档案并进行覆蓋。
# 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
# 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
另外补充一下有玩侠盗列车手 GTA V 朋友们可能因为 Rockstar Games 俗称 R 星连线问题无法玩游戏,可以把下列资讯填入 hosts 档案,完成后另存新档就可以了。
# RockStar Start
192.81.241.11 conductor-prod.ros.rockstargames.com
192.81.241.100 conductor-prod.ros.rockstargames.com
#208.111.148.6 patches.rockstargames.com
#208.111.149.150 prod.cloud.rockstargames.com
#54.68.41.239 prod.cs.ros.rockstargames.com
192.81.245.200 prod.p01sjc.pod.rockstargames.com
192.81.245.201 prod.p02sjc.pod.rockstargames.com
192.81.241.11 prod.ros.rockstargames.com
#54.149.44.210 prod.telemetry.ros.rockstargames.com
# RockStar End