Issue on Squid + Squidguard + Captive Portal



  • 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.



  • 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



  • 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



  • thanks for feedback …
    ill try it soon

    is pfsense dev know about this bug/issue ?



  • I don't know



  • 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


Log in to reply