Navigation

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

    Issue on Squid + Squidguard + Captive Portal

    Cache/Proxy
    3
    6
    1539
    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.
    • S
      serangku last edited by

      Its fresh install with latest pfsense 2.3.1_1.
      Run fine with Squid + Squidguard on Transparent Mode, its can acces http or https site.
      Issue come up when activate Captive Portal, its can acces https site but failed to access http site.
      When disable CP, its work fine again. Or when disable squid + squidguard, its work again.
      Its like CP not like with Squid Package.
      Is it normal behaviour ? Anyone have this experience ?
      Thanks for respond.

      1 Reply Last reply Reply Quote 0
      • K
        kenmark last edited by

        Ia m experiencing same problem as yours. when i turn off squidguard it still filters some of the pages i want to browse. it only works if they are both turned off. my problem isn't only on my captive portal it also affets my LAN

        1 Reply Last reply Reply Quote 0
        • R
          rlrobs last edited by

          Use this code on check_ip.php (replace code)

          Note: After replace code, edit captive portal and squid configuration. Click Save.

          
          #!/usr/local/bin/php-cgi -q
          if(!defined(STDIN)){
             define("STDIN", fopen("php://stdin", "r"));
          }
          if(!defined(STDOUT)){
             define("STDOUT", fopen("php://stdout", "r"));
          }
          
          while (!feof(STDIN)) {
          
          $check_ip = trim(fgets(STDIN));
          $dbs = glob("/var/db/captiveportal*.db");
          
          foreach($dbs as $db){
             if(!strpos($db, "_radius")){
                $status = check_ip($db, $check_ip);
                break;   
             }   
          }
          if(isset($status)){
             fwrite(STDOUT, "OK user={$status}\n");
          }
          else{
             fwrite(STDOUT, "ERR\n");
          }
          
          } // end While
          
          function check_ip($db, $check_ip){
             exec("sqlite3 {$db} \"SELECT ip FROM captiveportal WHERE ip='{$check_ip}'\"", $ip);
             if($check_ip == $ip[0]){
                exec("sqlite3 {$db} \"SELECT username FROM captiveportal WHERE ip='{$check_ip}'\"", $user);
                return $user[0];
             }
          }
          
          ?>
          
          

          https://forum.pfsense.org/index.php?topic=111670.0

          1 Reply Last reply Reply Quote 0
          • S
            serangku last edited by

            thanks for feedback …
            ill try it soon

            is pfsense dev know about this bug/issue ?

            1 Reply Last reply Reply Quote 0
            • R
              rlrobs last edited by

              I don't know

              1 Reply Last reply Reply Quote 0
              • S
                serangku last edited by

                Ahh … still get issue ...
                i use external radius here

                meanwhile i disable transparent squid + squidguard since its still broke with cp
                i hope the dev have solid fix this issue soon

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post