OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Captive Portal problem 802.1q
« previous next »
  • Print
Pages: [1]

Author Topic: Captive Portal problem 802.1q  (Read 6451 times)

M@rch0n

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
Captive Portal problem 802.1q
« on: March 19, 2019, 12:32:25 pm »
Hello,

I need help, I believe this is a bug!

I have a scenario where I use wpad for my LAN and I have a GUEST for my clients and I need Captive Portal to register these users.

My firewall

WAN (em0) - 200.199.199.100
LAN (em1) - 192.168.0.1/24
GUEST (vlan100_em1) - 192.168.100.1/24

It happens that when I have the Web GUI in HTTP to provide the wpad to LAN clients the Captive Portal page does not automatically load in the 802.1q tagg interface. If I use the same configuration on the LAN page loads automatically and enables authentication, when the clients of the 802.1q tagg interface the page does not load automatically, it is necessary to enter the URL address to be able to authenticate.

If I change my Web GUI settings to HTTPS Captive Portal works fine for all interfaces, but LAN clients can not get the wpad information because of the certificate error that is not valid.

I thought that disabling the "Disable web GUI redirect rule" redirection in System> Settings> Administration would solve my problem, but not. When HTTP redirection is disabled, HTTP is disabled.

Anyone have any ideas for workaround?
Logged

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Captive Portal problem 802.1q
« Reply #1 on: March 19, 2019, 04:55:30 pm »
Quote
GUEST (vlan100_em1) - 192.168.100.1/24
I guess it is em1_vlan100  ;)

Quote
When HTTP redirection is disabled, HTTP is disabled.
That is right. With redirection, the web gui listens on 80 and 443. Every request to port 80 is redirected to 443. Without this redirect you have to use https:// to directly load web gui on port 443. Port 80 will be closed.

But wpad with https is a pain in the ass. You should deliver wpad.dat via plain old http.
Check this post how to set your web gui to https / alternate port and keep auto proxy config on port 80: https://forum.opnsense.org/index.php?topic=12026.0

I think the problem with captive portal is the fact, that more and more websites migrate to https, but I think the portal page is only triggered by a request on http. Did you try to open a plain http page? I think most browsers nowadays check for portal pages by calling URLs like http://www.msftncsi.com/ncsi.txt or http://clients3.google.com/generate_204, ...
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

M@rch0n

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
Re: Captive Portal problem 802.1q
« Reply #2 on: March 20, 2019, 12:55:52 pm »
Nginx's workaround worked perfectly, thanks for the tip!

Quote
I think the problem with captive portal is the fact, that more and more websites migrate to https, but I think the portal page is only triggered by a request on http.
In my case, the problem only occurs when Captive Portal over HTTP on an 802.1q tagg interface. In this scenario, the page to authenticate only loads if I enter the URL manually http: // ip_fw: 8000. However, if my firewall is working with HTTPS the page to authenticate is automatically loaded.

Quote
Did you try to open a plain http page?
Yes, the behavior is the same.

Logged

DahOne

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Captive Portal problem 802.1q
« Reply #3 on: April 22, 2019, 02:46:24 am »
I am experiencing the same issue, and my configuration is very similar.
only when a visit a website that uses http, like msftncsi.com am i redirected to the captive portal page. Every other page returns a "this site can't be reached" error.

Any guidance on how I can overcome this would be appreciated.
Logged

Jumpy71

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Captive Portal problem 802.1q
« Reply #4 on: May 14, 2022, 12:47:25 pm »
It'simply. If you want solution ask me. :)
Logged

lilsense

  • Hero Member
  • *****
  • Posts: 600
  • Karma: 19
    • View Profile
Re: Captive Portal problem 802.1q
« Reply #5 on: May 14, 2022, 12:50:36 pm »
On OPNSense you cannot have tagged and untagged on the same interface.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Captive Portal problem 802.1q
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2