[squid-users] Reconfiguring Squid every few seconds
Amos Jeffries
squid3 at treenet.co.nz
Sun Mar 20 04:50:47 UTC 2022
On 19/03/22 13:48, roee klinger wrote:
> Hello,
>
> I have a server with multiple 4G modems with Squid running on it, the 4G
> modems get an internal private IP that is dynamic (unfortunately this
> can't be changed),
>
> I set up Squid to use the interfaces as follows:
>
> tcp_outgoing_address <some_ip>
>
> The configuration works well and everything works great, however,
> whenever I restart one of the modems (I have many, and I restart them a
> lot), I get a new internal private IP, and I need to reconfigure Squid,
> this means that I will be running "squid -k reconfigure" multiple times
> a minute.
>
> Will this have a bad effect on Squid and traffic (I understand this does
> not cause Squid to restart)? What is my alternative?
>
Alternative is to **not** configure Squid with a static IP.
You could use an outgoing TOS or NFMARK from Squid. The OS networking
rules can select routes based on that.
OR, if the src-IP has to change based on the modem being used. You could
use the TOS/MARK in src-NAT rules before route selection - those being
the point reconfigured instead of Squid.
Amos
More information about the squid-users
mailing list