Ни для кого не секрет, что в том случае, если Ваш ПК с ОС Microsoft выходит в интернет с помощью прокси-сервера, то служба обновления системы Windows Update по-умолчанию не работает. Эта заметка о том, как можно настроить работу системы обновлений Windows на ПК, находящимся за прокси-сервером.
Служба обновлений Windows Update может использовать HTTP прокси-сервер. Однако указания прокси-сервера в настройках Windows Internet Explorer недостаточно для работы службы обновления через проксю. Дело в том, что Windows Update использует Windows HTTP Services (WinHTTP) для поиска обновления, а для загрузки обновлений используется BITS. Служба Windows Update по-умолчанию настроена так, что всегда пытается попасть на сервер обновлений Microsoft напрямую, не используя прокси-сервер, даже если в настройках Internet Explorer он указан.
Однако данная проблема решаема, достаточно настроить системный WinHttp прокси. В ОС Windows XP/2003 WinHttp прокси задавался с помощью утилиты proxycfg.exe. В новых ОС Windows Vista/7/2008 данная утилита упразднена и настройка WinHttp прокси выполняется при помощи команды netsh.
Настройка выполняется при помощи следующей команды: netsh winhttp set proxy <адрес_прокси_сервера>:<порт_прокси_сервера>.
После того, как вы выполните данную команду, ваша ОС Windows 7 будет обновляться, даже находясь за прокси-сервером.
Как вариант, если вы хотите взять настройки прокси из Internet Explorer, можно воспользоваться командой:
netsh winhttp import proxy source=ie
Как вариант возможна также ситуация, когда необходимо перенаправить весь трафик, кроме трафика на Microsoft (системные обновления, активация) на прокси-сервер, тогда можно воспользоваться следующей командой обхода прокси для обновлений Windows.
Сделайте обход прокси для активации и обновлений вот так:
netsh winhttp set proxy proxy-server="your-proxy-srv:3128" bypass-list="*.windowsupdate.com;*.microsoft.com"
Текущие настройки WinHttp можно посмотреть командой:
netsh winhttp show proxy
Сбросить же настройки прокси сервера можно при помощи команды:
Netsh winhttp reset proxy
Кстати netsh отличная утилита командной строки для работы с сетевыми службами и настройками, и каждый профессиональный Windows админ должен уметь ею пользоваться. Я уже не раз упоминал о ней, в статье о графической диагностике сети при помощи netsh, или про управление сервером DHCP Windows Server из командной строки PowerShell.
It is not a secret for anyone that in the event that your PC running Microsoft OS is connected to the Internet using a proxy server, the Windows Update service doesn’t work by default. This note is about how you can configure the Windows Update system on a PC behind a proxy server.
The Windows Update service can use an HTTP proxy server. However, specifying the proxy server in the Windows Internet Explorer settings is not enough for the update service to work through the proxy. The fact is that Windows Update uses Windows HTTP Services (WinHTTP) to look for updates, and BITS is used to download updates. The Windows Update service is configured by default so that it always tries to access the Microsoft update server directly, without using a proxy server, even if it is specified in Internet Explorer settings.
The configuration is performed using the following command:
netsh winhttp set proxy
After you run this command, your Windows 7 OS will be updated, even when you are behind a proxy server.
Alternatively, if you want to take proxy settings from Internet Explorer, you can use the command:
netsh winhttp import proxy source = ie
As an option, it is also possible that you need to redirect all traffic except for Microsoft traffic (system updates, activation) to a proxy server, then you can use the following proxy bypass command for Windows updates.
Do a proxy bypass for activation and updates like this:
netsh winhttp set proxy proxy-server = “your-proxy-srv: 3128” bypass-list = “*. windowsupdate.com; *. microsoft.com”
The current WinHttp settings can be viewed with the command:
netsh winhttp show proxy
You can reset the proxy server settings using the command:
Netsh winhttp reset proxy
Related post : Windows 7 RSAT for Windows Server
- Главная
- Вопрос-ответ
Иногда случается так, что компьютер, который работает в локальной сети компании через прокси-сервер не может получить доступ к обновлениям Microsoft, будь то Windows Update или например обновления для антивируса Security Essentials.
Ранее, в Windows XP для решения этой проблемы использовалась команда proxycfg. Мы не будем вдаваться в подробности всех ключей данной команды, которые можно увидеть набрав в командной строке Windows XP:
proxycfg /?
В нашем случае, достаточно импортировать настройки прокси-сервера из Internet Explorer (при условии, что он настроен) командой:
proxycfg -u
В Windows 7 и Windows 2008 утилита proxycfg удалена, но весь её функционал перенесён в утилиту netsh. И в нашем случае, для импорта настроек прокси-сервера из Internet Explorer нам понадобится команда:
NetSH WinHTTP import Proxy ie
P.S. Все команды должны выполняться в командной строке с правами администратора.
If updates fail to run through the proxy, you will need to manually set proxy settings for Windows Update. Additionally, it may be necessary to bypass authentication for certain URLs in order for the updates to pass.
Setting Proxy Configuration for Windows Updates
- You can import proxy settings from Internet Explorer by opening a command prompt and entering the following:
- netsh winhttp import proxy
- Additionally, you can manually set the proxy by opening a command prompt and entering the following:
- netsh winhttp set proxy <Proxy Server>:<Port> “<Exclusion List>”
Bypassing Authentication for Windows Updates
- In the CyBlock interface, go to User Management – Authentication and click the Bypass tab.
- Add new bypass entries by clicking the green button.
- Create two separate entries using the following configurations (with asterisks as wildcards).
- URL or Domain: *.microsoft.com | User-Agent: *
- URL or Domain: *.windowsupdate.com | User-Agent: *
Windows 7 / Getting Started
Windows Update can use an HTTP proxy server. However, configuring Windows Internet
Explorer is not sufficient to configure Windows Update because Windows Update uses
Windows HTTP Services (WinHTTP) to scan for updates and BITS to download updates.
You can configure Windows Update to use a proxy server in two ways:
- Web Proxy Auto Detect (WPAD) settings are configured. The WPAD feature lets services
locate an available proxy server by querying a Dynamic Host Configuration Protocol
(DHCP) option or by locating a particular Domain Name System (DNS) record. - Use the Netsh command-line tool, which replaces the Proxycfg.exe tool.
To use the Netsh command-line tool, first switch to the Netsh Winhttp context. Then, use
the show proxy command to view settings or the set proxy command to define your proxy
server configuration settings. For example, you can run the following command to view
current proxy server settings.
Netsh winhttp show proxy
The following commands demonstrate how to configure proxy server settings.
Netsh winhttp set proxy myproxy Netsh winhttp set proxy myproxy:80 "<local>;bar" Netsh winhttp set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list="*. contoso.com"
Alternatively, if you have configured Internet Explorer proxy server settings correctly, you
can import settings from Internet Explorer into WinHTTP by using the following command.
Netsh winhttp import proxy source=ie
To reset your proxy server settings, run the following command.
Netsh winhttp reset proxy