Windows 10/11 connection to localhost proxy fails on TCP handshake

Tested on

Windows 10 and Windows 11 with the latest Microsoft Teams app.

Could not reproduce the problem on MacOS with Microsoft Teams.
Could only reproduce the problem on localhost Windows 10/11 (have not tested other Windows versions so far).

Context

We are working on a solution the monitors network traffic for a safe school environment. As part of that we install a local proxy on Windows devices. The proxy is configured as manual proxy in the system proxy settings.

enter image description here

When requesting to sign into the Microsoft Teams app, Teams establishes a connection to login.microsoftonline.com. Without the proxy that works without problems. Teams establishes a TCP connection, sends a CONNECT, TLS handshake (…):

368 1.574576    10.12.128.2 53524   20.190.142.163  443 TCP 66  53524 → 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=256 SACK_PERM
372 1.603857    20.190.142.163  443 10.12.128.2 53524   TCP 66  443 → 53524 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1440 WS=256 SACK_PERM
373 1.603929    10.12.128.2 53524   20.190.142.163  443 TCP 54  53524 → 443 [ACK] Seq=1 Ack=1 Win=262144 Len=0
374 1.606798    10.12.128.2 53524   20.190.142.163  443 TLSv1.2 264 Client Hello (SNI=login.microsoftonline.com)

When activating the local proxy this connection to login.microsoftonline.com is not being established. Other connections are fine though (e.g. teams.events.data.microsoft.com, nav.smartscreen.microsoft.com are established just fine):

28  2.021798    127.0.0.1   53465   127.0.0.1   18081   TCP 56  53465 → 18081 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM
30  2.021938    127.0.0.1   53465   127.0.0.1   18081   TCP 44  53465 → 18081 [ACK] Seq=1 Ack=1 Win=262144 Len=0
31  2.022029    127.0.0.1   53465   127.0.0.1   18081   HTTP    210 CONNECT teams.events.data.microsoft.com:443 HTTP/1.0 

In Teams this results in an error page that the login page can’t be reached (it reports a 404, but it’s not a 404).

enter image description here

We ensured that nothing was blocked in the proxy and there are no low-level connection errors, then we dug deeper with Wireshark.

Detected Problem

Once accessing the login page (which would trigger connection making for login.microsoftonline.com) we see a SYN being sent to establish a TCP connection, but there is never a SYN/ACK. The local proxy never receives this SYN (no connection is ever established), somehow it never reaches the destination but is “dropped”. We can see that Teams tries to re-transmit the SYN, but it never arrives at the destination:

1   0.000000    127.0.0.1   53462   127.0.0.1   18081   TCP 56  53462 → 18081 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM
27  0.996856    127.0.0.1   53462   127.0.0.1   18081   TCP 56  [TCP Retransmission] 53462 → 18081 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM
49  2.996787    127.0.0.1   53462   127.0.0.1   18081   TCP 56  [TCP Retransmission] 53462 → 18081 [SYN] Seq=0 Win=65535 Len=0 MSS=65495 WS=256 SACK_PERM

Attempted Solutions / Experiments

A tcp SYN not reaching it’s destination points to it being blocked somewhere, so we:

  • Turned the firewall off (anything that can be turned off is turned off)

  • Evaluated any other application specific access control rules.

We could not find what would cause this blockage, the problem keeps persisting.

(Note: We were able to reproduce this problem with a different proxy solution as well. Once we configure the proxy on localhost we run into this issue.)

We also tried:

  • Configure the local proxy with the IP address of the machine within the local network (i.e. 10.12.128.2) instead of 127.0.0.1: Leads to the same problem.

  • Run the local proxy on another Windows machine, turn off firewall and connect to the proxy on the other machine: No problems with this setup, the connection to login.microsoftonline.com is established without problems through the proxy:

728 5.251217    10.12.128.2 50183   10.12.128.1 18081   TCP 66  50183 → 18081 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=256 SACK_PERM
729 5.251797    10.12.128.1 18081   10.12.128.2 50183   TCP 66  18081 → 50183 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1460 WS=256 SACK_PERM
730 5.251886    10.12.128.2 50183   10.12.128.1 18081   TCP 54  50183 → 18081 [ACK] Seq=1 Ack=1 Win=262144 Len=0
731 5.252182    10.12.128.2 50183   10.12.128.1 18081   HTTP    360 CONNECT login.microsoftonline.com:443 HTTP/1.0 

We then tried to configure the proxy via PAC file (without a DIRECT fallback), which result in different weird behavior with the Teams app.

In the browser the behavior is as expected – pages that are blocked by the proxy report a connection failure, pages that are allowed can be accessed.

For the Teams app login we don’t run into problems with the PAC file based settings, but Teams does not route the connection to login.microsoftonline.com through the proxy! The connection to login.microsoftonline.com somehow implicitly bypasses the system wide proxy settings when using a PAC file (i.e. I see the connection in Wireshark, but it’s directly established, not going through the proxy even though it is configured via PAC file). Other connections related to Teams (e.g. teams.events.data.microsoft.com, nav.smartscreen.microsoft.com) are established through the proxy as expected.

Help please…

It would be great to get help with a better understanding of the cause. Looking for some Windows gurus that can potentially shed some light on what’s causing this.

  • What could cause the TCP SYN drop besides the obvious firewall / access control?
  • What could cause Teams to behave differently on localhost than over the local network?
  • When using a PAC file Windows configures the proxy for us, but why would this behave different in Teams?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật