我正在尝试设置一个squid代理,它将在一个端口范围内的一个IPv4上接受多个入站连接,并且为每个端口连接连接一个唯一的IPv6地址。
我已经命名了每个端口连接,并根据连接名称指定了一个ACL,然后我试图为每个连接定义一个传出IPv6。 下面的脚本工作,因为它接受不同端口上的连接,并通过IPv6路由出去,但所有出站连接都使用相同的IPv6(user5),即使每个用户定义了不同的ipv6也是如此 – 即使我评论从squid.conf中取出user5 IPv6,它仍然用于出站连接。
任何人都可以看到这里错了什么? (在Centos 6 64bit上使用Squid 3.1.1)
## declare an acl that is true for all ipv6 destinations acl to_ipv6 dst ipv6 ##tell Squid to listen on sequential ports and to designate a name for each inbound connection. http_port 241.xxx.xxx.101:3128 name=3128 http_port 241.xxx.xxx.101:3129 name=3129 http_port 241.xxx.xxx.101:3130 name=3130 http_port 241.xxx.xxx.101:3131 name=3131 http_port 241.xxx.xxx.101:3132 name=3132 ## designate acl based on inbound connection name acl user1 myportname 3128 acl user2 myportname 3129 acl user3 myportname 3130 acl user4 myportname 3131 acl user5 myportname 3132 ## define outgoing IPv6 per user tcp_outgoing_address [2001:::::::ipv61] user1 tcp_outgoing_address [2001:::::::ipv62] user2 tcp_outgoing_address [2001:::::::ipv63] user3 tcp_outgoing_address [2001:::::::ipv64] user4 ##tcp_outgoing_address [2001:::::ipv65] user5 ##this last IPv6 always gets used for all outbound connections, even if commented out
在Squid 3.1中,每个tcp_outgoing_address行后都需要to_ipv6指令。 如果升级到3.2,则不会遇到此问题。
参考: http : //www.squid-cache.org/Doc/config/tcp_outgoing_address/