net4people / bbs

Forum for discussing Internet censorship circumvention
3.38k stars 80 forks source link

Regional GFW may does varies jobs #265

Open Evan-Sign opened 1 year ago

Evan-Sign commented 1 year ago

今年6月8日广东电信无信号事件发生的同时,收到来自广东多地电信网友的报告,同时有TG频道爆出:广东电信部分区域墙SNI判断出错

其信息内容记录的实验非常详细,但过去快一个月,这期间群里还有网友在不断尝试,发现这个现象不但没有消失,而且还扩散了。

图为上海电信出现同样的情况: asset

原文中提到了如果用的是CDN并且你是第一次连会RST的 第二次刷新基本上都可以但是并没有说明这意味着什么,虽然给不出切实的证据,但是我想提出几种猜想:

  1. GFW 分两种,一种为城市边界防火墙,一种为国际出口防火墙,它们实际上叫什么无从得知,所以是猜想。
  2. GFW 可能有不同的分支,他们规则的同步与任务不尽相同,可能解释为什么只有部分地区可以,因为只有其中一个branch有问题。
  3. SNI判断至少分两个等级,一个是Level 1 ,一个是Level 2,Level 1 是最顶级,这些域名必须使用所有算力尽可能的阻断,Level 2 则是稍微弱一点,如果城市边界防火墙阻断失败了,那国际出口防火墙也不会再花时间去阻断。
  4. 城市边界防火墙的同步或者其同步的规则有问题,接下来可能会有更多区域能体验到墙SNI判断出错,但是也不排除在本贴发出后该问题立马得到修复。
  5. 城市边界防火墙做的可能是:给予被墙IP空路由(目前条件仅能判断单向,方向为出),SNI判断,SNI Level 2 阻断,对境外IP的UDP 53污染(双向)。
  6. 国际出口防火墙做的可能是:给予被墙IP空路由(目前条件仅能判断单向,方向为入),SNI判断,SNI Level 1 阻断,对境外IP的UDP 53污染(双向)。

如果我的猜想是对的,那这种现象更像是阻断出错而不是判断出错,同时也解释了为什么只有用全球性的那种大公司CDN的网站才可以,因为有些公司或组织的域名只是SNI阻断出错了,自己播或自己用的IP还是被墙的。

同时今年6月下旬,开始收到来自广东多地移动网友的报告,内容差不多是:手机YouTube能直连,Google Play可以直连。 而群里也有不少人反映,他们所在的地区,上述服务所依赖的域名DNS污染已经消失了。

目前不太确定它们之间是否有关联,上面的信息与给出的时间可能均不准确,发这个贴子的目的是希望更多人能知道更多事,虽然并没有什么用,但是希望评论区能友好讨论,欢迎给出你们的看法。


June 8 this year, netizens in many places in Guangdong Telecom at the same time reported a no-signal event, at the same time a TG channel broke out: Guangdong Telecom part of the regional wall SNI judgment error.

It recorded very detailed experiments, but in the past almost a month, there are still netizens who are constantly testing, and found that this phenomenon not only did not disappear, but also proliferated.

The picture shows that the same situation occurs in Shanghai Telecom: asset

The original article mentioned "if you use a CDN and the first time you connect is RST, the second refresh is basically fine" but did not explain what this means, and while no tangible evidence is given, I want to put forward a few conjectures:

  1. There are two types of GFW, one for "city border firewalls" and one for "international egress firewalls". There's no way to know what they're actually called, so it's conjecture.
  2. There may be different branches of GFW that have different synchronization of their rules with different tasks, possibly explaining why only some areas are OK because only one of the branches has problems.
  3. SNI filtering is in at least in two levels, one is Level 1, one is Level 2. Level 1 is the top level, these domains must be blocked as much as possible using all the computation power. Level 2 is a little weaker, and if the "city border firewall's" blocking fails, then the "international egress firewalls" won't spend any more time blocking.
  4. There is a problem with the "city border firewall's" synchronization or its synchronization rules. More zones may experience "wall SNI error" in the coming days, but we can't rule out the possibility that the problem will be fixed immediately after this post.
  5. "City border firewalls" may do the following: give blocked IPs null routes (the current condition can only judge unidirectional, the direction is out), SNI filtering, SNI Level 2 blocking, and UDP 53 poisoning of IPs outside the country (bidirectional).
  6. "International egress firewalls" may do the following: give blocked IPs a null route (current conditions can only determine unidirectional, the direction is in), SNI filtering, SNI Level 1 blocking, UDP 53 poisoning (bidirectional) to foreign IPs.

If my guess is right, then this phenomenon is more like a blocking error than a classification error, and also explains why only sites with global big company CDNs are OK, because some companies or organizations have domains with just SNI blocking errors, and the IPs that they broadcast or use by themselves are still walled.

At the same time in late June this year, began to receive reports from mobile users in many places in Guangdong, the content is more or less the same: mobile YouTube can be directly connected, Google Play can be directly connected. And a number of people in the group also reported that the DNS poisoning of the domains on which the above services depended had disappeared in their area.

I'm not quite sure if they are related, the information above and the time given may not be accurate, the purpose of this post is to make more people aware of more things. It's not really useful but I hope that the comment section will be a friendly discussion, feel free to give your opinion.

Evan-Sign commented 1 year ago

这条信息让我十分困惑。

有网友称广东电信宽带部分区域墙SNI判断出错,DNS纯净即可访问除Google/Telegram/Twitter等时效性强的网站。

5.企业自己播的IP基本不行 比如纽约时报 Telegram这些不行 Google Reddit Twitter 时效性强的网站不行

  1. 这里的“时效性”和能不能访问有何关系?
  2. 纽约时报中文网CDN用的是 CloudFront、英文网站用的是 Fastly,这也算“自己播的IP”?

现在测试的域名还不够多,只有不到10个,没办法确定是检测 SNI 功能失效还是仅仅是解封了部分网站。

另外如果真如消息所写,仅仅检测 SNI 功能失效了,那么IP被封锁的网站仍然是不能访问的,和“时效性”和“自己播的IP”无关。

纽约时报中文网CDN用的是 CloudFront、英文网站用的是 Fastly,这也算“自己播的IP”? 看来他们测试没有测试纽约时报中文网,我看了一下,纽约时报中文网与英文网站确实使用的CDN不同,但是它们所使用的静态资源域名的CDN均为 Fastly ,导致纽约时报中文网即使能打开,页面也是空白的,而他们测试过程中显然没有使用除出口为香港地区外的纯净DNS作为入口,导致解析到IP为 151.101 开头的 Fastly CDN IP,而这些 Fastly CDN IP 是被墙了的,在使用出口为美国的纯净DNS作为入口后,解析到的IP为 146.75.93.164 ... <nytimes.map.fastly.net> 而这个时候纽约时报英文网和中文网站都可以正常访问及正确加载静态资源。

这里的“时效性”和能不能访问有何关系? bbc.map.fastly.netwww.bbc.co.uk 最终解析到的CNAME域名,可以看到尾缀为fastly.net表明 BBC 与 纽约时报 使用的网站均为 Fastly ,但我没有使用过 Fastly CDN ,我发现直接访问这两个网站解析出来的CDN IP会显示This server could not prove that it is 146.75.93.164; its security certificate is from nytimes.com. This may be caused by a misconfiguration or an attacker intercepting your connection.Fastly 似乎给它们提供了专用的IP。通过使用出口为美国的纯净DNS作为入口的方法这次并没有奏效, 很明显 BBC 被屏蔽的比纽约时报还狠,可能是我上面所说的Level 2 SNI 因为其解析出的IP为 146.75.92.81 同样为 146.75 开头,直接访问它们表现出的行为不同,证书为纽约时报的IP 146.75.93.164 可以打开,而证书为 BBC 的IP 146.75.92.81 则会出现 响应时间过长连接被重置 的回应,通过抓包可以看到收到了来自 GFW 的重传回应。

Snipaste_2023-07-07_22-40-19

现在测试的域名还不够多,只有不到10个,没办法确定是检测 SNI 功能失效还是仅仅是解封了部分网站。 希望更多人可以在这里提供他们想测试的域名和他们的测试结果,给出他们访问过程的详细叙述。

需要注意的是如果您的环境已经可以访问 Level 1 域名/网站,直连访问 Level 2 域名/网站并不是完全没有可能,只要您一直 F5 很明显有很小概率您可以成功访问。


This message is very confusing to me.

Some netizens said that Guangdong Telecom broadband is part of the regional wall SNI filtering error, clean DNS can be accessed in addition to Google/Telegram/Twitter and other timely sites.

and

  1. Enterprises with their own IPs basically do not work, such as the New York Times, Telegram, Google, Reddit, Twitter, and other timely websites.
  1. What does "timeliness" have to do with accessibility?
  2. The New York Times uses CloudFront as its CDN for its Chinese website and Fastly for its English website, are these considered "self-owned IPs"?

There are not enough domains tested, less than 10, to determine if the SNI function is not working or just unblocking some sites.

In addition, if it is true that the SNI function is not working, then the blocked websites are still inaccessible, and it has nothing to do with "timeliness" or "self-owned IPs".

"The New York Times uses CloudFront as its CDN for its Chinese website and Fastly for its English website, are these considered 'self-owned IPs'?" It seems that their test did not test the Chinese website of the New York Times. I looked at it, the Chinese website of the New York Times and the English website do use different CDNs, but the CDNs of the static resource domain names they use are all Fastly, resulting in the Chinese website of the New York Times, even if it can be opened, being blank, and they obviously did not use a clean DNS as the entrance, except for exporting to Hong Kong, resulting in the resolution of the IP as a "self-owned IP". The entrance of Fastly CDN IP is "151.101", and these Fastly CDN IP are blocked. After using a clean DNS for the United States as the entrance, it resolves to the IP "146.75.93.164" ... "". And at this time both the English and Chinese sites of the New York Times can be accessed and load static resources correctly.

"What does 'timeliness' have to do with accessibility?" "bbc.map.fastly.net" is the CNAME domain name that "www.bbc.co.uk" eventually resolves to, and you can see that the suffix "fastly.net" indicates that both the BBC and the New York Times use the website Fastly, but I haven't used the Fastly CDN, and I have found that when I access the CDN IPs of these two websites directly, they will show "This server could not prove that it is 146.75.93.164; its security certificate is from nytimes.com. This may be caused by a misconfiguration or an attacker intercepting your connection." Fastly seems to be giving them dedicated IPs, and by using a clean DNS with an exit to the US as an entry point it didn't work this time around. Apparently the BBC is being blocked even harder than the New York Times, probably due to what I called "Level 2 SNI" above, and it's not a good idea to use it as an entry point because its resolved IP "146.75.92.81" also starts with "146.75", directly accessing them shows different behavior, the IP "146.75.93.164" with New York Times's certificate can be opened, while the IP "146.75.92.81" with BBC's certificate shows a long response time or connection reset response, through a packet capture shows retransmission responses received from the GFW.

Snipaste_2023-07-07_22-40-19

"There aren't enough domains in the test right now, less than 10, to determine if the detection of the SNI feature is failing or if it's just unblocking some of the sites." Hopefully more people will chime in with the domains they'd like to test and their test results, giving a detailed account of their procedure for accessing them.

It should be noted that if your environment already has access to Level 1 domains/websites, direct access to Level 2 domains/websites is not completely impossible, as long as you keep F5 there's obviously a very small probability that you'll be able to access them successfully.

Evan-Sign commented 1 year ago

@UjuiUjuMandan

你没有回答我的问题。我不是要测试这几个 IP 能不能访问。我的意思是他们可能写错了。

这条消息中的“时效性”是什么意思呢?

“自己播的IP”又是什么意思,”有自己的 AS“的意思嘛?纽约时报用了 CDN ,很明显不符合这一条。

很明显 BBC 被屏蔽的比纽约时报还狠,可能是我上面所说的Level 2 SNI 证书为纽约时报的IP 146.75.93.164 可以打开,而证书为 BBC 的IP 146.75.92.81 则会出现 响应时间过长 或 连接被重置 的回应

没那么复杂,就是 IP 被封锁了而已,我不觉得 GFW 会看你直接访问 IP (没有SNI被发送) 时服务端返回的证书。

通过抓包可以看到收到了来自 GFW 的重传回应。

这是来自 GFW 的嘛?这不是你本机看到连接不成功才去重传。

相信你动手尝试后会有答案。


You didn't answer my question. I'm not trying to test that these IPs are accessible. I meant that they may have been misspelled.

What does "timely" mean in this message?

What does "self-owned IPs" mean, in the sense of "having their own AS"? The New York Times uses a CDN, which obviously doesn't fit this one.

Apparently the BBC is being blocked even harder than the New York Times, probably due to what I called "Level 2 SNI" above the IP 146.75.93.164 with New York Times's certificate can be opened, while the IP 146.75.92.81 with BBC's certificate shows a long response time or connection reset response

It's not that complicated, it's just that the IP is blocked, and I don't think GFW looks at the certificate returned by the server when you access the IP directly (no SNI is sent).

a packet capture shows retransmission responses received from the GFW.

Is this from GFW? Is it not retransmissions from your local machine when it sees that the connection is not working?

I'm sure you'll get an answer when you try it.