2012-03-08 6 views
0

이 블로그 게시물에 설명 된 구성을 복제하려고합니다.오징어는 cache_peer로 IP를 종료합니다.

http://www.everydayinternetstuff.com/2011/03/squid-random-outgoing-ipinterface-selection/

나는 그것이 부모 때문에 단일 인스턴스에서 출구 IP를 롤 있도록 cache_peer 모두의 생각으로 오징어 트릭하도록되어 이해이 기술.

이 구성을 사용하면 입력 한 IP를 종료 할 수 있었지만 입력 할 때 이탈 IP를 회전 할 수 없습니다.

보고되는 오류 페이지는 squid 캐시의 액세스 거부 오류 페이지입니다.

도움이나 제안을 주시면 감사하겠습니다. 또한 다른 사람이 작업 구성을 다른 방식으로 수행 한 경우 해당 제안을 듣는 것이 좋습니다.

http_port <entry ip>:3128 
http_port <exit1>:3128 
http_port <exit2>:3128 
http_port <exit3>:3128 


auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_passwd 
auth_param basic children 5 
auth_param basic realm ProxyBox 
auth_param basic credentialsttl 2 hours 
acl ncsaauth proxy_auth REQUIRED 
http_access allow ncsaauth 

acl src_01 src <exit1> 
acl src_02 src <exit2> 
acl src_03 src <exit3> 

tcp_outgoing_address <exit1> src_01 
tcp_outgoing_address <exit2> src_02 
tcp_outgoing_address <exit3> src_03 

acl first_req src 127.0.0.0/8 
acl second_req src <exitnet>/29 

cache_peer <exit1> parent 3128 0 round-robin no-query login=proxyadmin:password 
cache_peer <exit2> parent 3128 0 round-robin no-query login=proxyadmin:password 
cache_peer <exit3> parent 3128 0 round-robin no-query login=proxyadmin:password 

cache_peer_access <exit1> allow first_req 
cache_peer_access <exit2> allow first_req 
cache_peer_access <exit3> allow first_req 

cache_peer_access <exit1> deny second_req 
cache_peer_access <exit2> deny second_req 
cache_peer_access <exit3> deny second_req 

never_direct allow first_req 
never_direct deny second_req 

답변

0

해당 링크에 설명 된 구성이 큰 혼란이라고 생각합니다. 표준 오징어 구성을 사용하여 IP를 사이에로드를 분산의 iptables를 사용

iptables -t nat -A POSTROUTING -m statistic --mode nth --every 3 -j SNAT --to 192.168.1.201 
iptables -t nat -A POSTROUTING -m statistic --mode nth --every 2 -j SNAT --to 192.168.1.202 
iptables -t nat -A POSTROUTING -m statistic --mode nth --every 1 -j SNAT --to 192.168.1.203 

된 IP의 로컬 IP를해야합니다.

감사합니다, 디에고

관련 문제