Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Redirection of authenticated users

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      cdc1975
      last edited by

      Hi,

      i use pfsense 2.0 (pfSense-2.0-BETA1-2g-20100529-0228) as a captive portal.

      Everything works fine except the redirect after user authentication.

      I set up captive portal to redirect connections to http://www.google.it after authentication, but often after giving username and password correctly the page of the authentication remains.

      What could be the problem?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • C Offline
        cdc1975
        last edited by

        Other informations on the subject.

        When the users are authenticated (even if the redirection does not work) then they can browse properly.
        Also in the configuration i am using squid in transparent mode.

        Thanks in advance for any suggestions.

        1 Reply Last reply Reply Quote 0
        • E Offline
          eri--
          last edited by

          Try this patch see if it fixes problems for you
          diff –git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
          index 32c8853..55d5891 100755
          --- a/usr/local/captiveportal/index.php
          +++ b/usr/local/captiveportal/index.php
          @@ -478,6 +478,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
                          }

          include("{$g['varetc_path']}/captiveportal-logout.html");
          +              header("Location: {$my_redirurl}");

          } else {
                          if($_POST['ORIGINAL_PORTAL_IP'] && $_SERVER['SERVER_NAME'] != $_POST['ORIGINAL_PORTAL_IP']) {

          1 Reply Last reply Reply Quote 0
          • C Offline
            cdc1975
            last edited by

            Thank you.

            It seems to work.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.