@vanlier said in Captive portal shows blank page:
Here is the situation before activating captive portal:
clients connect to wifi
they get a 192.168.50.x ip address from dhcp with dns 192.168.50.254
they can browse the internet (dns resolution and internet access are working)
Important test ! Good to know.
@vanlier said in Captive portal shows blank page:
Here is the situation after activating captive portal:
clients connect to wifi
they get a 192.168.50.x ip address from dhcp with dns 192.168.50.254
nothing happens
Using the 'default' build in login page, right ?
You can't say that 'nothing happens' : you can't 'see it', but something happened.
Every OS on planet earth will throw out a http:// request as soon as it obtained a DHCP lease.
Check here : Status > System Logs > System > GUI Service
Every OS using it own http request.
For my iPhone it's :
7e36196f-217b-4a17-9877-daf6a1b8770f-image.png
This is the page that it want to download :
http%3A%2F%2Fcaptive.apple.com%2Fhotspot-detect.html
Better known as :
http://captive.apple.com/hotspot-detect.html
Click on it and you'll see what happens.
You should see this :
001ff859-b0db-45f1-9b9e-0bc6908dd1b0-image.png
If the html page doesn't contain "Success" then the device start to presume a captive portal is might be present.
Now, the OS launches a stripped down web browser, bot the full fledged IE, Chrome, Edge, Firefox, but a small bare bone browser. It's launched with the same web destination : http://captive.apple.com/hotspot-detect.html
First, again, "captive.apple.com" will get resolved (was already found during the same test, some ms before).
Then the browser connects to the IP on port 80 (remember : http), and asks for the page /hotspot-detect.html
On the pfSense side, this "some destination IP : port 80 " request gets redirected to the internal login portal web page server on port 800x" with the help if a firewall rule (pfSense 2.6.0 : ipfw rules - the newer pfSense uses pf now).
The portal page web browser does just one thing : it redirect the requesting browser to
(your case) http://192.168.50.254/index.php?zone.....
2f7a3e58-2899-4c32-9b94-f94427ceeef0-image.png
It also adds a 'zone' parameter, and 'redirect' parameter.
The result will be of course : the captive portal login page shows up.
So : to make this work, one thing needs to work for sure : DNS.
The captive portal firewall rule works, that is for sure. If not, Netgate and FreeBSD will go out of business tomorrow.
[https://docs.netgate.com/pfsense/en/latest/troubleshooting/captiveportal.html](link url)
Btw : you already know that the 'default' pfSense 2.6.0 needs portal patches, right ?
@vanlier said in Captive portal shows blank page:
Disable mac filtering
That's of if you want to 'break' things.
@vanlier said in Captive portal shows blank page:
Set various redirect urls
https://www.google.com works fine.
@vanlier said in Captive portal shows blank page:
add firewall rule allow any any on interface "guest"
The GUI firewall rues ? None is needed (I guess ?), the authentication will still work.
But as soon as authenticated, yoy can go no where.
Use the default LAN pass all TCPv4* rule to begin with.
@vanlier said in Captive portal shows blank page:
However when opening the same page with the pfsense ip in the guest subnet (http://192.168.50.254:8002
Invalid request.
The ?zone=xxxx parameters needs to be present.
These :
7e93c7cc-43b6-4993-b5b5-f95007ac3f26-image.png
don't work for you ?