![IPv6 已禁用,但 netfilter-persistent 会抱怨“ip6tables-save v1.6.1:无法初始化:协议不支持地址系列”](https://linux22.com/image/931151/IPv6%20%E5%B7%B2%E7%A6%81%E7%94%A8%EF%BC%8C%E4%BD%86%20netfilter-persistent%20%E4%BC%9A%E6%8A%B1%E6%80%A8%E2%80%9Cip6tables-save%20v1.6.1%EF%BC%9A%E6%97%A0%E6%B3%95%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%9A%E5%8D%8F%E8%AE%AE%E4%B8%8D%E6%94%AF%E6%8C%81%E5%9C%B0%E5%9D%80%E7%B3%BB%E5%88%97%E2%80%9D.png)
我按照以下说明在一组 Docker 节点上禁用了 IPv6在 Ubuntu Server 18.04 中禁用 IPv6。但是,netfilter-persistent
仍然抱怨 IPv6:
root@docker10:~# netfilter-persistent save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables save
ip6tables-save v1.6.1: Cannot initialize: Address family not supported by protocol
run-parts: /usr/share/netfilter-persistent/plugins.d/25-ip6tables exited with return code 1
root@docker10:~#
我该如何阻止这种情况发生?这会导致日志中的 Puppet 错误以及其他噪音。
以下命令确认 IPv6 已被禁用:
root@docker10:~# grep ipv6 /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
root@docker10:~# ls /proc/net/if_inet6
ls: cannot access '/proc/net/if_inet6': No such file or directory
root@docker10:~# ip address | grep inet6
root@docker10:~# sysctl -a |grep ipv6
root@docker10:~#