Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captive Portal: No Splash Page Under iOS #8300

Closed
2 tasks done
aque opened this issue Feb 8, 2025 · 6 comments
Closed
2 tasks done

Captive Portal: No Splash Page Under iOS #8300

aque opened this issue Feb 8, 2025 · 6 comments
Assignees
Labels
cleanup Low impact changes
Milestone

Comments

@aque
Copy link
Contributor

aque commented Feb 8, 2025

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Captive portal under 25.1 does not display the splash page for iOS devices. This was tested with an iPhone running iOS 18.3 and it worked on version 24.7.12. tcpdump shows that iOS connects with TLSv1.2 which is disabled. OPNsense responds with Alert (Level: Fatal, Description: Protocol Version) to the TLS Client Hello.

Manually testing with TLSv1.3, the connection succeeds:

$ curl --tlsv1.3 --tls-max 1.3 --head https://gw.domain.tld:8000/index.html?redirurl=google.com
HTTP/2 200 
content-type: text/html
last-modified: Fri, 07 Feb 2025 02:59:37 GMT
content-length: 14113
cache-control: max-age=21600
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
date: Sat, 08 Feb 2025 18:54:24 GMT
server: OPNsense

The same connection fails with TLSv1.2:

$ curl --verbose --tlsv1.2 --tls-max 1.2 --head https://gw.domain.tld:8000/index.html?redirurl=google.com
*   Trying 192.168.16.1:8000...
* Connected to gw.domain.tld (192.168.16.1) port 8000 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.2 (IN), TLS alert, protocol version (582):
* OpenSSL/3.0.15: error:0A00042E:SSL routines::tlsv1 alert protocol version
* Closing connection 0
curl: (35) OpenSSL/3.0.15: error:0A00042E:SSL routines::tlsv1 alert protocol version

To Reproduce

Steps to reproduce the behavior:

  1. Connect an iPhone to a wireless network behind a captive portal.

Expected behavior

A splash page pop up upon joining the wireless network.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 25.1-amd64
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz
igb network driver

@aque aque changed the title Captive Portal: No Splash Page Uner iOS Captive Portal: No Splash Page Under iOS Feb 8, 2025
@AdSchellevis AdSchellevis added the support Community support label Feb 9, 2025
@AdSchellevis
Copy link
Member

could be caused by:

ssl.cipher-list = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"

The cipher-list option was deprecated (https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL), maybe in recent versions it has side affects (assuming you did not configure anything in "System: Trust: Settings").

Can you try to remove that line and restart captive portal? If that fixes your problem, it might be better if we stick to platform defaults in which case we can ditch cipher-list too.

@aque
Copy link
Contributor Author

aque commented Feb 9, 2025

All items under "System: Trust: Settings" are unchecked. I found the following under lighttpd Cipher Selection:

# DEFAULT: As of Jan 2025 with lighttpd 1.4.77:
#
# STRONGEST: As of Sep 2020, for use w/ modern clients only; not compat w/ older clients
#ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.3",
#                            "Options" => "-ServerPreference")

ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.2") is strongly recommended (and "TLSv1.3" if supported by clients) (note: prefer lighttpd defaults)

I kept ssl.cipher-list but added ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.2") based on that recommendation. This change fixed the issue.

@aque
Copy link
Contributor Author

aque commented Feb 9, 2025

I forgot to add that this works as well. It may be the one to use since this is closest to their defaults.

ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "TLSv1.2",
                            "Options" => "-ServerPreference")

@AdSchellevis AdSchellevis self-assigned this Feb 9, 2025
@AdSchellevis AdSchellevis added cleanup Low impact changes and removed support Community support labels Feb 9, 2025
@fichtner fichtner added this to the 25.7 milestone Feb 9, 2025
@fichtner
Copy link
Member

fichtner commented Feb 9, 2025

Thanks for debugging. For context: 25.1 ships with lighttpd 1.4.77 and they indeed changed the default MinProtocol as described. https://www.lighttpd.net/2025/1/10/1.4.77/

@aque
Copy link
Contributor Author

aque commented Feb 9, 2025

For some reason, this only affects iOS wireless joins. Launching Safari and manually going to http://captive.apple.com correctly displays the captive portal page. So Safari itself supports TLSv1.3 but wifi joins are locked to TLSv1.2.

@AdSchellevis
Copy link
Member

maybe we should just use the same defaults as the webgui in this case, I'll push a commit to change to that:

ssl.openssl.ssl-conf-cmd = (
"MinProtocol" => "TLSv1.2",
"Options" => "-ServerPreference",
"CipherString" => "EECDH+AESGCM:AES256+EECDH:CHACHA20:!SHA1:!SHA256:!SHA384"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

No branches or pull requests

3 participants