Kind of an annoying case, and since I'm fairly inexperienced when it comes to networking I'm not doing too well!
The situation is fairly simple; I have a network in which all outgoing traffic is routed through a single machine. This machine contains a Squid cache/proxy, and uses the following ipfw rule to force specific HTTP traffic to go via that cache:
Now, this works great. However the problem is that the gateway machine is also actively used (it's only a small network, but the gateway machine is plenty powerful enough to handle use + proxying), and I want to find a rule that will allow me to force local traffic through Squid as well. The issue with this however is that every rule I've tried produces a loop whereby a local, outgoing request is forwarded to squid, and if squid needs to forward the outgoing request (so that it can cache the result) then it is redirected back to itself over and over until it realises that looping is occurring.
I realise this is a bit of an odd use-case, however I can't for the life of me figure out how to redirect only traffic from a source other than the proxy (in this case the Squid cache), is such a thing even possible, perhaps using some kind of devious trickery? I haven't really got the resources for a separate machine, however the gains of using the proxy are significant, but I need every machine to be able to use it as the gateway machine is one of the primary users due to being the most powerful on the network
The situation is fairly simple; I have a network in which all outgoing traffic is routed through a single machine. This machine contains a Squid cache/proxy, and uses the following ipfw rule to force specific HTTP traffic to go via that cache:
Code:
fwd 127.0.0.1:3128 from 192.168.2.0/24 to any dst-port 12046
I realise this is a bit of an odd use-case, however I can't for the life of me figure out how to redirect only traffic from a source other than the proxy (in this case the Squid cache), is such a thing even possible, perhaps using some kind of devious trickery? I haven't really got the resources for a separate machine, however the gains of using the proxy are significant, but I need every machine to be able to use it as the gateway machine is one of the primary users due to being the most powerful on the network