首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Squid代理:如何将入站IPv4+port链接到出站IPv6

Squid代理:如何将入站IPv4+port链接到出站IPv6
EN

Server Fault用户
提问于 2013-05-22 07:31:55
回答 1查看 9.1K关注 0票数 7

我正在尝试设置一个squid代理,它将在一个IPv4上跨一系列端口接受多个入站连接,并为每个端口连接在一个唯一的IPv6地址上。

我已经命名了每个端口连接,并根据连接名称指定了一个ACL,然后我尝试为每个端口定义一个传出IPv6。下面的脚本起作用,因为它接受不同端口上的连接,并通过IPv6输出,因此所有出站连接都使用相同的IPv6 ( user5 ),尽管每个用户定义的ipv6不同--即使我注释掉了squid.conf的user5 IPv6,它仍然用于出站连接。

有人能看到这里出了什么问题吗?(在Centos 6 64位上使用Squid 3.1.1 )

代码语言:javascript
复制
## 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
EN

回答 1

Server Fault用户

回答已采纳

发布于 2013-05-22 11:56:35

在Squid3.1中,您需要在每一行to_ipv6行之后使用tcp_outgoing_address指令。如果升级到3.2,就不会遇到这个问题。

参考资料:http://www.squid-cache.org/Doc/config/tcp_外发_地址/地址

票数 3
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/509785

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档