Live data from Hacker News

How does Windows decide whether your computer has full Internet access?

devblogs.microsoft.com

291–300 of 305 posts

Re: How does Windows decide whether your computer has full Internet access?

#291

Earlier quoted context omitted.

Are you referring to port forwarding? This can work around only a small part of the stuff NAT breaks, and even for those it covers it's a major barrier to application adoption. A new application relying network effects needs to work for the vast majority of users to be able to take off. If you prevent 30-50% of users adopting it, it's not going to take off for example in gaming or communications / sharing apps. For e…

Well yes, NAT might pose some additional constraints, but my main line of argument is that even in an alternative timeline where we never had the IPv4 address shortage and therefore no pressure to develop NAT because every device can be assigned its own address just as is possible now with IPv6, we might still have ended up with default-deny-inbound firewalls for home networks anyway, because it might have turned out…

Yes. Default-deny-inbound firewalls are much better than NAT because they are meant to provide security, can be managed (the "default"), and don't prevent deployment of new protocols. Also we might have a standard way to manage the firewall policy in this alternative future (upnp was done outside the IETF, and is a tire fire, because IETF rejected NAT).

But also the whole posture of a home network and consumer os might have been different without NAT, maybe the host based firewall would have won out, who knows. In the alternative universes we can't assume other things remain the same.

Re: How does Windows decide whether your computer has full Internet access?

#292

Two things I’ve always wanted to do is figure out how to cache windows updates on my local network without an enterprise windows install, and how to block windows updates by sinkholing domains and/or ip addresses (I work in IT security). Can anyone give any tips on either of these?

Look into WSUS / Windows Update Services

He said "without an enterprise install"

Re: How does Windows decide whether your computer has full Internet access?

#293
post #247

Earlier quoted context omitted.

Windows Terminal (despite the drama with its devs) is actually pretty good. PowerShell is excellent as a scripting language, and has deservedly been a huge influence on shells which have come after it. WSL is extremely frustrating because it has so many bugs and gotchas, but I'd say it's pretty popular with its intended audience.

> WSL is extremely frustrating because it has so many bugs and gotchas, but I'd say it's pretty popular with its intended audience. I understand why WSL2 is now just a HyperV'd Linux, but WSL1 is amazing despite its limitations. I'm honestly hoping that they re-consider deploying a properly-developed Unix personality again, but that ship has sailed.

> I'm honestly hoping that they re-consider deploying a properly-developed Unix personality again, but that ship has sailed.

Agreed. WSL1 was incredibly ambitious, and that alone made it exciting. And what it does manage to do, even in its unfinished state, is also impressive in its own right.

(FWIW, I actually had WSL2 in mind when I was talking about bugs. Switching to a VM-based approach solved some compatibility issues but WSL2 definitely still has problem.)

Re: How does Windows decide whether your computer has full Internet access?

#294

Earlier quoted context omitted.

You can mess around with that description to understand the reasoning. Why maintain code to duplicate functionality that is provided by the OS? Can I be more reliable than Microsoft?

> Can I be more reliable than Microsoft? Absolutely.

Unfortunatly the inverse is also true.

Re: How does Windows decide whether your computer has full Internet access?

#295
post #51

Unfortunately it's not that simple. On my system with bridges for hyper-v and wireguard tunnels, the NCSI service happily ignores my default route and tries to establish connectivity through one of the other devices when resuming from sleep. It wouldn't be that bad if it was just the status indicator, but several apps refuse to work properly if "internet" isn't detected. The workaround is to disable every other adapt…

Why not point NCSI to a host that's always reachable, like a local web server? There's a lot of configuration you can do to the connection check service that won't get your antivirus all anxious (i.e. https://www.ghacks.net/2014/02/07/disable-customize-windows-... )

I've tried all of those workarounds, unfortunately none of them worked for me for whatever reason.

Re: How does Windows decide whether your computer has full Internet access?

#296
post #51

Unfortunately it's not that simple. On my system with bridges for hyper-v and wireguard tunnels, the NCSI service happily ignores my default route and tries to establish connectivity through one of the other devices when resuming from sleep. It wouldn't be that bad if it was just the status indicator, but several apps refuse to work properly if "internet" isn't detected. The workaround is to disable every other adapt…

> I ended up binary patching the connection test service in memory to get it to always return true. Well, this escalated quickly. How is this executed? I would not know how to patch binaries in memory. Is this a common way to fix bugs under Windows so they have tools for that? I'm used to just have the source, so I can recompile if ever needed.

Although there's no source code, Microsoft's public debug symbol information makes it pretty easy to determine where certain functionality lies in most of their binaries. Then you overwrite the opcodes to get the desired functionality - the APIs are pretty simple, OpenProcess, WriteProcessMemory and you're done. The harder part is finding something to signature match or similar so that each time the DLL is re-compiled your patch doesn't break since the offsets have changed.

Re: How does Windows decide whether your computer has full Internet access?

#297

Earlier quoted context omitted.

One of the companies I was in actually blocked the entire MS Store through policy, but this results in most of Windows 10 going batshit insane (e.g. the Settings app will not even allow you to change keyboard layouts, because to retrieve language files it must go to the MS Store).

That reminds me of when they made it impossible to get rid of IE by making it a hard dependency of most of the rest of the OS. Why won't they get in as much trouble for this as they did for that?

What trouble ? (/sarcasm)

Re: How does Windows decide whether your computer has full Internet access?

#298

Earlier quoted context omitted.

Doing what? Blocking those domains?

I am similarly bewildered by everyone going along with it. I am not in on whatever cruel joke is being played on us. My best guess after turning my head 270 degrees, closing one eye, and squinting the other is that the noun is Microsoft/Windows, and the verb is running the ncsi daemon and having it fail the check.

There are people "going along with it"? I'm confused. When did blocking ever come up? Going along with what? Is this some movement?

Re: How does Windows decide whether your computer has full Internet access?

#299

Earlier quoted context omitted.

> but several apps refuse to work properly if "internet" isn't detected For me it's very bad code smell when the developers try to check some sort of a global flag ("has internet") instead of just perform the action (eg send http request) and fail gracefully

You can mess around with that description to understand the reasoning. Why maintain code to duplicate functionality that is provided by the OS? Can I be more reliable than Microsoft?

The OP isn't asking those developers to duplicate the functionality but to remove it. It's entirely pointless for most applications and only breaks things when there is something wrong with the connection check itself - you still need to handle connection errors in either case.

Re: How does Windows decide whether your computer has full Internet access?

#300

Earlier quoted context omitted.

Genuinely curious what Microsoft products people actually like? VS code might be the only one I’ve ever heard of.

I've just came up with two more: Solitaire and Minesweeper. People love this programs so much that MS added them to their dreaded Teams. Now you can have truly productive meetings! https://www.theverge.com/2022/11/16/23462041/microsoft-teams...

It's always fun to walk to a user's desktop and hit Win-G (Windows Xbox Game Bar)
Post reply on HN