1.软文推荐

2.软文推荐

3.软文推荐

IPV6这个协议暂时我们还用不到。而且开启该协议有时对系统运行有一定的影响,一些网卡还会因为IPv6出现系统未响应,假死等情况,本篇文章重点为大家讲解一下Linux系统中禁用IPV6具体方法。

更改/etc/sysctl.conf配置文件

[root@Jaking vsftpd]# vim /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
                                             
[root@Jaking vsftpd]# ifconfig
# IPV6 字段 inet6 fe80::250:56ff:fe22:db62
ens33: flags=4163  mtu 1500
       inet 192.168.10.11  netmask 255.255.255.0  broadcast 192.168.10.255
       inet6 fe80::250:56ff:fe22:db62  prefixlen 64  scopeid 0x20
       ether 00:50:56:22:db:62  txqueuelen 1000  (Ethernet)
       RX packets 11717  bytes 4355183 (4.1 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 6943  bytes 2011730 (1.9 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10
       loop  txqueuelen 1  (Local Loopback)
       RX packets 112  bytes 9492 (9.2 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 112  bytes 9492 (9.2 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@Jaking vsftpd]# sysctl -p  #让配置文件立即生效
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
[root@Jaking vsftpd]# ifconfig
# IPV6 字段已经消失
ens33: flags=4163  mtu 1500
       inet 192.168.10.11  netmask 255.255.255.0  broadcast 192.168.10.255
       ether 00:50:56:22:db:62  txqueuelen 1000  (Ethernet)
       RX packets 11747  bytes 4357703 (4.1 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 6961  bytes 2014592 (1.9 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       loop  txqueuelen 1  (Local Loopback)
       RX packets 112  bytes 9492 (9.2 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 112  bytes 9492 (9.2 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

本文来源:www.lxlinux.net/8396.html,若引用不当,请联系修改。

相关文章 8

1

softshellweb的简单介绍 2分钟前

目录:...

3

网站防cc攻击(网站防御cc攻击) 5分钟前

目录:1、CC防护的策略有哪几种?2、什么是CC攻击,如何防止网站被CC攻击?3、如何防御网站cc攻击?4、网站被cc攻击如何防御?CC防护的策...

5

韩国cn2vps(韩国cn2ip) 7分钟前

目录:1、CN2线路VPS有哪些优势2、日本vps和韩国vps哪个延迟3、vps韩国uplus线路好吗CN2线路VPS有哪些优势 RAKsmart CN2服务器相对于传统服务器来...

6

使用java实现热更新具体方法 9分钟前

Java热更新 在持续交付的时代,重新部署一个新的版本只需要点击一下按钮。但在有的情况下,重新部署过程可能比较复杂,停机是不被允许...

7

营口vps主机(vps主机网) 10分钟前

目录:1、VPS、虚拟机、云主机,这三个到底有什么区别?2、vps,虚拟主机,云主机是什么?三种有什么区别?3、VPS和虚拟主机的区别是什...