Skip to content

生产事件

1、线上服务器端口故障

1.1、问题描述

1.服务器可以ping 百度

2.外网不能访问 服务器资源

3.防火墙是关的,端口安全组是开的

4.内部服务是以docker形式部署

1.2、问题定位

0.外部服务访问(80端口为过滤状态,猜测有东西拦截)

image-20221202194109308

1.本机查看服务器端口(又发现是正常的)

shell
netstat -tunlp
netstat -tunlp

image-20221202194227091

image-20221202194238263

2.查看服务器端口规则(都是正常的)

shell
iptables -L
iptables -L

image-20221202194337472

shell
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT

image-20221202194405734

3.查看linux是否开启内网转发

shell
cat /etc/sysctl.conf | grep forward
cat /etc/sysctl.conf | grep forward

image-20221202194559701

找到问题了 !

服务器配置错误

1.3、解决方案

vim /etc/sysctl.conf

将参数改为1

sysctl -p

刷新配置