Squid non fa la cache di Windowsupdate

From RVM Wiki
Revision as of 16:35, 13 September 2005 by Gabriele.vivinetto (talk | contribs)
Jump to navigation Jump to search

Preso da Squid problems with WindowsUpdate v5

Configurazione del client

Sintomo: WindowsUpdate gives error codes like 0x80072EFD and cannot update, automatic updates aren't working too.

Causa: In earlier Windows-versions WindowsUpdate takes the proxy-settings from Internet Explorer. Since XP SP2 this is not sure. At my machine I ran Windows XP SP1 without WindowsUpdate problems. When I upgraded to SP2 WindowsUpdate started to give errors when searching updates etc.

The problem was that WU did not go through the proxy and tries to establish direct HTTP connections to Update-servers. Even when I set the proxy in IE again, it didn't help . It isn't Squid's problem that Windows Update doesn't work, but it is in Windows itself.

Soluzione: The solution is to use the 'proxycfg' tool shipped with Windows XP. With this tool you can set the proxy for WinHTTP.

  • gives information about the current connection type. Note: 'Direct Connection' does not force WU to bypass proxy
C:\> proxycfg 
  • Set Direct Connection
C:\> proxycfg -d 
  • Set Proxy to use with Windows Update to wu-proxy.lan, port 8080
C:\> proxycfg -p proxy:3128
  • Set proxy to Internet Explorer settings.
c:\> proxycfg -u

La versione corretta di proxycfg.exe la si può trovare su una macchina XP o 2003 in %SYSTEMROOT%\system32

Configurazione di squid

Per rendere permanente il caching dei download di windowsupdate, aggiungere in /etc/squid/squid.conf:

refresh_pattern windowsupdate.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims

Suggerimento preso da windowsupdate_cache dove esiste anche uno script per creare uno store con redirect.