版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处连接和本声明。
本文连接:https://blog.csdn.net/wbdxz/article/details/79597020
1.CentOS官方的Wiki提供了在7上关闭IPv6的方法。英文以下ssh
How do I disable IPv6?.net
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:component
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
To disable in the running system:server
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
orblog
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:vps
参考资料:http://blog.csdn.net/skykingf/article/details/41957147ip
2.在IPv4下ss同时监听IPv4和IPv6后没法使用it
方法:修改configio
删去"server":["[::0]"]
若是vps只有ipv4地址的话配置文件里同时监听ipv4和ipv6会出错,只能改为"server":"0.0.0.0"才行
————————————————
版权声明:本文为CSDN博主「SeniorZ」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处连接及本声明。
原文连接:https://blog.csdn.net/wbdxz/article/details/79597020stream