Firewall – How to configure PFSense firewall with external transparent Squid proxy

firewallpfsenseport-forwardingsquid

I am using PFSense 2.0 and trying to get transparent proxy to work. As the internal Squid won't work with loadbalancing and dual-wan (and it seems Squid doesn't work at all on the latest build), I installed Squid on one of the Linux servers I have on my LAN.

My LAN is 10.10.10.0/24 and all my servers are between 10.10.10.10-20 and desktops 10.10.10.200-250. How can I redirect HTTP connections from my desktops to my Squid server at 10.10.10.13:3128? I have tried looking the answer with google, but only seem to come up with transparent proxy Howtos for running the Squid on PFSense box.

Best Answer

SO in PF you have to do the following:

int_if="fxp0"
ext_if="em0"

rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128

pass in on $int_if inet proto tcp from any to 127.0.0.1 port 3128 keep state
pass out on $ext_if inet proto tcp from any to any port www keep state

Be sure that your SQUID has the transparent module when you compiled it, or the package is transparent enabled you are using.