具有多个传出IP地址的squid代理

时间:2016-12-08 09:00:42

标签: linux ubuntu proxy reverse-proxy squid

我已安装squid代理服务器以使所有传出请求具有多个公共传出地址。下面是我的配置,但是当我在浏览器中设置代理服务器的IP地址时,我谷歌我的IP,它只给了我在浏览器上设置的代理服务器的IP地址。下面是我的鱿鱼配置

http_access allow all
visible_hostname zeyton



#acl ip1 myip 51.x.x.x1
#acl ip2 myip 51.x.x.x2
#acl ip3 myip 51.x.x.x3
#acl ip4 myip 51.x.x.x4
#acl ip4 myip 51.x.x.x5

acl abc src 192.168.0.0/16
#acl xyz 10.0.2.0/24

#tcp_outgoing_address 51.x.x.x1 ip1
#tcp_outgoing_address 51.x.x.x2 ip2
#tcp_outgoing_address 51.x.x.x3 ip3
#tcp_outgoing_address 51.x.x.x4 ip4
#tcp_outgoing_address 51.x.x.x5 ip4


tcp_outgoing_address 51.x.x.x1 abc
tcp_outgoing_address 51.x.x.x2 abc
tcp_outgoing_address 51.x.x.x3 abc
tcp_outgoing_address 51.x.x.x4 abc

1 个答案:

答案 0 :(得分:1)

我解决了它,如下所示,但在此之前,我已经将IP地址池虚拟地分配给服务器的接口。

http_access allow all
visible_hostname zeyton

acl ip1 myip 51.x.x.x1
acl ip2 myip 51.x.x.x2
acl ip3 myip 51.x.x.x3
acl ip4 myip 51.x.x.x4
acl ip4 myip 51.x.x.x5

tcp_outgoing_address 51.x.x.x1 ip1
tcp_outgoing_address 51.x.x.x2 ip2
tcp_outgoing_address 51.x.x.x3 ip3
tcp_outgoing_address 51.x.x.x4 ip4
tcp_outgoing_address 51.x.x.x5 ip4