简单测试本地运营商屏蔽了哪些 TCP 端口

2018-11-20 18:07:18 +08:00
 raysonx

写了个简单的脚本测试了一下本地 ISP (某地电信)对个人用户屏蔽了哪些 TCP 端口。

测试方法:

  1. 设置本地路由器的防火墙默认的入站规则为 Reject,即用 ICMP 消息拒绝对未开放端口的连接。
  2. 找一台远程的机器(跨 ISP,防止出现两台机器在同一个防火墙区域的情况),使用 nc 依次连接 1-9999 端口,超时时间 1 秒左右。如果显示” Connection Refused “则表示这个端口是由本地路由器拒绝的,如果显示” Connection timed out “,则表示被 ISP 屏蔽了(这里有一个假设的前提是,ISP 屏蔽端口的方式是丢包)。 注意:可能会有误测,为了结果可靠就多测试几遍吧。

参考脚本: https://gist.github.com/vfreex/32b7de2e36422dbee94454afc762305e

经测试,楼主所在地的 ISP 屏蔽了以下 TCP 端口:

42
80
135
136
137
138
139
443
539
901
1023
1025
1068
1434
2745
3127
3128
3129
3130
3332
3333
4444
5554
5800
5900
6129
6176
6667
6669
8080
8998
9437
9995
9996
23248 次点击
所在节点    宽带症候群
20 条回复
bclerdx
2018-11-20 18:20:01 +08:00
具体应该如何操作与实施,看着有些迷茫!
afc
2018-11-20 18:22:17 +08:00
我们公司的专线是备案过才开通 80 端口的,最近又给电信封上了
bclerdx
2018-11-20 18:35:08 +08:00
@afc 为啥?理由?依据?
des
2018-11-20 18:44:33 +08:00
sudo nmap -sA -Pn -F 195.172.xx.xx

一条命令解决
CloudnuY
2018-11-20 19:02:10 +08:00
10000 以内的端口 ISP 封了以下几个:

25/tcp filtered smtp
80/tcp filtered http
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
5800/tcp filtered vnc-http
5900/tcp filtered vnc
8080/tcp filtered http-proxy
CloudnuY
2018-11-20 19:03:32 +08:00
@CloudnuY #5 应该说所有端口里面只封了这几个
des
2018-11-20 19:07:41 +08:00
@des
@CloudnuY
可能有些误导了,我写的那个是最常用的 100 个。
想要 1 到 10000 这样用
sudo nmap -sA -Pn 195.172.xx.xx -p1-10000
CloudnuY
2018-11-20 19:15:20 +08:00
@des #7 和我前一段时间全端口扫描的结果基本是一样的,看来非常用端口 ISP 也没屏蔽😂
skyeycirno
2018-11-20 19:26:04 +08:00
没看懂。能不能具体说下。。
bclerdx
2018-11-20 20:14:53 +08:00
@CloudnuY udp 协议的呢?封了哪些?
bclerdx
2018-11-20 20:16:12 +08:00
@CloudnuY ISP 没有能力把 65536 全部封锁,如果那样的话,末日就到了。
leido
2018-11-20 22:09:23 +08:00
@bclerdx 全封了你怎么上网
bclerdx
2018-11-20 22:35:28 +08:00
@leido 嗯,也对。国家与运营商从心底里不就希望让屁民如此?否则哪来的中华局域网、清真局域网之说的口头禅呢?
Archeb
2018-11-20 22:46:50 +08:00
我们只封了 80....连 443 都没事
Danswerme
2018-11-20 23:29:23 +08:00
@des 用 vps 扫了一下家里路由器..

Host is up (0.31s latency).Not shown: 9976 unfiltered portsPORT STATE SERVICE
80/tcp filtered http
135/tcp filtered msrpc
136/tcp filtered profile
137/tcp filtered netbios-ns
138/tcp filtered netbios-dgm
139/tcp filtered netbios-ssn
443/tcp filtered https
445/tcp filtered microsoft-ds
593/tcp filtered http-rpc-epmap
901/tcp filtered samba-swat
1433/tcp filtered ms-sql-s
1614/tcp filtered unknown
1999/tcp filtered tcp-id-port
2745/tcp filtered unknown
3127/tcp filtered unknown
3128/tcp filtered squid-http
3333/tcp filtered dec-notes
4444/tcp filtered krb524
5554/tcp filtered sgi-esphttp
6129/tcp filtered unknown
6667/tcp filtered irc
7306/tcp filtered unknown
7626/tcp filtered unknown
8080/tcp filtered http-proxy
Nmap done: 1 IP address (1 host up) scanned in 9879.99 seconds
justs0o
2018-11-21 09:39:01 +08:00
@bclerdx 有些东西度娘一下自己就了解了
zhouyut001
2018-11-24 20:25:05 +08:00
老家的服務器,電信只被封這些。
25/tcp filtered smtp
80/tcp filtered http
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
443/tcp filtered https
445/tcp filtered microsoft-ds
3128/tcp filtered squid-http
5800/tcp filtered vnc-http
5900/tcp filtered vnc
8080/tcp filtered http-proxy
sheephe
2019-08-28 13:04:57 +08:00
Shanghai ChinaNet:

Not shown: 91 unfiltered ports
PORT STATE SERVICE
80/tcp filtered http
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
443/tcp filtered https
445/tcp filtered microsoft-ds
1025/tcp filtered NFS-or-IIS
3128/tcp filtered squid-http
5900/tcp filtered vnc
8080/tcp filtered http-proxy
sheephe
2019-08-28 13:08:23 +08:00
Guangdong Foshan:

Not shown: 97 unfiltered ports
PORT STATE SERVICE
80/tcp filtered http
445/tcp filtered microsoft-ds
8080/tcp filtered http-proxy


同时电信的情况下,看起来每个地区的规律都不一样,还是说 80/445/8080 外其他端口随机封锁的可能?
a1gslyghmqnl
2020-09-21 00:18:51 +08:00
https://www.comcdn.com/help/article/66.html
> 接到电信运营商的通知,为了增强网络安全性,中国电信将于北京时间 2017 年 09 月 28 日 00:00 开始在全国范围的 IDC 机房电信链路网络出口添加病毒防护策略,屏蔽部分端口(详细参看下列清单),届时对这些端口的访问将被阻断。建议您检查您的业务中是否包含下述端口的服务,更换端口以免受到影响。

具体屏蔽的端口如下:

目的端口:137-139,协议:TCP/UDP

目的端口:593,协议:TCP/UDP

目的端口:445,协议:TCP/UDP

目的端口:4444,协议:TCP/UDP

目的端口:135,协议:TCP/UDP

目的端口:3332,协议:TCP

目的端口:9996,协议:TCP/UDP

目的端口:6669,协议:TCP

目的端口:1434,协议:TCP/UDP

目的端口:3127-3130,协议:TCP

目的端口:42,协议:TCP

目的端口:1068,协议:TCP/UDP

目的端口:5554,协议:UDP

目的端口:17185,协议:UDP

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/509732

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX