Squid bind specific IP Address (workaround)

tldr, I used nginx!

So since I have my VPS on anycasted IPs and I use ansible to deploy, I wanted to make 3 all servers nearly the same, minus their specific ‘mgmt’ public IPs, so moving squid to a new IP I wanted to use the standard https port but could NOT figure out a way to get squid to bind on the specific IP.

So here’s what I ended up with, I used a non-standard port, and then used nginx streams to redirect the traffic, yes I could use iptables or lvs but this was what I used, it’s easy and it performed well enough for me.


stream {
 server {

Simple, and works as expected, hope this helps others looking for an answer.

One Reply to “Squid bind specific IP Address (workaround)”

Say Something Nice