Wireless Access

 View Only
last person joined: 13 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Apple iOS devices not open Captive Portal Login Page automatically

This thread has been viewed 83 times
  • 1.  Apple iOS devices not open Captive Portal Login Page automatically

    Posted Jul 20, 2022 04:55 PM
    Hi Guys!

    We would like to implement a guest Captive Portal solution with UAP policy. (with internal custom login page)

    I made configurations based on User Guide, solutions works fine on Windows and Android devices (Login Page automatically opens or device alerts user to tap to open page). Apple devices can connect also, but no alert displayed to open Login Page. If a user opens a Safari browser and try to go to any webpage, it redirected to Login Page, but we need this to work automatically.

    I made a second guest WLAN with absolute same settings, but default template Captive Portal Login Page was used. If an Apple device connects to the second SSID, Aruba login page is opened automatically.

    Based on this experience, I suspect that there might be a problem with the html code of the custom page?

    AOS 8.6.0.18

    Some outputs:

    (wlc01) [mynode] #show aaa authentication captive-portal aguest_cppm_prof
    
    Captive Portal Authentication Profile "aguest_cppm_prof"
    --------------------------------------------------------
    Parameter                                          Value
    ---------                                          -----
    Default Role                                       guest
    Default Guest Role                                 guest
    Server Group                                       default
    Redirect Pause                                     10 sec
    User Login                                         Disabled
    Guest Login                                        Disabled
    Logout popup window                                Disabled
    Use HTTP for authentication                        Disabled
    Logon wait minimum wait                            5 sec
    Logon wait maximum wait                            10 sec
    logon wait CPU utilization threshold               60 %
    Max Authentication failures                        0
    Show FQDN                                          Disabled
    Authentication Protocol                            PAP
    Login page                                         /upload/custom/aguest_cppm_prof/aguest.html
    Welcome page                                       /auth/welcome.html
    Show Welcome Page                                  No
    Add switch IP address in the redirection URL       Disabled
    Adding user vlan in redirection URL                Disabled
    Adding AP's MAC address in redirection URL         Disabled
    Add a controller interface in the redirection URL  N/A
    Allow only one active user session                 Disabled
    White List                                         N/A
    Black List                                         N/A
    Show the acceptable use policy page                Enabled
    User idle timeout                                  N/A
    Redirect URL                                       https://company.com
    Bypass Apple Captive Network Assistant             Disabled
    URL Hash Key                                       N/A
    (wlc01) [mynode] #
    ​

    (wlc01) [mynode] #show references aaa authentication captive-portal aguest_cppm_prof
    
    References to Captive Portal Authentication Profile "aguest_cppm_prof"
    ----------------------------------------------------------------------
    Referrer                                           Count
    --------                                           -----
    /sc:user-role "aguest-guest-logon" captive-portal  1
    (wlc01) [mynode] #
    


    Thanks!



  • 2.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    EMPLOYEE
    Posted Jul 22, 2022 04:46 AM
    In my experience this may happen if you didn't put in a proper trusted HTTPS certificate for your captive portal.

    Apple appears to prevent the popup if the captive portal certificate is not trusted.

    ------------------------------
    Herman Robers
    ------------------------
    If you have urgent issues, always contact your Aruba partner, distributor, or Aruba TAC Support. Check https://www.arubanetworks.com/support-services/contact-support/ for how to contact Aruba TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or Aruba Networks.

    In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
    ------------------------------



  • 3.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Nov 09, 2022 03:46 PM

    I have recently been battling with iOS devices and Captive portal, and I would like to share my observations, findings.

    Herman is correct, it is an Apple iOS requirement, that the Captive portal must be HTTPS and a trusted Certificate.

    However, I too had an issue, where Android, and Computers would get the captive portal prompt, but not iOS.

    I had another captive portal working, and but this new captive just wouldn't work with iOS.
    I embedded the image into the HTML using base64. The image of the portal that worked, was initially resized to 400x400px.
    This new portal image I forgot to resize, and was an 1200x1200px PNG, making it around 700KB.
    I happened to have both the working and non-working HTML files in the same directory and noticed the difference in size.
    I resized and redeployed my HTML and now it works for iOS! I can find no documentation with Apple to explain this, but it is very reproducible.
    I discovered, quite by accident, that the size of the captive portal HTML has to be less than ~128KB or and iOS device will not detect/display the captive portal!

    An important fact about iOS WiFi handling of Captive Portal:
    When an iOS device initially connects to a WiFi and detects Captive Portal, the option Auto-Login is added when WiFi profile created.
    This option is what allows the iOS device to detect and display the Captive Portal, for login.

    Here is a problem I've discovered, regarding Auto-Login, and extended authenticated session times.
    I deployed a Public Guest WiFi with captive portal. In ClearPass I configured a Service-Enforcement Policy that to set the MAC Caching, and to track the Session ID, in the Endpoint Profile.
    The iOS devices connects, the Captive Portal is displayed, the user accepts the terms, then ClearPass sets the Role to allow Internet access, and all is good.

    My ClearPass Policy is designed to ensure the endpoint has Internet as long as the device maintains connection. Only unless the MAC cache expires, and the session ID changes, will a Captive Portal be displayed, to the endpoint.

    This is problem I'm running up against. If iOS is continuously connected, without a lapse in Internet access, for an extended period of time, the Auto-Login option is removed from the iOS WiFi profile.

    There is no way to get the Auto-Login option back except to forget and rejoin the WiFi with the captive portal.

    In testing, the only way I've been able to ensure the option doesn't disappear is to force a captive portal every 4 hours. I've not established exactly what the time frame is, or if there are other mitigating conditions.

    I've read many posts, in many forums, and the go to response to resolving the captive portal not displaying is: "Forget This Network."
    I would venture to guess that most of these connection problems are due to the Auto-Login disappearing.

    Another discovery, I updated the iOS while connected to, and authenticated to WiFi with a captive portal. The device rebooted, and when I looked at the iOS WiFi connection profile, Auto-Login had been removed. I assume because the WiFi session still had Internet Access.

    One more discovery, regarding iOS and captive portal.
    Apple looks for DHCP option 114, which I've setup, and that doesn't stop iOS from removing Auto-Login.
    I setup a packet capture using:

    packet-capture-defaults destination ip-address <dest-IP>
    packet-capture-defaults datapath mac <iOS_MAC_addr> decrypted

    I discovered that the iOS requests DNS resource records 'A' and 'HTTPS' for the captive port DNS name.
    I find the HTTPS RR request interesting, since it is still a IETF draft and Not yet an official RFC.

    From what I can tell, this has been a problem since the Apple implemented WiFi Auto-Join circa 2013.
    I'm not going to say Apple's captive portal handling is broke, but there is a serious flaw, when it comes to long term use.

    Hopefully my findings and musings will help others struggling with iOS and Captive Portal.




  • 4.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Nov 14, 2022 12:34 PM
    We had captive.apple.com whitelisted for years to make captive portals work, then they suddenly stopped working last week, in troubleshooting we removed captive.apple.com from the whitelist and it started working again, thinking maybe they made a change to how iOS handles captive portals.


  • 5.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    EMPLOYEE
    Posted Jan 16, 2023 09:56 AM
    Have you seen this - https://developer.apple.com/forums/thread/715416
    Seems that Apple changes the behaviour with iOS16
    even when you provide an internal DNS Server iOS uses the external for Address Resolution. And External does not know anything about your Captive Portal solution. So the Authentication fails.
    Even with the correct Certificate installed. Only solution I found was an DNS redirect by the Firewall to internal DNS or have public DNS Record for your Guest Solution, which is very unlikly.


  • 6.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Feb 13, 2023 12:02 PM

    @Herman Robers  and @cordless 

    I´m dealing also with the issue that "no automatically redirection to the HTTPS hosted captive-portal happens" and when I try to reach out to the internet manually a "certificate warning" pops up! 
    In my case, I´ve a public signed certificate for the captive-portal and as well the unlikley solution of a private IP-Address as a DNS A Record set on the public Domain-Servers! I´m using an iPhone with Firmware Version 16.3 and all installed browsers are affected... no clue what the cause of the reason is but it`s very annoying what Apple is doing here, because till yet I did`nt find a useful post nor solution on their online sources :(




  • 7.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Feb 13, 2023 09:29 PM

    I've found that if you allow the Aruba Controller to setup the captive portal Role, ACLs, etc, and your certificate is setup correctly, the controller does a great job of injecting the captive portal in the middle of everything.

    It does help to make sure DHCP option 114 is setup with the FQDN to your captive portal.  Also, the URL, in the option 114 must match the certificate name.

    Per my earlier post: "An important fact about iOS WiFi handling of Captive Portal:
    When an iOS device initially connects to a WiFi and detects Captive Portal, the option Auto-Login is added when WiFi profile created.
    This option is what allows the iOS device to detect and display the Captive Portal, for login."
    I've found that the the Auto-Login will mysteriously disappear from the iOS WiFi.  The only way to fix it is to forget and reconnect.




  • 8.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Feb 14, 2023 02:36 AM

    @devocite I`ve to apologize but I didn't read your first post completely... THANK YOU, it`s a great job you did, in troubleshooting that weird behavior of the iOS devices! When you talk about the "Auto-Login" in the WiFi profile you mean the iOS device?! I´ve tried it out and deleted/ignored the SSID /w captive-portal on my device and when I connected back - voilà - the connectivity check to captive.apple.com takes place and after that immediatly my captive-portal page pops up with no further problems!

    so it looks like the cause of the problem in my case is as well ==  If iOS is continuously connected, without a lapse in Internet access, for an extended period of time, the Auto-Login option is removed from the iOS WiFi profile. 

    If my understanding is correct, you´ve found/build a workaround which could obviate that from happening in ...the only way I've been able to ensure the option doesn't disappear is to force a captive portal every 4 hours. my I ask you what you exactly mean with that and what you´ve changed in the Clearpass settings?




  • 9.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    Posted Feb 14, 2023 03:49 AM

    @danW I understand not reading my entire post, it is long and full of caveats.  Honestly, the fact we have all spent countless days and hours on this subject is a bit sad, and the problems isn't with Aruba!

    Let me qualify that my iOS workaround, I don't feel is a real solution.

    Once you accept the captive portal, on iOS, and allow Internet access, the chance that the 'auto-login' option will auto-magicly disappear starts.  I found that if I force the session to expire, every 4 hours, triggering a new captive portal, this seems to reduce the change that the iOS 'auto-login' will disappear.  This isn't much of a solution, and in reality, would anger users if they have to reauthorize several times a day!

    Regardless, if you reboot your iOS device, and it reconnects without having to accept the captive portal, there is still a chance that the 'auto-login' option will disappear.  If your iOS device updates the OS while authorized, there seems to be a 100% chance the 'auto-login' option will disappear.

    As you've now figured out, the pattern to this issue with iOS, and only long-term solution is to forget the Wi-Fi connection and reconnect.




  • 10.  RE: Apple iOS devices not open Captive Portal Login Page automatically

    EMPLOYEE
    Posted Feb 14, 2023 02:48 AM

    Aplle surprises Infrastructure vendor with non documented Change of Behaviour. The workaround that worked for my Customer was the one with the redirect of DNS by the Firewall. As far as I understand thet there is a bug report opened at Apple. Not sure if that brings a better solution.