Centos7在55环境下总是监听tcp6或udp6导致无法使用怎么办

发布时间:2021-10-20 16:39:12 作者:柒染
来源:亿速云 阅读:233

这篇文章将为大家详细讲解有关 Centos7在55环境下总是监听tcp6或udp6导致无法使用怎么办,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

1.CentOS官方的Wiki提供了在7上关闭IPv6的方法。英文如下

How do I disable IPv6?

Upstream employee Daniel Walsh recommends not disabling the ipv6 module, as that can cause issues with SELinux and other components, but adding the following to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
To disable in the running system:

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
or

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
Additional note #1: If problems with X forwarding are encountered on systems with IPv6 disabled, edit /etc/ssh/sshd_config and make either of the following changes:

2.在IPv4下ss同时监听IPv4和IPv6后无法使用

方法:修改config

删去"server":["[::0]"]
如果vps只有ipv4地址的话配置文件里同时监听ipv4和ipv6会出错,只能改成"server":"0.0.0.0"才行

关于 Centos7在55环境下总是监听tcp6或udp6导致无法使用怎么办就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

推荐阅读:
  1. 在 ARC 环境下使用 dealloc
  2. 在duplicate中出现监听BLOCKED的情况导致监听自动关闭该怎么办

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

centos tcp6

上一篇:如何理解Django ORM操作

下一篇:从Ops迁移到DevOps所产生的变化有哪些

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》