Redirection issue

  • Hi everyone!
    I set up the captive portal in the latest pfSense (2.4.5) and I could swear the redirection after acceptance of the rules (no authentication) was working earlier (2.4.4).
    Now Windows clients get redirected to, other clients to other pages. DNS is pointed to OpenDNS, but that was always like that.
    Any idea why it does not redirect to the set page , but to msn instead?
    Also tested with a Xiaomi phone, which just shows upon connection a white page saying “You are connected”.
    Any ideas of whats going on? What could be the problem?
    To illustrate the issue, I made a short video.
    In a pfSense group on Facebook, another user confirmed having the same issue lately.
    Thank you!

  • Hi,

    2.4.5, compared to 2.4.4-p3 doesn't includes much news, but ...

    Look here - the second commit from the top : "Only redirects the user to the default page if no specific page..…"
    Which means to me : user will get redirected to the URL if one was present on the initial browser request.

    This commit has been applied :

    which basicly tests if a redirurl parameter is present in the browser's request URL . And if so, your redirected to there.

    Or, the description of "After authentication Redirection URL" is

    Set a forced redirection URL. Clients will be redirected to this URL instead of the one they initially tried to access after they've authenticated.

    At a first glance, this looks not good / conflictual.

    I use the old way :

    if (!empty($cpcfg['redirurl'])) {
    	$redirurl = $cpcfg['redirurl'];
    } elseif (preg_match("/redirurl=(.*)/", $orig_request, $matches)) {
    	$redirurl = urldecode($matches[1]);
    } elseif ($_REQUEST['redirurl']) {
    	$redirurl = $_REQUEST['redirurl'];

    $cpcfg['redirurl'] is the ""After authentication Redirection URL" setting.
    If one exists, the user is redirected there.

    I'll look into this after the weekend.

    Btw : thanks for the URL you used for the Blocked MAC settings 👍 .

    @defender110 said in Redirection issue:

    hite page saying “You are connected”.

    This happens when you visit the captive portal again,, after 'login' using a direct URL like

    Something else : you are aware of the “You are connected” that exists since 2.4.4-p1 - and isn't resolved yet in 2.4.5 ?
    basicly, when you edit portal settings while users are connected, they stay in the "connected user database" but their firewall rules are wiped.
    Simple solution : do not edit portal settings while users are connected. And if you have to, disconnect all users from the portal.
    Other solution : there is a patch that resolves this issue - I'm using it for the last 6 months now.

  • Hello, I'm running into the same issue, my after auth URL is no longer being used when I test on 2.4.5.

    We used this to redirect to a specific page per firewall to record wireless usage stats, but now we are not getting any stats.


  • Look at the other very recent thread in this forum (captive portal) about the issue, and a 'solution'.

  • @Gertjan can you provide me with the link to this? Thanks in advance!

  • No ;)

    An image : the other Redirection issue - 2 inch lower :


Log in to reply