7

I'm trying to setup a squid proxy that will accept multiple inbound connections on one IPv4 across a range of ports, and for each port connection to connect out on a unique IPv6 address.

I've named each port connection, and designated an ACL based on the connection name, and then I've tried to define an outgoing IPv6 for each. The script below works, in that it accepts connections on the different ports and routes out via IPv6 however, all outbound connections use the same IPv6 (user5) even though there are different ipv6 defined per user - the wierd bit is that even if I comment-out that user5 IPv6 from squid.conf, it still gets used for outbound connections.

Can anyone see whats wrong here? (using Squid 3.1.1 on Centos 6 64bit)

## 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
user2408290
  • 73
  • 1
  • 3

1 Answers1

3

In Squid 3.1 you need the to_ipv6 directive after each tcp_outgoing_address line. If you upgrade to 3.2 you won't encounter this problem.

Reference: http://www.squid-cache.org/Doc/config/tcp_outgoing_address/

Nathan C
  • 15,059
  • 4
  • 43
  • 62
  • 1
    However, after the update, I'm still having the same issue of all outbound connections use the same IPv6 (user5 in the above example) even though there are different ipv6 defined per user. As i mentioned in the question, the strange thing is that even if I comment-out that user5 IPv6 from squid.conf, it still gets used for outbound connections. – user2408290 Jun 05 '13 at 13:09
  • @user2408290 did you solve your problem? – Arya Aug 18 '17 at 23:41
  • I am having the exact same problem and this does not resolve it for me on Squid 3.5.12 – Tom Ruh Apr 14 '18 at 15:38