当前位置:网站首页>记一次'非常诡异'的云安全组规则问题排查过程
记一次'非常诡异'的云安全组规则问题排查过程
2022-07-05 15:33:00 【yuanfan2012】
记一次非常诡异的云安全组规则问题排查过程
问题背景:
1、应用服务器:172.16.100.21
2、数据库服务器:172.16.100.22 (SQLServer 1433)
如图所示
(图片可点击放大查看)
一、问题现象
开发工程师反馈:
1、办公区的PC telnet 172.16.100.22 1433 SQLServer端口是通的,用Navicat可以连上数据库
2、但是非常奇怪的是:应用服务器172.16.100.21 上telnet 172.16.100.22 1433却不通,应用服务器联调不成功
(图片可点击放大查看)
二、问题确认与分析
我这边检查发现
1、应用服务器和数据库服务器使用的同一云服务器安全组规则
如下图所示
(图片可点击放大查看)
可以看到安全组规则对外是(0.0.0.0/0)全部开放1433端口
2、我尝试用运维区的服务器也进行端口探测
发现172.16.100.22 1433 SQLServer端口是通的
(图片可点击放大查看)
所以非常纳闷 这时以为问题应该出在数据库服务器上面,是不是数据库服务器自身做了啥限制
检查过172.16.100.22的操作系统防火墙配置,没有做任何限制,防火墙直接关闭的
也询问过开发工程师,数据库层面有没有限制,也说没有做限制
这也太奇怪了吧
三、继续排查
检查数据库服务器上的安全防护软件(HIDS)也没有做限制
与该开发工程师沟通过,联调阶段数据库服务器可以重启,也进行过重启,问题依旧 (虽然重启能解决80%的问题)
问题陷入僵局
四、跳出思维定势,问题瞬间解决
在沟通(battle)的过程中,突然开发工程师的一句话提醒了我:应用服务器对外访问有没有限制?对外?下行规则都放开外部访问的,他说的对外访问是指上行规则?出方向?
是啊,问题有没有可能出在源服务器上,而不应该出在目的服务器上,得转换一下方向
这时我打算去检查一下应用服务器自身操作系统防火墙的出站规则,突然在安全组上行规则(出方向)看到这个小细节
(图片可点击放大查看)
系统判定了一些高危端口,默认将其加入了安全组并禁止。 对于 Windows 云服务器,系统默认限制了几个“上行安全组”规则:
协议 TCP,端口3389,1433,445,135,139;
协议 UDP,端口1434,445,135,137,138。
Windows 云服务器向外发起 远程桌面连接,您需要在安全组中放行规则 tcp 上行 3389 端口;
Windows 云服务器向外发起 SQL Server 连接,您需要在安全组中放行规则 tcp 上行 1433 端口。
瞬间知道原因了 这时加了一条规则解决问题
(图片可点击放大查看)
开发反馈应用服务器:172.16.100.21可以正常连上172.16.100.22 (SQLServer 1433)数据库,问题解决
五、总结
越是诡异的问题越是要跳出思维定势去排查
正常的思路的确是会判定问题出在目的服务器上,而不会觉得源服务器有啥问题
边栏推荐
- 18.[stm32] read the ROM of DS18B20 temperature sensor and realize multi-point temperature measurement
- obj解析为集合
- 【网易云信】超分辨率技术在实时音视频领域的研究与实践
- The list set is summed up according to a certain attribute of the object, the maximum value, etc
- JS topic - console log()
- Example project: simple hexapod Walker
- Definition of episodic and batch
- Background system sending verification code function
- Appium automation test foundation - appium basic operation API (II)
- Data communication foundation ACL access control list
猜你喜欢
Use of set tag in SQL
Parameter type setting error during batch update in project SQL
21. [STM32] I don't understand the I2C protocol. Dig deep into the sequence diagram to help you write the underlying driver
wxml2canvas
数学建模之层次分析法(含MATLAB代码)
视觉体验全面升级,豪威集团与英特尔Evo 3.0共同加速PC产业变革
How difficult is it to pass the certification of Intel Evo 3.0? Yilian technology tells you
Data communication foundation - dynamic routing protocol rip
Appium自动化测试基础 — APPium基础操作API(二)
Xiao Sha's arithmetic problem solving Report
随机推荐
Summary of the second lesson
Data communication foundation - route republication
Intelligent metal detector based on openharmony
MySQL表字段调整
OceanBase社区版之OBD方式部署方式本地安装
18.[STM32]读取DS18B20温度传感器的ROM并实现多点测量温度
Go language programming specification combing summary
对象和类的关系
String modification problem solving Report
obj集合转为实体集合
go语言编程规范梳理总结
Basic JSON operations of MySQL 5.7
List uses stream flow to add according to the number of certain attributes of the element
list去重并统计个数
Write a go program with vscode in one article
Boost the development of digital economy and consolidate the base of digital talents - the digital talent competition was successfully held in Kunming
19.[STM32]HC_SR04超声波测距_定时器方式(OLED显示)
一文搞定vscode编写go程序
Virtual base class (a little difficult)
Subclasses and superclasses of abstract classes