Squid Web Cache wiki

Squid Web Cache documentation

πŸ”— Rotating the Squid outbound IPs

This is a section for weird (and sometimes wonderful) configurations Squid is capable of. Clued in admin often find no actual useful benefits from going to this much trouble, but well, people seems to occasionally ask for them…

πŸ”— Outline

Write some introduction here.

πŸ”— Real: Load balancing

When squid is faced with multiple outbound links and needs to load-balance between them this can have some utility. It should be noted however that proper configuration of the routing tables for those links will be of much greater benefit and catch non-Squid traffic in the load balancing as well.

acl download method GET HEAD
acl upload method POST PUT

# IP used by link for downloads
tcp_outgoing_address download

# IP used by link for uploads
tcp_outgoing_address upload

πŸ”— Weird: So-called privacy

I assume that some requesters have heard about an IPv6 privacy address RFC that popped up some time ago and want to do this for IPv4 as well via Squid.

Points to Note:

πŸ”— Example: Rotating three IPs based on time of day

acl morning time 06:00-11:59
acl afternoon time 12:00-18:00
acl night time 18:00-06:00

# IP used in the morning
tcp_outgoing_address morning

# IP used in the afternoon
tcp_outgoing_address afternoon

# IP used in the night
tcp_outgoing_address night

⚠️ Disclaimer: Any example presented here is provided "as-is" with no support
or guarantee of suitability. If you have any further questions about
these examples please email the squid-users mailing list.

Categories: ConfigExample

Navigation: Site Search, Site Pages, Categories, πŸ”Ό go up