屏蔽cloudflare的ipv6网段,阻止chatgpt识别ipv6地址

cloudflare官方IP信息地址:

https://www.cloudflare.com/ips-v4

https://www.cloudflare.com/ips-v6

#创建一个新的iptables链
ip6tables -N BLOCK_IPV6
#开始BAN掉查询到的IPV6网段
ip6tables -A BLOCK_IPV6 -s 2400:cb00::/32 -j DROP
ip6tables -A BLOCK_IPV6 -s 2606:4700::/32 -j DROP
ip6tables -A BLOCK_IPV6 -s 2803:f800::/32 -j DROP
ip6tables -A BLOCK_IPV6 -s 2405:b500::/32 -j DROP
ip6tables -A BLOCK_IPV6 -s 2405:8100::/32 -j DROP
ip6tables -A BLOCK_IPV6 -s 2a06:98c0::/29 -j DROP
ip6tables -A BLOCK_IPV6 -s 2c0f:f248::/32 -j DROP
#启用规则,将入站&出站都应用上
ip6tables -I INPUT -j BLOCK_IPV6
ip6tables -I OUTPUT -j BLOCK_IPV6

现在访问https://chat.openai.com 不再显示封锁的IPV6了。