对于长城宽带的http劫持解决办法
Tofloor
poster avatar
Experience
deepin
2016-05-30 17:39
Author
本帖最后由 Experience 于 2016-5-30 16:31 编辑

长城宽带用户升级系统是否遭遇这情况

清清楚楚看到175.188.96.101这ip地址,可以看出是宽带的http劫持。
经过我网上找无数解决办法终于找到这文章   https://onebitbug.me/2013/12/19/escape-isp-http-hijacking/


在终端输入:  iptables -A INPUT -p tcp --sport 80 -m string --string "Location: http://劫持的ip" --algo bm -j DROP

比如我的:       iptables -A INPUT -p tcp --sport 80 -m string --string "Location: http://175.188.96.101" --algo bm -j DROP

                       


哈哈一切正常


不过重启后这些规则会被清零,就是说不会保存。
想保存的请访问 http://www.cnblogs.com/wangkangluo1/archive/2012/04/19/2457072.html


Reply Favorite View the author
All Replies
wanywhn
deepin
2016-05-30 18:05
#1
曾經出現過這情況,然而不是劫持的原因。再刷一遍就好了。
Reply View the author
153******45
deepin
2016-06-26 23:23
#2
wanywhn 发表于 2016-5-30 10:05
曾經出現過這情況,然而不是劫持的原因。再刷一遍就好了。

这个不一定的,好多二级运营商会劫持的
Reply View the author
joyk3000
deepin
2016-06-27 21:03
#3
可以试一试
Reply View the author
tr******rt@outlook.com
deepin
2016-06-27 23:13
#4
马一下。。。
Reply View the author
kingskill
deepin
2016-06-27 23:58
#5
进来学习。。。
Reply View the author
liux
deepin
2016-07-04 16:07
#6
你那个IP是内网IP吧,没给你分配公网IP。

你那个是DNS劫持还是HTTP劫持?
Reply View the author
Experience
deepin
2016-07-05 03:39
#7
本帖最后由 Experience 于 2016-7-4 19:40 编辑
https://bbs.deepin.org/post/39827
你那个IP是内网IP吧,没给你分配公网IP。

你那个是DNS劫持还是HTTP劫持?

那个”175.188.96.101“ IP是长城宽带的缓存服务器的ip地址
你没认真看那张图片,终端后面有个网页是IP查询的

Reply View the author
snyh1010
deepin
2016-07-05 04:28
#8
感觉可以收集一下,添加几个规则。 凡是从官方源下载的数据如果被劫持了就直接丢弃。
看着应该是可行的。 原文章里只是简单的匹配ISP劫持的关键信息。

我们可以增加检测官方源(镜像源不需要处理,因为会走镜像源的话,访问地址不一样的话,内容肯定不一样),从而
大大减少过滤规则影响的效率(通过IP匹配).

但如果ISP不是这种处理方式就可能悲剧了。。直接导致完全无法使用了。
Reply View the author
choldrim00caijun
deepin
2016-07-05 05:16
#9
赞,感谢分享,我也是长宽,也遇到过,不过这阵子比较正常,mark一下
Reply View the author
yjqcx89
deepin
2016-07-05 05:53
#10
HTTPS源完美解决运营商缓存服务器问题,跟文件校验失败说再见。附上本人的关于源的帖子。

https://bbs.deepin.org/post/39876
Reply View the author
Experience
deepin
2016-07-06 04:33
#11
https://bbs.deepin.org/post/39827
赞,感谢分享,我也是长宽,也遇到过,不过这阵子比较正常,mark一下
...

过一段时间正常是因为缓存服务器已经同步了链接中的资源
Reply View the author
tangzipeng
deepin
2017-04-14 06:03
#12
感谢分享,解决了我的问题~F××K长城宽带~DNS、HTTP双劫持……
Reply View the author
markson
deepin
2017-04-14 06:16
#13
直接改hosts,把Deepin的服务器加上最省事
Reply View the author
Feng Yu
deepin
2017-04-14 06:17
#14
全站https才是王道
Reply View the author
153******45
deepin
2017-04-14 07:58
#15
不知道为啥不开启https
Reply View the author
呆了个呆
deepin
2018-01-29 03:59
#16
够恶心的,系统更新二进制下载也要劫持。。。
Reply View the author