Closed Bug 2049252 Opened 3 months ago Closed 2 months ago

Move captive portal detection to new domain

Categories

(Cloud Services :: Operations: Miscellaneous, enhancement, P3)

enhancement

Tracking

(relnote-firefox 155+, firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
relnote-firefox --- 155+
firefox155 --- fixed

People

(Reporter: simonf, Assigned: valentin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

We want to enable HSTS preload for firefox.com (see bug 1551966) but since it hosts detectportal.firefox.com and the HSTS preload list requires includeSubdomains we cannot add it.

We need to decide on a URL. Some questions:

  1. Does the URL have to be popular to not get blocked?
  2. Should we have multiple URLs and fall backs?
  3. Should the URL change to not get blocked/redirected? Maybe, random subdomains?

I don't see a good reason for any of this but at least we have had weird issues like bug 2036862.

(In reply to Simon Friedberger [:simonf] from comment #0)

We want to enable HSTS preload for firefox.com (see bug 1551966) but since it hosts detectportal.firefox.com and the HSTS preload list requires includeSubdomains we cannot add it.

We need to decide on a URL. Some questions:

  1. Does the URL have to be popular to not get blocked?

I don't think so.

  1. Should we have multiple URLs and fall backs?

That's probably overkill. If a network blocks one captive portal domain, it would probably block all of the ones we have.

  1. Should the URL change to not get blocked/redirected? Maybe, random subdomains?
    I don't see a good reason for any of this but at least we have had weird issues like bug 2036862.

I would argue that no. Blocking random subdomains is trivial.
If a network does this by mistake (like it seems to happen in bug 2036862) the best course of action would be to contact them and request they fix their network, rather than trying to bypass a broken behaviour. But hopefully bug 1898891 will mitigate the issue.

See Also: → 1898891
Severity: -- → N/A
Priority: -- → P3
Whiteboard: [necko-triaged]
Component: Networking → Operations: Miscellaneous
Product: Core → Cloud Services
See Also: → 2038027

Once someone has picked a domain (not it!) it can be added to our existing captive portal infra easily. If you need to purchase a new domain, please file a ticket in https://mozilla-hub.atlassian.net/browse/IO (and don't mention the domain in public tickets, people snap them up before us when that happens). If you need help adding the new domain to the captive portal, please ask for assistance in Slack #mozcloud-support or file a ticket in https://mozilla-hub.atlassian.net/jira/software/c/projects/SREIN/form/1344

New domain seems to have been purchased. Can you add it to the captive portal endpoints, Jon?

Flags: needinfo?(jbuckley)
Depends on: 1898891
Blocks: 2055787

My PR has been merged and the service is now active:

% curl -v http://firefox-portal-detection.com 
* Host firefox-portal-detection.com:80 was resolved.
* IPv6: 2a04:4e42::347, 2a04:4e42:600::347, 2a04:4e42:400::347, 2a04:4e42:200::347
* IPv4: 151.101.129.91, 151.101.1.91, 151.101.193.91, 151.101.65.91
*   Trying 151.101.129.91:80...
* Connected to firefox-portal-detection.com (151.101.129.91) port 80
> GET / HTTP/1.1
> Host: firefox-portal-detection.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
< Connection: close
< Content-Length: 8
< Server: Varnish
< Retry-After: 0
< Content-Type: text/plain
< Accept-Ranges: bytes
< Date: Sat, 18 Jul 2026 16:20:39 GMT
< Via: 1.1 varnish
< X-Served-By: cache-yyz4525-YYZ
< X-Cache: MISS
< X-Cache-Hits: 0
< X-Timer: S1784391639.258305,VS0,VE0
< Cache-Control: public, must-revalidate, max-age=0, s-maxage=3600
< 
success
* Closing connection
Flags: needinfo?(jbuckley)
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Pushed by valentin.gosu@gmail.com: https://github.com/mozilla-firefox/firefox/commit/0c0064798418 https://hg.mozilla.org/integration/autoland/rev/b99f279dd439 Move captive portal detection to new domain (firefox-portal-detection.com) r=necko-reviewers,jesup
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
Regressions: 2062536

Release Note Request (optional, but appreciated)
[Why is this notable]: Domain historically used for captive portal detection has been changed to firefox-portal-detection.com
[Affects Firefox for Android]: Yes. While on Android the Operating System is in charge of captive portal detection, we also use this domain to check connectivity (IPv4, IPv6, DNS).
[Suggested wording]: Firefox now uses firefox-portal-detection.com instead of detectportal.firefox.com to detect captive portals and check network connectivity, so network allowlists referencing the old domain need updating.
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?

Added to the Fx155 relnotes.

Valentin, could you add a patch which adds the new URL on https://firefox-source-docs.mozilla.org/networking/captive_portals.html as well?

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(valentin.gosu)

FWIW, Martin (:mt) ran into an issue on the Adobe corporate office's guest-wifi-network that might have been caused by us using this new domain. See bug 2036862 comment 10 through bug 2036862 comment 17 (and perhaps more comments afterwards, if more are added).

(Superficially, it seems likely that this particular Adobe corporate guest-network is redirecting firefox-portal-detection.com to an error page, while letting the rest of the internet largely work just fine. I don't think we know right now whether the old detectportal.firefox.com/canonical.html URL would have hit the same issue or not; but it's possible they have a broad allow-list of sites that lets *.firefox.com resolve just fine, but rejects our brand-new firefox-portal-detection.com domain as unrecognized/untrustworthy.)

Aside: It's great that we finally managed to change the domain and that we updated the SUMO articles. But I think this should have been in our release notes as well.

(In reply to Frederik Braun [:freddy] from comment #16)

But I think this should have been in our release notes as well.

it is
Firefox now uses firefox-portal-detection.com instead of detectportal.firefox.com to detect captive portals and check network connectivity, so network allowlists referencing the old domain need updating.

https://www.firefox.com/en-US/firefox/155.0beta/releasenotes/

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: