Squid non fa la cache di Windowsupdate: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
Preso da [http://www.squid-cache.org/Doc/FAQ/FAQ.html#toc11.54 Squid problems with WindowsUpdate v5]
Preso da [http://www.squid-cache.org/Doc/FAQ/FAQ.html#toc11.54 Squid problems with WindowsUpdate v5]


----
== Configurazione del client ==
11.54 Squid problems with WindowsUpdate v5
Sintomo: WindowsUpdate gives error codes like 0x80072EFD and cannot update, automatic updates aren't working too.


By Janno de Wit
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.


There seems to be some problems with Microsoft Windows to access the Windows Update website. This is especially a problem when you block all traffic by a firewall and force your users to go through the Squid Cache.
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.  


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


rror codes like 0x80072EFD and cannot update, automatic updates aren't working too.
* gives information about the current connection type. Note: 'Direct Connection' does not force WU to bypass proxy
C:\> proxycfg


Cause: 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.
* Set Direct Connection
C:\> proxycfg -d


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. The solution is to use the 'proxycfg' tool shipped with Windows XP. With this tool you can set the proxy for WinHTTP.
* Set Proxy to use with Windows Update to wu-proxy.lan, port 8080
C:\> proxycfg -p proxy:3128


Commands:
* 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


C:\> proxycfg
== Configurazione di squid ==
# gives information about the current connection type. Note: 'Direct Connection' does not force WU to bypass proxy


C:\> proxycfg -d
Per rendere permanente il caching dei download di windowsupdate, aggiungere in /etc/squid/squid.conf:
# Set Direct Connection


C:\> proxycfg -p wu-proxy.lan:8080
<pre>
# Set Proxy to use with Windows Update to wu-proxy.lan, port 8080
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 download.windowsupdate.com/.*\.(cab|exe|psf) 4320 100% 43200 reload-into-ims
refresh_pattern nai.com/.*\.(tar|zip|cab|exe) 4320 100% 43200 reload-into-ims
#quest'ultimo non è per windowsupdate ma per mcafee
</pre>


c:\> proxycfg -u
E' opportuno anche aumentare la grandeza della cache di squid, impostandola ad alemno 3Gb=3000Mb modificando la riga in /etc/squid/squid.conf:
# Set proxy to Internet Explorer settings.


----
cache_dir ufs /var/spool/squid 3000 16 256
La versione corretta di proxycfg.exe la si può trovare su una macchina XP o 2003 in %SYSTEMROOT%\system32
 
Suggerimento preso da [http://www.glob.com.au/windowsupdate_cache/ windowsupdate_cache] dove esiste anche uno script per creare uno store con redirect.

Latest revision as of 14:42, 7 November 2005

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 download.windowsupdate.com/.*\.(cab|exe|psf) 4320 100% 43200 reload-into-ims
refresh_pattern nai.com/.*\.(tar|zip|cab|exe) 4320 100% 43200 reload-into-ims
#quest'ultimo non è per windowsupdate ma per mcafee

E' opportuno anche aumentare la grandeza della cache di squid, impostandola ad alemno 3Gb=3000Mb modificando la riga in /etc/squid/squid.conf:

cache_dir ufs /var/spool/squid 3000 16 256

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