@dhatz:
Unrelated to the original question, but rather than putting the squid box on the WAN subnet, have you considered putting it on a 3rd ("dmz") subnet?
Hi dhatz,
Yep - absolutely. Originally, the squid server was being shared by other firewalls who also use transparent NAT, and the only location in common was the WAN subnet. Since then the number of firewalls has been reducing following the transition period so now the best thing is to relocate to a DMZ. There are three main reasons I can think of:
Less security concerns over locking down the squid box (when on the WAN subnet it is on a public internet address with no firewall protecting it)
Simpler with more fexibility - in the multi-wan environment we are considering, the 'smarts' to choose different WAN gateways based on failover or load-balancing is built into pfsense. With the current (external squid) design I have to duplicate wan failover/loadbalancing into the squid host. So moving squid into DMZ I can set up all the WAN load-balancing/rate-limiting/filtering once in pf and squid can take advantage of it just like any other client on the internal networks.
Not really a DMZ response and I know this not what you were suggesting, but I caution people deploying squid on a primary pfsense firewall in a more 'complex' environment. Squid on pfsense is great - no problems with me there! However I am always cautious when a proxy (or load-balance) function is deployed on a firewall. For example. My 'guest' dmz is not allowed to connect to anything on the 'inside' network. But if guests are transparently captured to squid on the firewall, how can I be absolutely sure that squid is not forwarding requests internally on behalf of the guests? Admittedly, squid has all the configuration options needed to enforce this - and probably pf as well, however I just feel better knowing that squid is completely separated and has no chance of being mis-configured in this way. Best to put that role (squid) in the correct network location to start with. For me at home though - squid goes on the firewall :)
..and just to tie this back to the thread topic a little, as I start working with floating rules and more 'generic' PBR for transparent port 80 capturing - then in my mind at least - this introduces more chance of user error (me :) ) such that things could be going to squid that shouldn't - again, more reason to ensure squid is correctly located on the network so that squid's role is enforced by the network security architecture, and less dependant on my late night stumbling around on keyboards…
GB