Squid 网络 - 警告子网

Squid 网络 - 警告子网

执行以下命令:

squid-k parse

我收到以下警告:

WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
2014/03/19 16:43:41| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
2014/03/19 16:43:41| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
2014/03/19 16:43:41| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
2014/03/19 16:43:41| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
2014/03/19 16:43:41| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
2014/03/19 16:43:41| Processing: acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
2014/03/19 16:43:41| WARNING: (B) '127.0.0.0/8' is a subnetwork of (A) '127.0.0.0/8'
2014/03/19 16:43:41| WARNING: because of this '127.0.0.0/8' is ignored to keep splay tree searching predictable
2014/03/19 16:43:41| WARNING: You should probably remove '127.0.0.0/8' from the ACL named 'to_localhost'
2014/03/19 16:43:41| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
2014/03/19 16:43:41| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
2014/03/19 16:43:41| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'
2014/03/19 16:43:41| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
2014/03/19 16:43:41| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
2014/03/19 16:43:41| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'

squid 代理服务已启动并正在运行,但我不喜欢留下这些警告。

这些是存在问题的 ACL:

acl all src all
acl manager1 proto cache_object
acl localhost src 127.0.0.1/32 192.168.1.29/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32

提前致谢。

答案1

不太熟悉此设置,但它似乎是 ACL 的第 4 行。0.0.0.0/32 涵盖整个 IPv4 地址空间。指定 127.0.0.0/8 是多余的。尝试删除一个,看看警告是否消失。

答案2

我迟到了一年,但答案是,从 3.2 到 3.4 的某个时候,localhost、to_localhost 和 manager acls 成为 squid3 的内置功能。由于您在 squid.conf 中重新定义它们,但又没有更改有效的网络子类,因此 squid 会生成警告错误。

解决方案是从 squid.conf 中的 acl 定义中删除 localhost、to_localhost 和 manager 的定义,除非您确实想要重新定义它们。

相关内容