Windows Update Via Squid Proxy

Posted by blogadmin on October 3, 2012

Windows update fails, if your squid proxy server running with default configuration. You will see similar lines in log. Notice the last line it says 0 bytes received If you copy paste that link in your browser the file successfully downloads.

1347549441.620    132 192.168.5.1 TCP_MISS/200 7783 GET http://download.windowsupdate.com/msdownload/update/common/2012/04/4981179_99f1040a75dab2dd6e355027d950e9fe233b7090.cab - DIRECT/203.94.209.25 application/octet-stream
1347549441.755    126 192.168.5.1 TCP_MISS/200 7770 GET http://download.windowsupdate.com/msdownload/update/common/2012/04/4977166_7447c64c5d86447b19b12c5fcbd0e5a76eabf411.cab - DIRECT/203.94.209.27 application/octet-stream
1347549441.898    134 192.168.5.1 TCP_MISS/200 8427 GET http://download.windowsupdate.com/msdownload/update/common/2012/04/4977186_8ef415429ef352007c94bda5d10ef40f4691a083.cab - DIRECT/203.94.209.25 application/octet-stream
1347549442.080    173 192.168.5.1 TCP_MISS/200 8127 GET http://download.windowsupdate.com/msdownload/update/common/2012/08/5705637_3ea9f33b7aec195f5b15463695113013a1df2bdf.cab - DIRECT/203.94.209.27 application/octet-stream
1347549442.218    129 192.168.5.1 TCP_MISS/200 8128 GET http://download.windowsupdate.com/msdownload/update/common/2012/08/5705640_b9df2fe5faf3c804aefa72668c011c3df8cb2e7a.cab - DIRECT/203.94.209.25 application/octet-stream
1347549442.391    163 192.168.5.1 TCP_MISS/200 7691 GET http://download.windowsupdate.com/msdownload/update/common/2012/04/4985460_48febd5c6faf22be72a147fcadb83a9fe9abf0b4.cab - DIRECT/203.94.209.27 application/octet-stream
1347549442.400      0 192.168.5.1 TCP_HIT/200 7944 GET http://download.windowsupdate.com/msdownload/update/software/dflt/2012/02/4913552_4a5c9563d1f58c77f30d0d5c9999e4b8bff3ab21.cab - NONE/- application/octet-stream

To solve this put following lines in your squid.conf and restart.

range_offset_limit -1 # Windows update sends file in parts. This will download entire file from start
maximum_object_size 200 MB # The update files are large, 200MB should be safe
quick_abort_min -1 # This will continue download even if client disconnects

Following are some ways to cache popular updates:


To cache windows updates.

refresh_pattern -i microsoft.com/.*.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
refresh_pattern -i windowsupdate.com/.*.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
refresh_pattern -i my.windowsupdate.website.com/.*.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims

To cache kaspersky AV updates.

refresh_pattern -i .*kaspersky.com/.*.(.*) 1440 100% 1440 reload-into-ims override-expire override-lastmode
refresh_pattern -i .*kaspersky-labs.com/.*.(.*) 1440 100% 1440 reload-into-ims override-expire override-lastmode

To cache AVG updates.

refresh_pattern guru.avg.com/.*.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern bguru.avg.com/.*.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern af.avg.com/.*.(bin) 4320 100% 43200 reload-into-ims
Share Button

Filed under System Administration

Tagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>