生产事件
1、线上服务器端口故障
1.1、问题描述
1.服务器可以ping 百度
2.外网不能访问 服务器资源
3.防火墙是关的,端口安全组是开的
4.内部服务是以docker形式部署
1.2、问题定位
0.外部服务访问(80端口为过滤状态,猜测有东西拦截)
1.本机查看服务器端口(又发现是正常的)
shell
netstat -tunlp
netstat -tunlp
2.查看服务器端口规则(都是正常的)
shell
iptables -L
iptables -L
shell
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
3.查看linux是否开启内网转发
shell
cat /etc/sysctl.conf | grep forward
cat /etc/sysctl.conf | grep forward
找到问题了 !
服务器配置错误
1.3、解决方案
vim /etc/sysctl.conf
将参数改为1
sysctl -p
刷新配置