Tuesday, April 05, 2011

Squid Proxy - Cache Windows, Adobe, and Java updates

Your pfSense has the ability to cache popular updates like UpdateAccelerator for your favorite OS and its ancillary applications.

You will need to install the Squid Proxy package then go to the Proxy Server under the Services menu.


  • Select the Cache Mgmt tab then set your hard disk cache size to 3000 MB or better (I set mine to 10000 MB because I have a 250GB hdd and there's still plenty of room left).  
  • Up your memory cache size to around 1/4 of the installed memory - this will speed up your proxy over all.
  • Set your maximum object size to 512000 - this will cache files up to 512MB, a bit bigger than the biggest service packs I've come across.  You can adjust this size as you see fit!


Once you have completed these steps paste the following into your pfSense Squid Proxy "Custom Options" and, save it, watch your updates fly (after the initial download):

refresh_pattern ([^.]+.|)(download|(windows|)update|).(microsoft.|)com/.*\.(cab|exe|msi|msp) 43200 100% 43200 reload-into-ims;range_offset_limit -1;refresh_pattern ([^.]+.|)windowsupdate.com/.*\.(cab|exe|msi|msp) 43200 100% 43200 reload-into-ims;range_offset_limit -1;refresh_pattern ([^.]+.|)adobe.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims;refresh_pattern ([^.]+.|)java.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims;refresh_pattern ([^.]+.|)sun.com/.*\.(zip|exe) 43200 100% 43200 reload-into-ims