美文网首页
【上网】改Hosts访问Google失败

【上网】改Hosts访问Google失败

作者: Babyd | 来源:发表于2019-05-06 23:41 被阅读0次

一、前言

许多国外网站上不去,Google、微软的onedrive都不能用,最近发现有个改Hosts方法,据说可以解决这个问题,但本人实测没用,不知道是不是自己没弄对,但研究下还是很有意思的。

二、实战

(一)下载

首先Github上有个项目发布Google Hosts:https://github.com/googlehosts/hosts
可以从这里下载到最新的Hosts文件

(二)安装

把自己hosts替换掉
hosts所在文件夹:
Windows 系统hosts位于 C:\Windows\System32\drivers\etc\hosts
Android(安卓)系统hosts位于 /etc/hosts
Mac(苹果电脑)系统hosts位于 /etc/hosts
iPhone(iOS)系统hosts位于 /etc/hosts
Linux系统hosts位于 /etc/hosts
绝大多数Unix系统都是在 /etc/hosts

(三)问题排查

若更新后,hosts 没有立即生效,请重置网络:
在系统设置内开关网络,或启用禁用飞行模式,或者重启、刷新DNS缓存、浏览器缓存。

  • Windows
    开始 -> 运行 -> 输入cmd -> 在CMD窗口输入

ipconfig /flushdns

  • Linux
    终端输入

sudo rcnscd restart

对于systemd发行版,请使用命令

sudo systemctl restart NetworkManager

如果不懂请都尝试下

  • Mac OS X终端输入

sudo killall -HUP mDNSResponder

  • Android
    开启飞行模式 -> 关闭飞行模式
  • 通用方法
    拔网线(断网) -> 插网线(重新连接网络)
  • 如不行请清空浏览器缓存(建议不要使用国产浏览器,请使用谷歌Chrome浏览器)

(四)总结

实测该打不开的还是打不开,呵呵哒。

相关文章

  • 【上网】改Hosts访问Google失败

    一、前言 许多国外网站上不去,Google、微软的onedrive都不能用,最近发现有个改Hosts方法,据说可以...

  • 通过改hosts访问wikipedia

    能访问https://www.wikipedia.org 大部分时候我们是可以访问的wikipedia的主页或是英...

  • google hosts

    目前能ping通的IP:216.58.193.51 59.18.44.245 59.18.44.53 59.18....

  • Google hosts

    https://laod.cn/hosts/2017-google-hosts.html

  • Hosts

    Hosts Hosts不是长久有效的,如发现访问不了则需更新最新的Hosts。Hosts更新后打开浏览器访问htt...

  • app 上架 Google Play 与 集成 google p

    前置条件:能够科学上网(否则网站都访问不了,那就别想了) 一、注册 Google 邮箱账号【进入 Google 账...

  • 翻墙

    https://laod.cn/hosts/2017-google-hosts.htmlhttp://www.ma...

  • Nginx

    Nginx常用功能 正向代理服务于客户端,可用于访问原来无法访问的资源,如google,可以记录用户访问记录(上网...

  • 服务器安全设置学习二

    一、限制网络访问 1.host设置 修改/etc/hosts.deny和/etc/hosts.allow来增加访问...

  • Linux Shell: 自动更新hosts实现免翻墙访问goo

    用shell来获取google hosts的脚本:脚本内容: cat google_update.sh '#!/b...

网友评论

      本文标题:【上网】改Hosts访问Google失败

      本文链接:https://www.haomeiwen.com/subject/eeajoqtx.html