@jenskiebee said in will not appear the sign-in webpage on IOS:
think
I use the pfSense captive portal for a hotel.
I do not instruct people - hotel clients -how to connect - I give very few information.
I presume they all know that hotels have captive portals. That is, no one even knows its a captive portal. It's just a wifi network called "MyHotelWifi", so people connect (think about it : they are actually that stupid .... )
I do not know what device they use, it could be the latest iPhone Pro 13, the green version, or some ancient Welcome device from Amazon. A PC with any OS, a tablet ? I don't care.
All these devices, as they are all 'portal aware', do the same thing : upon connection to the portal network, mostly Wifi, but it works just fine with a wired connection, the device should use the very default DHCP negotiation.
If the device is suing static IP settings, it's game over. The portal won't work, as does classic networking most probably (that is, it could work, but settings must be right).
When the network layer is set up, the magic happens.
This magic is part of the device, the OS used. A captive portal is not a pfSense thing, it's supported and handled by the device the client uses ( !! )
After the DHCP sequence, you can see what the device (my iPhone) does :
( Status > System Logs > System > GUI Service )
03-21-2022 08:50:51 Local5.Info pfsense 1 2022-03-21T08:50:52.000000+01:00 pfsense.local.net nginx - - - 192.168.2.222 - - [21/Mar/2022:08:50:52 +0100] "GET /index.php?zone=cpzone1&redirurl=http%3A%2F%2Fcaptive.apple.com%2Fhotspot-detect.html HTTP/1.0" 200 1641 "-" "CaptiveNetworkSupport-428.0.0.0.1 wispr"
You can see the encoded
http://captive.apple.com/hotspot-detect.html
because I'm using a captive portal, the http (port 80) traffic gets redirected the captive portal web server (nginx) of pfSense, which runs on port (my case) 8002.
This will not return the expected word 'Success".
This means user interaction is needed, as their might be a captive portal.
No web browser was open at my iPhone, so the iPhone will launch a stripped down Safari instance, and repeats the URL.
Now the login page shows on my screen, as by magic.
Keep in mind : it is not the captive portal web server that pushes this info the the users device.
It's just a classic http url that got redirected to another url.
Because http accepts redirects, the OS follows the redirections, and shows the page.
You know : this will not work with https requests, as your browser will refuse redirects to other urls (that is, you browser will redirect, and also retrieve a certificate. This certificate should contain the domain name of the url).
I am using the https version of pfSense captive portal. This works because the initial http:// got redirected to a https:// page. This https:// is the local captive portal login page.
After successful login, the pfsense captive portal takes the "&redirurl" argument, which should contain the original url, and redirect (again) to it. The portal firewall is now open for this device, the initially request page shows up.
If the captive portal doesn't seem to work, look at troubleshooting Captive Portal.
On the pfSense side, there is one thing that should work perfectly well. It's the same thing that most admins think they understand well. Its the same thing that they "break" : DNS.
The default pfSense DNS settings will do just fine.