Http://nmcheck.gnome.org/check_network_status.txt returns 302

I have some software that does a status check on http://nmcheck.gnome.org/check_network_status.txt to check whether or not it’s connected to a network with a captive portal.
It just started returning a 302 last night.
This seems like it would affect every linux machine packaged with gnome and network manager, am I missing something?
Doesn’t network manager check it’s internet status using that URL, specifically http so it re-directs when connected to a captive portal?
Below is the response headers + status code

code 302, headers: HeadersList {
      [Symbol(headers map)]: Map(3) {
          'content-length' => { name: 'content-length', value: '0' },
              'location' => {
              name: 'location',
              value: 'https://nmcheck.gnome.org/check_network_status.txt'
          },
          'cache-control' => { name: 'cache-control', value: 'no-cache' }
      },
    [Symbol(headers map sorted)]: null
}

I’m not sure, but I don’t see much of the URL being used from a quick search in debian code search.

https://codesearch.debian.net/search?q=check_network_status.txt

Change http to https in your config?

Have you confirmed network manager can’t handle the HTTP redirect? If so I suggest to move your topic to the Infrastructure category.

I suppose with the recent migration to AWS maybe — intentionally or not — the subdomain is now also defaulting to https. I suppose that’s a good thing but if using it with software that can’t handle a HTTP redirect it needs a config change on the client side to use https instead of http.

It’s more of an environmental factor, some captive portals redirect with invalid certificates, meaning HTTPS is not an option. Thats why you’ll see chrome (Network Portal Detection) and apple use http instead of https.

sorry meant to reply to you

No problem. I tried it with network manager and after a nmcli general reload get this in the journal:

NetworkManager[1179]: [1730818808.3373] connectivity: use of HTTPS for connectivity checking is not reliable and is discouraged (URI: https://nmcheck.gnome.org/check_network_status.txt)

So you’re right, the check shouldn’t be using https.

Awesome, thanks for confirming!

I moved the topic to infrastructure per your suggestion.
I got a call from my boss this morning that our 1k+ machines were offline, I about pooped my pants. :rofl: I’m working on removing our dependency of that site, but at least wanted to flag it since it seemed like it would affect other systems.

1 Like

Should be fixed by now, thanks for reporting this!

3 Likes
$ while [ 1 ]; do curl -s -L -I http://nmcheck.gnome.org/check_network_status.txt | head -1; done
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
^C
1 Like

Thank you! Life saver!