当前位置:网站首页>服务端口不通排查
服务端口不通排查
2022-06-12 20:21:00 【lihongbao80】
解决思路
1、使用 netstat -nplt 查看端口上 tcp, 还是 tcp6
2、查看是否只绑定在 ipv6 上 sysctl net.ipv6.bindv6only
3、查看ipv4 上可以转发数据:sysctl net.ipv4.ip_forward
4、查看防火墙是否禁用端口
一、 查看端口
[[email protected] ~]# netstat -tnlp |grep 80
tcp 0 0 192.168.180.45:2379 0.0.0.0:* LISTEN 17092/etcd
tcp 0 0 192.168.180.45:2380 0.0.0.0:* LISTEN 17092/etcd
tcp6 0 0 :::20080 :::* LISTEN 11937/docker-proxy
tcp6 0 0 :::1080 :::* LISTEN 13449/docker-proxy
可以看出 20080端口只出现在 tcp6 上.
二、查看 ipv6
[[email protected] ~]# sysctl net.ipv6.bindv6only
net.ipv6.bindv6only = 0
0 表示没有仅仅绑定在ipv6上
若果要解决:
vim /etc/sysctl.conf
#添加下面这行
net.ipv6.bindv6only=1
#然后保存退出. 重启网络
systemctl restart network
三、查看 ipv4 转发状态
[[email protected] ~]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
1 表示可以转发, 也就是说 tcp6 上的数据也可以能过 tcp 转发
如果是0,解决
vi /etc/sysctl.conf
#添加下面这行
net.ipv4.ip_forward=1
#然后保存退出. 重启网络
5.重新加载sysctl配置或者重启网络
sysctl -p
#or
systemctl restart network
四、防火墙
firewall-cmd --zone=public --add-port=20080/tcp --permanent #允许tcp的3306端口到public区域。
边栏推荐
- Torch network model is converted to onnx format and visualized
- In 2022, FISCO bcos MVP recognized that the channel was open and invited you to become an open source leader
- JDBC interface summary
- QT pro file configuration ffmpeg macro
- Introduction to system mode development of rouya wechat mall
- P5076 【深基16.例7】普通二叉樹(簡化版)
- Niuke.com: sum of three numbers
- Kyma application connectivity feature introduction
- 逐向双碳:东数西算中的绿色需求与竞争焦点
- Go memory escape analysis
猜你喜欢
![[leetcode 7 solution] integer inversion](/img/72/b358a67eaedda48e1c0aebdaec04a5.jpg)
[leetcode 7 solution] integer inversion

PostgreSQL database replication - background first-class citizen process walreceiver PG_ stat_ wal_ Receiver view
![[live streaming] understand the design of d3js and learn how to read the source code.](/img/31/53e2d267acda0f87bcef081f2ebc8b.jpg)
[live streaming] understand the design of d3js and learn how to read the source code.

Introduction to the characteristics of building a balancer decentralized exchange market capitalization robot

How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"

Since using low code development, the development efficiency has been increased by 10 times

Parameter meaning of random forest randomforestclassifier in sklearn

Illustrator tutorial, how to recolor artwork in illustrator?

2022年最新宁夏建筑安全员模拟题库及答案

Unsupported class file major version 60
随机推荐
Microsoft Word tutorial, how to insert a header or footer in word?
[leetcode 16 solution] the sum of the nearest three numbers
[games101] class note 8 - shading (shading frequency, graphics pipeline, texture mapping)
Simple understanding of anti shake function
Zhangqiming, vice director of the United Front Work Department of the CPC Anhui Provincial Committee, led a team to investigate the HoloNet Royal Hefei R & D base
Generate API documents using swagger (go language example)
In 2022, 20 cities with the largest number of college students in China
Test prerequisites: recommend a special cross platform app performance test tool!
The Milvus graphical management tool Attu is coming!
golang类型断言理解[go语言圣经]
Torch network model is converted to onnx format and visualized
unable to recognize “*.yaml“: no matches for kind “ClusterRole“ in version “rbac.authoriz
Wechat applet notes
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
MySQL log
QT pro file configuration ffmpeg macro
Since using low code development, the development efficiency has been increased by 10 times
Golden, silver and four job hopping season, teach you these tips to improve the interview success rate
Connectez - vous à MySQL
设计规则检查约束(set_max_transition、set_max_capacitance)