问题
阿里云ecs安全组策略过于粗放、要最小权限放开。
解决
1.只看ESTABLISHED的TCP连接
ss -tnp state established
2.ss查listen状态查看监听端口(入站连接)
ss -tnlp | grep LISTEN
3.公网访问你的某个服务时(建立连接)
ss -tnp state established
4.过滤ipv6及回环地址
ss -tn state established | grep -v ffff | awk '{print $3,$4}' |egrep -v "Local|127.0.0.1|::1"