Landing Page doesn't redirect



  • For some reason when I hit the captive portal landing page, it does display, but if I hit accept it just re-displays the landing page.

    I have authentication turned off, so I thought they should be able to just hit accept and start browsing.  I really just want users to see the terms and conditions on the landing page and hit accept before being allowed to surf.


  • Netgate

    There is some attempt to redirect to the page originally requested by the user.  If the browser thinks it's trying to get to the landing page it will just go back there.  There is an after-authentication redirect url you can force in the portal config if you like.

    It's be nice to have some logic in the landing page display that checked if the user was already signed in and did something more intelligent than just display the page again.



  • Thanks for the feedback.  I tried adding a URL to the post authentication field but that didn't help.  Same problem.

    Also, I tried the following:

    1. Received Landing Page.
    2. Clicked Accept.
    3. Received Landing Page again.
    4. Tried manually entering another URL.
    5. Received Landing page again.

    It seems no matter what I do, I still get the landing page.



  • After the first 'Accept', the user is marked as logged-in on the Status->Captive portal page ?


  • Netgate

    Is the computer actually being authenticated? (Status > Captive Portal).

    Are you using custom html or the stock page?  If you're signing in with no login happening check that you're submitting all the right fields in the form.  Switch back to the stock page, get it working, then customize.



  • I am using a custom landing page.  All users are showing "unauthenticated".  I don't see anything listed showing any other status.

    I have attached a copy of my landing page.  I converted it to txt format instead of html to get the forums to allow me to upload it.

    [wifi-ext - Copy.txt](/public/imported_attachments/1/wifi-ext - Copy.txt)



  • As a side note I can surf fine without captive portal enabled.  I get a DHCP lease, and I can surf around the internet fine, but when I re-enable CP I just get the landing page.  So I assume the rest of my setup is perfectly fine.  I assume my issue is somehow with the landing page itself.


  • Netgate

    unauthenticated is what you will get unless the users are actually logging in with a username.

    If the IP/MAC address pair is listed in the Captive Portal, you should only be able to get at the portal page by directly going to http://interface_ip:8002/

    Squid or any other packages in the way?  Turn them off.

    I'm not going to look at your HTML.  Put it back to default, get it working, then customize.


  • Banned

    When all users show as unauthenticated, your custom CP code is broken. (And, even if it's just a click-through, they will be authenticated by the MAC address.)

    Try this instead of the button; button should not be used within forms.


  • Netgate

    When all users show as unauthenticated, your custom CP code is broken.

    That is how all users appear when the No Authentication mode is used.  Your custom page can just have them, for example, click a terms and conditions checkbox and press Access the Internet.

    It's a perfectly valid config but there's no login name to put with the CP entry so it uses unauthenticated.