[GELÖST] Windows updates durch Squid Proxy blockiert! Fehler 0x801901f7

Started by opnsense_user12123, December 16, 2017, 09:29:21 PM

Previous topic - Next topic
Unter Pfsense gibt es die Möglichkeit unter "Before Auth" (siehe auch squid.conf) ACLS zu definieren um das Windows Update Problem bei Clients zu umgehen.

Unter Pfsense gibt man das in das Feld "Before Auth" und die Windows Updates werden ohne Problem über die Windows interne Update-Funktion gefunden und installiert.

acl DiscoverSNIHost at_step SslBump1
acl NoSSLIntercept ssl::server_name_regex microsoft.com                     
acl NoSSLIntercept ssl::server_name_regex .microsoft.com                   
acl NoSSLIntercept ssl::server_name_regex windowsupdate.com
acl NoSSLIntercept ssl::server_name_regex .windowsupdate.com
acl NoSSLIntercept ssl::server_name_regex update.microsoft.com.akadns.net

ssl_bump splice NoSSLIntercept
ssl_bump peek DiscoverSNIHost
ssl_bump bump all

acl BrokenButTrustedServers dstdomain download.microsoft.com
acl BrokenButTrustedServers dstdomain update.microsoft.com
acl BrokenButTrustedServers dstdomain update.microsoft.com.akadns.net
acl BrokenButTrustedServers dstdomain update.microsoft.com.nsatc.net
acl DomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
sslproxy_cert_error allow BrokenButTrustedServers DomainMismatch
sslproxy_cert_error deny all

Original Squid Wiki zum Thema:
https://wiki.squid-cache.org/SquidFaq/WindowsUpdate

und hier der Link zu pfsense Lösung:
https://forum.pfsense.org/index.php?topic=135351.0


Kennt hier jemand eine Lösung und könnte seinen Lösungsansatz hier möglichst genau beschreiben.
Das wäre wirklich von Vorteil für viele die OPNsense verwenden.

Vielen Dank!

December 17, 2017, 03:23:46 PM #1 Last Edit: December 23, 2017, 10:48:49 PM by opnsense_user12123
Quote from: opnsense_user12123 on December 16, 2017, 09:29:21 PM
Unter Pfsense gibt es die Möglichkeit unter "Before Auth" (siehe auch squid.conf) ACLS zu definieren um das Windows Update Problem bei Clients zu umgehen.

Unter Pfsense gibt man das in das Feld "Before Auth" und die Windows Updates werden ohne Problem über die Windows interne Update-Funktion gefunden und installiert.

acl DiscoverSNIHost at_step SslBump1
acl NoSSLIntercept ssl::server_name_regex microsoft.com                     
acl NoSSLIntercept ssl::server_name_regex .microsoft.com                   
acl NoSSLIntercept ssl::server_name_regex windowsupdate.com
acl NoSSLIntercept ssl::server_name_regex .windowsupdate.com
acl NoSSLIntercept ssl::server_name_regex update.microsoft.com.akadns.net

ssl_bump splice NoSSLIntercept
ssl_bump peek DiscoverSNIHost
ssl_bump bump all

acl BrokenButTrustedServers dstdomain download.microsoft.com
acl BrokenButTrustedServers dstdomain update.microsoft.com
acl BrokenButTrustedServers dstdomain update.microsoft.com.akadns.net
acl BrokenButTrustedServers dstdomain update.microsoft.com.nsatc.net
acl DomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
sslproxy_cert_error allow BrokenButTrustedServers DomainMismatch
sslproxy_cert_error deny all

Original Squid Wiki zum Thema:
https://wiki.squid-cache.org/SquidFaq/WindowsUpdate

und hier der Link zu pfsense Lösung:
https://forum.pfsense.org/index.php?topic=135351.0


Kennt hier jemand eine Lösung und könnte seinen Lösungsansatz hier möglichst genau beschreiben.
Das wäre wirklich von Vorteil für viele die OPNsense verwenden.

Vielen Dank!

Tja, was soll ich sagen. Es ist wesentlich einfacher in OPNSENSE zu lösen als ich dachte.

Ganz einfach diese 4 Seiten zu den "SSL no bump sites" hinzufügen und voilà es funktioniert.  ;D


.microsoft.com
.windowsupdate.com
.update.microsoft.com.akadns.net
.update.microsoft.com.nsatc.net



in pfsense war dies nur so wie oben beschrieben zu lösen. Wesentlich komplizierter.
by the way.....

nachdem ich pfsense fast ein jahr genutzt habe, bin ich wirklich froh auf OPNSENSE umgestiegen zu sein. Das Ganze macht einen wesentlich stabileren und vorallem durchdachteren Eindruck und hat auch schon beim Einrichten im Gegensatz zu PFSense keine Macken.

ICH BLEIBE BEI OPNSENSE!!!.

Hoffe die Firewall bleibt uns noch lange in dieser Qualität erhalten.

Danke

Hallöchen,

Danke für das Anhängen der Lösung. Habe es als [GELÖST] markiert für alle zukünftigen Leser.  :)



Grüsse
Franco

Ich wollte der Community nur mitteilen, das diese Lösung nur noch bis zu Windows 7 funktioniert.
Seit dem letzten Windows 10 Update Ende letzten Jahres (Ende 2017), funktioniert dies nicht mehr mit Windows 10.

Das hinzufügen, dieser Seiten zur NO SSL BUMP Liste (.microsoft.com
.windowsupdate.com, .update.microsoft.com.akadns.net, .update.microsoft.com.nsatc.net) bringt leider nichts mehr. Auch andere Seiten habe ich noch zusätzlich hinzugefügt. Leider auch ohne Erfolg.
Warum, weiß ich nicht. Fehlercode: (0x800b0109)

Möglicherweise würde es funktionieren, wenn man so wie bei pfsense unter "Before Auth" diese Einträge machte wie ganz oben(erster Post) beschrieben, nur geht das leider unter opnsense nicht.

Falls jemand eine Lösung kennt, bitte posten.

P.S Nein, ich verwende kein IDS/IPS.
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

Thats how it should be solved-> https://wiki.squid-cache.org/SquidFaq/WindowsUpdate
How can this be done in opnsense?
since the gui cannot handle this.


Squid with SSL-Bump and Windows Updates
by Yuri Voinov
In modern setups with Squid, Windows Update cannot be check updates with error "WindowsUpdate_80072F8F" or similar.

WU now uses its own pinned SSL certificate and must be spliced to work. When you use sniffer, you can see many IP's with relatively big subnetworks. This leads to problems with a Squid-3.4 and causes serious problems when using Squid-3.5 or above.

To use splicing, you need to know the names of the servers, however, a recursive DNS query does not give a result.

To pass WU check through Squid splice, you only need to splice next MS servers:


update.microsoft.com
update.microsoft.com.akadns.net
For use in real setups, write file url.nobump:


# WU (Squid 3.5.x and above with SSL Bump)
# Only this sites must be spliced.
update\.microsoft\.com
update\.microsoft\.com\.akadns\.net
Just add this file as Squid ACL as follows:


acl DiscoverSNIHost at_step SslBump1
acl NoSSLIntercept ssl::server_name_regex -i "/usr/local/squid/etc/url.nobump"
ssl_bump splice NoSSLIntercept
ssl_bump peek DiscoverSNIHost
ssl_bump bump all
and you do not need to know all the IP authorization server for updates.

{i} NOTE: In some countries WU can product SQUID_X509_V_ERR_DOMAIN_MISMATCH error via Akamai. To do WU, you can require to add this into your Squid's config:

acl BrokenButTrustedServers dstdomain "/usr/local/squid/etc/dstdom.broken"
acl DomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
sslproxy_cert_error allow BrokenButTrustedServers DomainMismatch
sslproxy_cert_error deny all
and add this to dstdom.broken:


download.microsoft.com
update.microsoft.com
update.microsoft.com.akadns.net
update.microsoft.com.nsatc.net
{i} NOTE: Depending your Squid's configuration, you may need to change your Squid's cipher configuration to this one:

sslproxy_cipher HIGH:MEDIUM:RC4:3DES:!aNULL:!eNULL:!LOW:!MD5:!EXP:!PSK:!SRP:!DSS
and add this one to your bumped port's configuration:


cipher=HIGH:MEDIUM:RC4:3DES:!aNULL:!eNULL:!LOW:!MD5:!EXP:!PSK:!SRP:!DSS
3DES and RC4 required to connect to WU and - attention! - Skype assets site.

/!\ WARNING: Some updates cannot be cached due to splice above. Beware!
/!\ WARNING: Adding 3DES and, especially, RC4, produces potentially weak ciphers via client and WU/Skype and some other sites. Be careful!
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

Quote from: noname12123 on May 12, 2018, 10:54:49 AM
To pass WU check through Squid splice, you only need to splice next MS servers:


update.microsoft.com
update.microsoft.com.akadns.net
For use in real setups, write file url.nobump:


# WU (Squid 3.5.x and above with SSL Bump)
# Only this sites must be spliced.
update\.microsoft\.com
update\.microsoft\.com\.akadns\.net
Just add this file as Squid ACL as follows:


acl DiscoverSNIHost at_step SslBump1
acl NoSSLIntercept ssl::server_name_regex -i "/usr/local/squid/etc/url.nobump"
ssl_bump splice NoSSLIntercept
ssl_bump peek DiscoverSNIHost
ssl_bump bump all
and you do not need to know all the IP authorization server for updates.

is is already in the GUI as no bump sites.

Quote from: noname12123 on May 12, 2018, 10:54:49 AM
{i} NOTE: In some countries WU can product SQUID_X509_V_ERR_DOMAIN_MISMATCH error via Akamai. To do WU, you can require to add this into your Squid's config:

acl BrokenButTrustedServers dstdomain "/usr/local/squid/etc/dstdom.broken"
acl DomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
sslproxy_cert_error allow BrokenButTrustedServers DomainMismatch
sslproxy_cert_error deny all
and add this to dstdom.broken:


download.microsoft.com
update.microsoft.com
update.microsoft.com.akadns.net
update.microsoft.com.nsatc.net

This is currently not available via the GUI. For this particular use case it would be simple to implement but it should be a generic solution to handle all types of TLS issues.

Quote from: noname12123 on May 12, 2018, 10:54:49 AM
{i} NOTE: Depending your Squid's configuration, you may need to change your Squid's cipher configuration to this one:

sslproxy_cipher HIGH:MEDIUM:RC4:3DES:!aNULL:!eNULL:!LOW:!MD5:!EXP:!PSK:!SRP:!DSS
and add this one to your bumped port's configuration:


cipher=HIGH:MEDIUM:RC4:3DES:!aNULL:!eNULL:!LOW:!MD5:!EXP:!PSK:!SRP:!DSS
3DES and RC4 required to connect to WU and - attention! - Skype assets site.

/!\ WARNING: Some updates cannot be cached due to splice above. Beware!
/!\ WARNING: Adding 3DES and, especially, RC4, produces potentially weak ciphers via client and WU/Skype and some other sites. Be careful!

This is very bad security practise. I hardened that a long time ago and I tend to make the current setting even stricter.

thx fabian for this information!
So there is currently no solution?

best regards
rené
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

You can add it to the proxy template but you have to do that for every release.