OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: Chapter on May 05, 2021, 02:01:33 pm

Title: Captive portal not redirecting in version 21.1.5
Post by: Chapter on May 05, 2021, 02:01:33 pm
Goof afternoon,

I just installed OPNsense and I can't get the captive portal to work properly.

I have it assigned to my Guests interface; my phone gets a DHCP IP address but it is not redirected to the login page. If I enter the page opnsense_ip:8000 manually it is available

With my previous installation (pfSense) a notification appeared in the top bar and when clicked I was sent to the login page

Does anyone know how to solve or debug this?
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: hloiter on June 07, 2021, 01:16:53 pm
Has anyone a solution for this problem?
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: sorano on June 07, 2021, 02:55:05 pm
I did not notice any problems with this in 21.1.5 and currently its working good for me in 21.1.6.

Make sure that your DNS server properly resolves the configured hostname in your captive portal settings to the IP of your Captive Portal interface.

Also make sure that your certificate is valid if you use HTTPS else I've noticed that certain devices does not want to load the captive portal site.
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: hloiter on June 08, 2021, 07:13:28 am
Yes, HTTPS is the problem.

When i call a HTTP page, then the redirect to the Captive Portal is working, but when i call a HTTPS page i get an SSL error.

How can i solve this problem with a certificate?

Or is there any other solution like deliver the Captive Portal adress via DHCP?
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: sorano on June 08, 2021, 10:52:47 am
How can i solve this problem with a certificate?

I already told you:
Make sure that your certificate is valid if you use HTTPS.

Either buy a valid certificate or use Lets Emcrypt.
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: hloiter on June 13, 2021, 12:58:21 pm
OK,

have now a Let's Encrypt certificate for my OPNsense Web GUI up and running.

Now i have the problem that the Captive Portal on my WLAN_BYOD is not working and i have no internet access ...

Anyone an idea whart there is going on?
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: sorano on June 13, 2021, 02:29:28 pm
Anyone an idea whart there is going on?

PEBKAC is obviously what's going on  ;)
Title: Re: Captive portal not redirecting in version 21.1.5
Post by: hloiter on June 13, 2021, 04:45:04 pm
Anyone an idea whart there is going on?

PEBKAC is obviously what's going on  ;)

You're right - PEBKAC;)

In the end I got it working and I learned a lot .....

Title: Re: Captive portal not redirecting in version 21.1.5
Post by: sorano on June 14, 2021, 01:58:33 pm
You're right - PEBKAC;)

In the end I got it working and I learned a lot .....

Good job.
That's all that matters really :)