当前位置:网站首页>服务端口不通排查
服务端口不通排查
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区域。
边栏推荐
- Installation of xv6 system
- Parameter meaning of random forest randomforestclassifier in sklearn
- Niuke net: somme des trois nombres
- Are you confused about choosing a low code platform? Follow these three steps
- 登录mysql
- SPI one master and many slaves
- EditText控制从左上角开始
- Restful API 接口规范
- QT pro file configuration ffmpeg macro
- Since using low code development, the development efficiency has been increased by 10 times
猜你喜欢
牛客网:三数之和
Niuke net: somme des trois nombres
Wechat jsapi payment pit summary
The Milvus graphical management tool Attu is coming!
Properties to YML
How to determine fragment restored from Backstack
Alipay payment episode 11: monitoring after successful payment callback
Low code enables rural construction to open "smart mode"
Wechat applet notes
I learned database at station B (10): View
随机推荐
Using / developing private plug-ins in traifik proxy 2.5 (traifik official blog)
Detailed explanation of search tree and hash table
设计规则检查约束(set_max_transition、set_max_capacitance)
Deep feature synthesis and genetic feature generation, comparison of two automatic feature generation strategies
Restful API 接口规范
User and group permissions
Why my order by create_ Time ASC becomes order by ASC
Stm8l51 sx1280 commissioning record
If you master these skills, you can also write a high score resume in the eyes of HR
解决cvxpy报错The solver GLPK_MI is not installed
What is a federated index?
1. Getting to know R
Is foreign exchange speculation formal and is the fund safe?
golang类型断言理解[go语言圣经]
unable to recognize “*.yaml“: no matches for kind “ClusterRole“ in version “rbac.authoriz
Scalars, vectors, arrays, and matrices
MySQL - the execution order of an SQL statement
Fcpx tutorial, how to export video graphics and text in Final Cut Pro?
A Zhu and Xu Baobao's high-rise game - difference
go --- 监控文件变化