我按照以下说明在一组 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:~#