在Debian Linux中禁用IPv6网络
时间:2019-11-20 08:53:14 来源:igfitidea点击:
在Debian如何禁用IPv6?
解决方法
可以通过删除内核驱动程序或者IPv6模块来禁用IPV6网络连接。
执行下面的命令
echo 'blacklist ipv6' >> /etc/modprobe.d/blacklist
然后重启:
# reboot
或者,
您可以使用ifconfig命令删除所有ipv6地址。
您还需要使用route命令本身删除ipv6网关,
最后使用rmmod命令删除ipv6驱动程序。
# ifconfig down eth0
# route -A inet6 del {network6}/{prefixlength} gw {ipv6address} eth0
# lsmod | grep ipv6
# rmmod ipv6
# ifconfig eth0 up
#### or
# /etc/init.d/networking restart

