Squid com autenticação integrada ao Captive Portal
-
Em breve começo os testes com o captive portal da 2.1
Acabei de subir o helper que integra a autenticação do captive portal com o squid.
A alteração na interface para o squid2 já está pronta mas vou deixar para publicar depois
Por enquanto:
No squid3, basta selecionar captive portal na aba authenticationNo squid2, inclua estas configurações no campo custom options
external_acl_type check_filter children=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php;acl dgfilter external check_filter;http_access allow dgfilter;
E baixe este arquivo
fetch -o /usr/pbi/squid-amd64/libexec/squid/check_ip.php https://raw.github.com/pfsense/pfsense-packages/master/config/squid3/33/check_ip.php ```![squid_captive_portal.png](/public/_imported_attachments_/1/squid_captive_portal.png) ![squid_captive_portal.png_thumb](/public/_imported_attachments_/1/squid_captive_portal.png_thumb)
-
Parabéns Marcello.
Uma pergunta.
Caso eu fizer esta configuração consigo utilizar tanto o squid autenticado (popup de usuario e senha do squid) como tambem o captive portal.
Exemplo.
Caso eu ir nas configuração de lan do navegador e informar o ip do proxy + porta irá aparecer a tela de login do proxy, caso não configurar ele irá aparecer a tela do captive portal?
Agradeço -
Com essa configuração, você autentica no captive portal somente.
O squid vai "puxar" o usuário da base do captive de forma transparente e automática.
-
1)salvei neste local com o nome do arquivo check_ip.php
/usr/pbi/squid-amd64/libexec/squid/check_ip.php#! / Usr / local / bin / php-q / * $ Id $ * / / * check_ip.php Copyright (C) 2013 Marcello Coutinho Todos os direitos reservados. A redistribuição eo uso nas formas de origem e binária, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas: 1\. As redistribuições do código fonte devem manter o aviso de copyright acima, esta lista de condições ea seguinte renúncia. 2\. As redistribuições em formato binário devem reproduzir o copyright acima aviso, esta lista de condições ea seguinte isenção de responsabilidade na documentação e / ou outros materiais fornecidos com a distribuição. ESTE SOFTWARE É FORNECIDO `` COMO ESTÁ'' E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, SEM LIMITAÇÃO, AS GARANTIAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO. EM NENHUM CASO DO AUTOR SERÁ RESPONSÁVEL POR QUAISQUER DANOS DIRETOS, INDIRETOS, ESPECIAIS, EXEMPLARES OU DANOS (INCLUINDO, SEM LIMITAÇÃO, A AQUISIÇÃO DE SUBSTITUIR PRODUTOS OU SERVIÇOS, PERDA DE USO, DADOS OU LUCROS OU NEGÓCIO INTERRUPÇÃO) CAUSADOS E EM QUALQUER TEORIA DE RESPONSABILIDADE, SEJA EM CONTRATO, RESPONSABILIDADE OBJETIVA OU DELITO (INCLUINDO NEGLIGÊNCIA OU NÃO) DECORRENTE DE QUALQUER FORMA DE USO DESTE SOFTWARE, MESMO QUE DA POSSIBILIDADE DE TAIS DANOS. * / / / Stdin laço if (! definida (STDIN)) { define ("STDIN", fopen ("php :/ / stdin", "r")); } if (! definida (STDOUT)) { define ("STDOUT", fopen ('php :/ / stdout', 'w')); } while (! feof (stdin)) { $ Linha = trim (fgets (STDIN)); / /% SRC $ Pf_version = substr (trim (file_get_contents ("/ etc / version")), 0,3); unset ($ cp_db); if ($ pf_version> 2,0) { $ Dir = "/ var / db"; $ Arquivo = scandir ($ dir); foreach ($ arquivos as $ arquivo) { if (preg_match ("/ cativo. * db /", $ arquivo)) { $ Dbhandle = sqlite_open ("arquivo $ dir / $", 0666, $ error); if ($ dbhandle) { $ Query = "SELECT * FROM captiveportal"; $ Result = sqlite_query ($ dbhandle, $ query); if ($ result) { $ Row = sqlite_fetch_array ($ resultado, SQLITE_ASSOC); $ Cp_db [] = implode ("", $ row); sqlite_close ($ dbhandle); } } } } } else { $ Filename = "/ var / db / captiveportal.db"; if (file_exists ($ filename)) $ Cp_db = file ($ filename); } $ Usuario = ""; / / 1376630450,2,172.16.3.65,00:50:56:9 c: 00: c7, admin, e1779ea20d0a11c7,,,,, if (is_array $ (cp_db)) { foreach ($ cp_db quanto $ CPL) { $ Fields = explode ("", $ CPL); if ($ fields [2]! = "" && $ fields [2] == $ line) $ Usuario = $ campos [4]; } } if ($ usuario! = "") $ RESPOSTA = "OK user = {$ usuario}"; outro $ RESPOSTA = "ERR"; fwrite (STDOUT, "{$ RESPOSTA} \ n"); unset ($ cp_db); } >
2)coloquei os comandos no squid
external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php
acl dgfilter external check_filter
http_access allow dgfilterquando coloco o comando, ele fica reiniciando o squid a todo momento, e o squidquad para.
qual os caminhos dos log que vc quer e como faço pra te enviar., estou usando o squdi3-dev 64 amd, desculpe minha falta de conhecimento.
-
Marcello,
imagine o seguinte cenario, squid com autenticacao transparente com ad…
Tem como eu habilitar o captive portal para usuarios fora do dominio realizar a autenticacao com esse script ?? -
@calebepereira@hotmail.com:
quando coloco o comando, ele fica reiniciando o squid a todo momento, e o squidquad para.
veja se copiou o conteúdo todo do arquivo, pelo menos no seu post, a última linha está errada.
Não esqueça de colocar permissão de execução no arquivo
chmod +x /usr/pbi/squid-amd64/libexec/squid/check_ip.phpe antes de reiniciar o squid, veja se o php está rodando sem erros
/usr/pbi/squid-amd64/libexec/squid/check_ip.php
-
imagine o seguinte cenario, squid com autenticacao transparente com ad…
Tem como eu habilitar o captive portal para usuarios fora do dominio realizar a autenticacao com esse script ??Poder pode, mas vai te dar trabalho definir/identificar quais são os ips das maquinas que não fazem parte do domínio.
-
Algum feedback da comunidade? Sucesso? Falha? Duvidas? ::)
-
desculpa a demora do retorno
mas o que que esta faltando na ultima linha do meu arquivo?
#! / Usr / local / bin / php-q / * $ Id $ * / / * check_ip.php Copyright (C) 2013 Marcello Coutinho Todos os direitos reservados. A redistribuição eo uso nas formas de origem e binária, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas: 1\. As redistribuições do código fonte devem manter o aviso de copyright acima, esta lista de condições ea seguinte renúncia. 2\. As redistribuições em formato binário devem reproduzir o copyright acima aviso, esta lista de condições ea seguinte isenção de responsabilidade na documentação e / ou outros materiais fornecidos com a distribuição. ESTE SOFTWARE É FORNECIDO `` COMO ESTÁ'' E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, SEM LIMITAÇÃO, AS GARANTIAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO. EM NENHUM CASO DO AUTOR SERÁ RESPONSÁVEL POR QUAISQUER DANOS DIRETOS, INDIRETOS, ESPECIAIS, EXEMPLARES OU DANOS (INCLUINDO, SEM LIMITAÇÃO, A AQUISIÇÃO DE SUBSTITUIR PRODUTOS OU SERVIÇOS, PERDA DE USO, DADOS OU LUCROS OU NEGÓCIO INTERRUPÇÃO) CAUSADOS E EM QUALQUER TEORIA DE RESPONSABILIDADE, SEJA EM CONTRATO, RESPONSABILIDADE OBJETIVA OU DELITO (INCLUINDO NEGLIGÊNCIA OU NÃO) DECORRENTE DE QUALQUER FORMA DE USO DESTE SOFTWARE, MESMO QUE DA POSSIBILIDADE DE TAIS DANOS. * / / / Stdin laço se ( ! definido ( STDIN )) { define ( "STDIN" , fopen ( "php :/ / stdin" , "r" )); } se ( ! definido ( STDOUT )) { define ( "STDOUT" , fopen ( 'php :/ / stdout' , 'w' )); } enquanto ( ! feof ( STDIN )) { $ Line = guarnição ( fgets ( STDIN )); / /% SRC $ Pf_version = substr ( guarnição ( file_get_contents ( "/ etc / version" )), 0 , 3 ); unset ( $ cp_db ); se ( $ pf_version > 2,0 ) { $ Dir = "/ var / db" ; $ Arquivos = scandir ( $ dir ); foreach ( $ files as $ file ) { se ( preg_match ( "/ cativo. * db /" , $ arquivo )) { $ Dbhandle = sqlite_open ( " $ dir / $ arquivo " , 0666 , $ error ); se ( $ dbhandle ) { $ Query = "SELECT * FROM captiveportal" ; $ Result = sqlite_query ( $ dbhandle , $ query ); se ( $ result ) { $ Row = sqlite_fetch_array ( $ resultado , SQLITE_ASSOC ); $ Cp_db [] = implode ( "" , $ row ); sqlite_close ( $ dbhandle ); } } } } } mais { $ Filename = "/ var / db / captiveportal.db" ; se ( file_exists ( $ filename )) $ Cp_db = file ( $ filename ); } $ Usuario = "" ; / / 1376630450,2,172.16.3.65,00:50:56:9 c: 00: c7, admin, e1779ea20d0a11c7,,,,, se ( is_array ( $ cp_db )) { foreach ( $ cp_db quanto $ CPL ) { $ Fields = explode ( "" , $ CPL ); se ( $ fields [ 2 ] ! = "" && $ campos [ 2 ] == $ line ) $ Usuario = $ campos [ 4 ]; } } se ( $ usuario ! = "" ) $ RESPOSTA = "OK user = { $ usuario } " ; outro $ RESPOSTA = "ERR" ; fwrite ( STDOUT , ??" { $ RESPOSTA } \ n " ); unset ( $ cp_db ); } >
dei permissão total no arquivo e reiniciei o pfsense, não roda.
$ ls -l /usr/pbi/squid-amd64/libexec/squid/check_ip.php
-rwxrwxrwx 1 root wheel 3162 Sep 23 16:48 /usr/pbi/squid-amd64/libexec/squid/check_ip.phpquando mando rodar fala o seguinte:
$ /usr/pbi/squid-amd64/libexec/squid/check_ip.php
/usr/pbi/squid-amd64/libexec/squid/check_ip.php: Permission deniedcomo faço pra subir o PHP?
me ajuda que eu sou bem leigo,
-
@calebepereira@hotmail.com:
me ajuda que eu sou bem leigo,
A primeira linha do arquivo diz onde esta o php. Seu arquivo está cheio de espaços no caminho do php
#! / Usr / local / bin / php-q
deveria estar assim
#!/usr/local/bin/php -q
No final do script você não encerrou o php com ?>, colocou somente >
-
acertei os arquivos.
quando colocolo os comando no squid na Custom Options fica reiniciando a todo momento o squid
external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php
acl dgfilter external check_filter
http_access allow dgfiltersegue o log do arquivo system:
Sep 24 09:02:23 syslogd: kernel boot file is /boot/kernel/kernel Sep 24 09:07:55 php: /pkg_edit.php: [Squid] - Squid_resync function call pr:1 bp: rpc:no Sep 24 09:07:55 php: /pkg_edit.php: Reloading Squid for configuration sync Sep 24 09:07:55 check_reload_status: Reloading filter Sep 24 09:07:55 check_reload_status: Syncing firewall Sep 24 09:07:55 php: /pkg_edit.php: [Squid] - Squid_resync function call pr:1 bp: rpc:no Sep 24 09:07:55 php: /pkg_edit.php: Reloading Squid for configuration sync Sep 24 09:07:56 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:07:56 squid[16036]: Squid Parent: (squid-1) process 16750 exited with status 1 Sep 24 09:07:59 squid[16036]: Squid Parent: (squid-1) process 11054 started Sep 24 09:07:59 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:07:59 squid[16036]: Squid Parent: (squid-1) process 11054 exited with status 1 Sep 24 09:08:02 squid[16036]: Squid Parent: (squid-1) process 24262 started Sep 24 09:08:02 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:02 squid[16036]: Squid Parent: (squid-1) process 24262 exited with status 1 Sep 24 09:08:05 squid[16036]: Squid Parent: (squid-1) process 25853 started Sep 24 09:08:05 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:05 squid[16036]: Squid Parent: (squid-1) process 25853 exited with status 1 Sep 24 09:08:08 squid[16036]: Squid Parent: (squid-1) process 55605 started Sep 24 09:08:08 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:08 squid[16036]: Squid Parent: (squid-1) process 55605 exited with status 1 Sep 24 09:08:11 squid[16036]: Squid Parent: (squid-1) process 84810 started Sep 24 09:08:11 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:11 squid[16036]: Squid Parent: (squid-1) process 84810 exited with status 1 Sep 24 09:08:11 squid[16036]: Squid Parent: (squid-1) process 84810 will not be restarted due to repeated, frequent failures Sep 24 09:08:11 squid[16036]: Exiting due to repeated, frequent failures Sep 24 09:08:52 Squid_Alarm[54526]: Squid has exited. Reconfiguring filter. Sep 24 09:08:52 Squid_Alarm[54966]: Attempting restart... Sep 24 09:08:52 squid[56209]: Squid Parent: will start 1 kids Sep 24 09:08:52 squid[56209]: Squid Parent: (squid-1) process 56473 started Sep 24 09:08:52 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:52 squid[56209]: Squid Parent: (squid-1) process 56473 exited with status 1 Sep 24 09:08:55 Squid_Alarm[57772]: Reconfiguring filter... Sep 24 09:08:55 squid[56209]: Squid Parent: (squid-1) process 58148 started Sep 24 09:08:55 check_reload_status: Reloading filter Sep 24 09:08:55 Squid_Alarm[60062]: Squid has resumed. Reconfiguring filter. Sep 24 09:08:55 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:55 squid[56209]: Squid Parent: (squid-1) process 58148 exited with status 1 Sep 24 09:08:58 squid[56209]: Squid Parent: (squid-1) process 65156 started Sep 24 09:08:58 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:08:58 squid[56209]: Squid Parent: (squid-1) process 65156 exited with status 1 Sep 24 09:09:01 squid[56209]: Squid Parent: (squid-1) process 74868 started Sep 24 09:09:01 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:09:01 squid[56209]: Squid Parent: (squid-1) process 74868 exited with status 1 Sep 24 09:09:04 squid[56209]: Squid Parent: (squid-1) process 76251 started Sep 24 09:09:04 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:09:04 squid[56209]: Squid Parent: (squid-1) process 76251 exited with status 1 Sep 24 09:09:04 squid[56209]: Squid Parent: (squid-1) process 76251 will not be restarted due to repeated, frequent failures Sep 24 09:09:04 squid[56209]: Exiting due to repeated, frequent failures Sep 24 09:09:50 Squid_Alarm[25114]: Squid has exited. Reconfiguring filter. Sep 24 09:09:50 Squid_Alarm[25320]: Attempting restart... Sep 24 09:09:50 squid[26846]: Squid Parent: will start 1 kids Sep 24 09:09:50 squid[26846]: Squid Parent: (squid-1) process 27198 started Sep 24 09:09:50 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:09:50 squid[26846]: Squid Parent: (squid-1) process 27198 exited with status 1 Sep 24 09:09:53 Squid_Alarm[29185]: Reconfiguring filter... Sep 24 09:09:53 squid[26846]: Squid Parent: (squid-1) process 29956 started Sep 24 09:09:53 check_reload_status: Reloading filter Sep 24 09:09:53 Squid_Alarm[31954]: Squid has resumed. Reconfiguring filter. Sep 24 09:09:53 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:09:53 squid[26846]: Squid Parent: (squid-1) process 29956 exited with status 1 Sep 24 09:09:56 squid[26846]: Squid Parent: (squid-1) process 43104 started Sep 24 09:09:57 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:09:57 squid[26846]: Squid Parent: (squid-1) process 43104 exited with status 1 Sep 24 09:10:00 squid[26846]: Squid Parent: (squid-1) process 44646 started Sep 24 09:10:00 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:00 squid[26846]: Squid Parent: (squid-1) process 44646 exited with status 1 Sep 24 09:10:03 squid[26846]: Squid Parent: (squid-1) process 46277 started Sep 24 09:10:03 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:03 squid[26846]: Squid Parent: (squid-1) process 46277 exited with status 1 Sep 24 09:10:03 squid[26846]: Squid Parent: (squid-1) process 46277 will not be restarted due to repeated, frequent failures Sep 24 09:10:03 squid[26846]: Exiting due to repeated, frequent failures Sep 24 09:10:49 Squid_Alarm[96508]: Squid has exited. Reconfiguring filter. Sep 24 09:10:49 Squid_Alarm[96815]: Attempting restart... Sep 24 09:10:49 squid[97506]: Squid Parent: will start 1 kids Sep 24 09:10:49 squid[97506]: Squid Parent: (squid-1) process 98088 started Sep 24 09:10:49 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:49 squid[97506]: Squid Parent: (squid-1) process 98088 exited with status 1 Sep 24 09:10:52 Squid_Alarm[7518]: Reconfiguring filter... Sep 24 09:10:52 squid[97506]: Squid Parent: (squid-1) process 8060 started Sep 24 09:10:52 check_reload_status: Reloading filter Sep 24 09:10:52 Squid_Alarm[11020]: Squid has resumed. Reconfiguring filter. Sep 24 09:10:52 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:52 squid[97506]: Squid Parent: (squid-1) process 8060 exited with status 1 Sep 24 09:10:55 squid[97506]: Squid Parent: (squid-1) process 16055 started Sep 24 09:10:55 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:55 squid[97506]: Squid Parent: (squid-1) process 16055 exited with status 1 Sep 24 09:10:58 squid[97506]: Squid Parent: (squid-1) process 17395 started Sep 24 09:10:58 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:10:58 squid[97506]: Squid Parent: (squid-1) process 17395 exited with status 1 Sep 24 09:11:01 squid[97506]: Squid Parent: (squid-1) process 27142 started Sep 24 09:11:01 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:01 squid[97506]: Squid Parent: (squid-1) process 27142 exited with status 1 Sep 24 09:11:01 squid[97506]: Squid Parent: (squid-1) process 27142 will not be restarted due to repeated, frequent failures Sep 24 09:11:01 squid[97506]: Exiting due to repeated, frequent failures Sep 24 09:11:47 Squid_Alarm[75222]: Squid has exited. Reconfiguring filter. Sep 24 09:11:47 Squid_Alarm[75620]: Attempting restart... Sep 24 09:11:47 squid[76850]: Squid Parent: will start 1 kids Sep 24 09:11:47 squid[76850]: Squid Parent: (squid-1) process 77013 started Sep 24 09:11:47 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:47 squid[76850]: Squid Parent: (squid-1) process 77013 exited with status 1 Sep 24 09:11:50 Squid_Alarm[78989]: Reconfiguring filter... Sep 24 09:11:50 squid[76850]: Squid Parent: (squid-1) process 79590 started Sep 24 09:11:50 check_reload_status: Reloading filter Sep 24 09:11:50 Squid_Alarm[81624]: Squid has resumed. Reconfiguring filter. Sep 24 09:11:50 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:50 squid[76850]: Squid Parent: (squid-1) process 79590 exited with status 1 Sep 24 09:11:53 squid[76850]: Squid Parent: (squid-1) process 87801 started Sep 24 09:11:53 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:53 squid[76850]: Squid Parent: (squid-1) process 87801 exited with status 1 Sep 24 09:11:56 squid[76850]: Squid Parent: (squid-1) process 98053 started Sep 24 09:11:56 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:56 squid[76850]: Squid Parent: (squid-1) process 98053 exited with status 1 Sep 24 09:11:59 squid[76850]: Squid Parent: (squid-1) process 99672 started Sep 24 09:11:59 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:11:59 squid[76850]: Squid Parent: (squid-1) process 99672 exited with status 1 Sep 24 09:11:59 squid[76850]: Squid Parent: (squid-1) process 99672 will not be restarted due to repeated, frequent failures Sep 24 09:11:59 squid[76850]: Exiting due to repeated, frequent failures Sep 24 09:12:45 Squid_Alarm[34274]: Squid has exited. Reconfiguring filter. Sep 24 09:12:45 Squid_Alarm[34525]: Attempting restart... Sep 24 09:12:45 squid[35846]: Squid Parent: will start 1 kids Sep 24 09:12:45 squid[35846]: Squid Parent: (squid-1) process 36159 started Sep 24 09:12:45 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:12:45 squid[35846]: Squid Parent: (squid-1) process 36159 exited with status 1 Sep 24 09:12:48 Squid_Alarm[49762]: Reconfiguring filter... Sep 24 09:12:48 squid[35846]: Squid Parent: (squid-1) process 50092 started Sep 24 09:12:48 check_reload_status: Reloading filter Sep 24 09:12:48 Squid_Alarm[52179]: Squid has resumed. Reconfiguring filter. Sep 24 09:12:48 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:12:48 squid[35846]: Squid Parent: (squid-1) process 50092 exited with status 1 Sep 24 09:12:51 squid[35846]: Squid Parent: (squid-1) process 63088 started Sep 24 09:12:51 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:12:51 squid[35846]: Squid Parent: (squid-1) process 63088 exited with status 1 Sep 24 09:12:54 squid[35846]: Squid Parent: (squid-1) process 64871 started Sep 24 09:12:54 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:12:54 squid[35846]: Squid Parent: (squid-1) process 64871 exited with status 1 Sep 24 09:12:57 squid[35846]: Squid Parent: (squid-1) process 65942 started Sep 24 09:12:58 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:12:58 squid[35846]: Squid Parent: (squid-1) process 65942 exited with status 1 Sep 24 09:12:58 squid[35846]: Squid Parent: (squid-1) process 65942 will not be restarted due to repeated, frequent failures Sep 24 09:12:58 squid[35846]: Exiting due to repeated, frequent failures Sep 24 09:13:43 Squid_Alarm[756]: Squid has exited. Reconfiguring filter. Sep 24 09:13:43 Squid_Alarm[977]: Attempting restart... Sep 24 09:13:43 squid[2148]: Squid Parent: will start 1 kids Sep 24 09:13:43 squid[2148]: Squid Parent: (squid-1) process 2755 started Sep 24 09:13:43 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:13:43 squid[2148]: Squid Parent: (squid-1) process 2755 exited with status 1 Sep 24 09:13:46 Squid_Alarm[12183]: Reconfiguring filter... Sep 24 09:13:46 squid[2148]: Squid Parent: (squid-1) process 12703 started Sep 24 09:13:47 check_reload_status: Reloading filter Sep 24 09:13:47 Squid_Alarm[15129]: Squid has resumed. Reconfiguring filter. Sep 24 09:13:47 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:13:47 squid[2148]: Squid Parent: (squid-1) process 12703 exited with status 1 Sep 24 09:13:50 squid[2148]: Squid Parent: (squid-1) process 32376 started Sep 24 09:13:50 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:13:50 squid[2148]: Squid Parent: (squid-1) process 32376 exited with status 1 Sep 24 09:13:53 squid[2148]: Squid Parent: (squid-1) process 33247 started Sep 24 09:13:53 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:13:53 squid[2148]: Squid Parent: (squid-1) process 33247 exited with status 1 Sep 24 09:13:56 squid[2148]: Squid Parent: (squid-1) process 34739 started Sep 24 09:13:56 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:13:56 squid[2148]: Squid Parent: (squid-1) process 34739 exited with status 1 Sep 24 09:13:56 squid[2148]: Squid Parent: (squid-1) process 34739 will not be restarted due to repeated, frequent failures Sep 24 09:13:56 squid[2148]: Exiting due to repeated, frequent failures Sep 24 09:14:42 Squid_Alarm[78307]: Squid has exited. Reconfiguring filter. Sep 24 09:14:42 Squid_Alarm[78565]: Attempting restart... Sep 24 09:14:42 squid[79696]: Squid Parent: will start 1 kids Sep 24 09:14:42 squid[79696]: Squid Parent: (squid-1) process 79846 started Sep 24 09:14:42 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:14:42 squid[79696]: Squid Parent: (squid-1) process 79846 exited with status 1 Sep 24 09:14:45 Squid_Alarm[81335]: Reconfiguring filter... Sep 24 09:14:45 squid[79696]: Squid Parent: (squid-1) process 81866 started Sep 24 09:14:45 check_reload_status: Reloading filter Sep 24 09:14:45 Squid_Alarm[84648]: Squid has resumed. Reconfiguring filter. Sep 24 09:14:45 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:14:45 squid[79696]: Squid Parent: (squid-1) process 81866 exited with status 1 Sep 24 09:14:48 squid[79696]: Squid Parent: (squid-1) process 90629 started Sep 24 09:14:48 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:14:48 squid[79696]: Squid Parent: (squid-1) process 90629 exited with status 1 Sep 24 09:14:51 squid[79696]: Squid Parent: (squid-1) process 6351 started Sep 24 09:14:51 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:14:51 squid[79696]: Squid Parent: (squid-1) process 6351 exited with status 1 Sep 24 09:14:54 squid[79696]: Squid Parent: (squid-1) process 15215 started Sep 24 09:14:54 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:14:54 squid[79696]: Squid Parent: (squid-1) process 15215 exited with status 1 Sep 24 09:14:54 squid[79696]: Squid Parent: (squid-1) process 15215 will not be restarted due to repeated, frequent failures Sep 24 09:14:54 squid[79696]: Exiting due to repeated, frequent failures Sep 24 09:15:40 Squid_Alarm[50264]: Squid has exited. Reconfiguring filter. Sep 24 09:15:40 Squid_Alarm[50797]: Attempting restart... Sep 24 09:15:40 squid[52037]: Squid Parent: will start 1 kids Sep 24 09:15:40 squid[52037]: Squid Parent: (squid-1) process 52420 started Sep 24 09:15:40 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:15:40 squid[52037]: Squid Parent: (squid-1) process 52420 exited with status 1 Sep 24 09:15:43 Squid_Alarm[54344]: Reconfiguring filter... Sep 24 09:15:43 squid[52037]: Squid Parent: (squid-1) process 55190 started Sep 24 09:15:43 check_reload_status: Reloading filter Sep 24 09:15:43 Squid_Alarm[57531]: Squid has resumed. Reconfiguring filter. Sep 24 09:15:43 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:15:43 squid[52037]: Squid Parent: (squid-1) process 55190 exited with status 1 Sep 24 09:15:46 squid[52037]: Squid Parent: (squid-1) process 63041 started Sep 24 09:15:46 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:15:46 squid[52037]: Squid Parent: (squid-1) process 63041 exited with status 1 Sep 24 09:15:49 squid[52037]: Squid Parent: (squid-1) process 72856 started Sep 24 09:15:49 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:15:49 squid[52037]: Squid Parent: (squid-1) process 72856 exited with status 1 Sep 24 09:15:52 squid[52037]: Squid Parent: (squid-1) process 88509 started Sep 24 09:15:52 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:15:52 squid[52037]: Squid Parent: (squid-1) process 88509 exited with status 1 Sep 24 09:15:52 squid[52037]: Squid Parent: (squid-1) process 88509 will not be restarted due to repeated, frequent failures Sep 24 09:15:52 squid[52037]: Exiting due to repeated, frequent failures Sep 24 09:16:38 Squid_Alarm[22950]: Squid has exited. Reconfiguring filter. Sep 24 09:16:38 Squid_Alarm[23518]: Attempting restart... Sep 24 09:16:38 squid[24603]: Squid Parent: will start 1 kids Sep 24 09:16:38 squid[24603]: Squid Parent: (squid-1) process 25164 started Sep 24 09:16:38 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:16:38 squid[24603]: Squid Parent: (squid-1) process 25164 exited with status 1 Sep 24 09:16:41 Squid_Alarm[26855]: Reconfiguring filter... Sep 24 09:16:41 squid[24603]: Squid Parent: (squid-1) process 27346 started Sep 24 09:16:41 check_reload_status: Reloading filter Sep 24 09:16:41 Squid_Alarm[29975]: Squid has resumed. Reconfiguring filter. Sep 24 09:16:41 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:16:41 squid[24603]: Squid Parent: (squid-1) process 27346 exited with status 1 Sep 24 09:16:44 squid[24603]: Squid Parent: (squid-1) process 42695 started Sep 24 09:16:44 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:16:44 squid[24603]: Squid Parent: (squid-1) process 42695 exited with status 1 Sep 24 09:16:47 squid[24603]: Squid Parent: (squid-1) process 44360 started Sep 24 09:16:48 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:16:48 squid[24603]: Squid Parent: (squid-1) process 44360 exited with status 1 Sep 24 09:16:51 squid[24603]: Squid Parent: (squid-1) process 45894 started Sep 24 09:16:51 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:16:51 squid[24603]: Squid Parent: (squid-1) process 45894 exited with status 1 Sep 24 09:16:51 squid[24603]: Squid Parent: (squid-1) process 45894 will not be restarted due to repeated, frequent failures Sep 24 09:16:51 squid[24603]: Exiting due to repeated, frequent failures Sep 24 09:16:58 sshd[68790]: Accepted keyboard-interactive/pam for root from 192.168.1.101 port 1511 ssh2 Sep 24 09:16:58 sshd[68790]: subsystem request for sftp Sep 24 09:16:58 sshlockout[69644]: sshlockout/webConfigurator v3.0 starting up Sep 24 09:17:36 Squid_Alarm[96106]: Squid has exited. Reconfiguring filter. Sep 24 09:17:36 Squid_Alarm[96461]: Attempting restart... Sep 24 09:17:36 squid[97479]: Squid Parent: will start 1 kids Sep 24 09:17:36 squid[97479]: Squid Parent: (squid-1) process 97844 started Sep 24 09:17:37 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:17:37 squid[97479]: Squid Parent: (squid-1) process 97844 exited with status 1 Sep 24 09:17:39 Squid_Alarm[7343]: Reconfiguring filter... Sep 24 09:17:40 squid[97479]: Squid Parent: (squid-1) process 7930 started Sep 24 09:17:40 check_reload_status: Reloading filter Sep 24 09:17:40 Squid_Alarm[10202]: Squid has resumed. Reconfiguring filter. Sep 24 09:17:40 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:17:40 squid[97479]: Squid Parent: (squid-1) process 7930 exited with status 1 Sep 24 09:17:43 squid[97479]: Squid Parent: (squid-1) process 13623 started Sep 24 09:17:43 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:17:43 squid[97479]: Squid Parent: (squid-1) process 13623 exited with status 1 Sep 24 09:17:46 squid[97479]: Squid Parent: (squid-1) process 15190 started Sep 24 09:17:46 (squid-1): The check_filter helpers are crashing too rapidly, need help! Sep 24 09:17:46 squid[97479]: Squid Parent: (squid-1) process 15190 exited with status 1
-
Seu arquivo ainda tem erros.
Vamos facilitar as coisas.
execute este comando na console/ssh
fetch -o /usr/pbi/squid-amd64/libexec/squid/check_ip.php https://raw.github.com/pfsense/pfsense-packages/master/config/squid3/33/check_ip.php
-
brigadão
funcionou ok com os log do squid.teria alguma forma de no captive portal o usuario que autentica no freeradiun do pfsense ele ter a opão de auterar senha na pagina de autenticação?
-
@calebepereira@hotmail.com:
brigadão
funcionou ok com os log do squid.teria alguma forma de no captive portal o usuario que autentica no freeradiun do pfsense ele ter a opão de auterar senha na pagina de autenticação?
Só programando mesmo…
-
-
captive portal - na pagina do login do captive portal ter opção de alterar senha e recuperar senha ( integrado com o freeradiun) lembrando que no cadastro do freeradiuns não temo campo de e-mail do usuário.
-
proxy transparente squid3-dev com squidguard - gostaria de ao invés de bloquear os sites que estão no squidguard eu tenha uma opção de criar velocidades de download para cada regra,
tres opções de regra onde eu possa incluir sites por nome para cair nestas regras, e um campo com a opção de criar as velocidade que eu quero.
ex: pornografia - bloqueio
radios online - 200kb
video onnline - 100kb
comunidade - 300kb
particularidade1 - 50kb
particularidade2 - 500kb
particularidade3 - 20 kbobs: isso funcionará para sites em https tambem
- sarg vai continuar mostrando relatórios por usuários logados no captiveportal, vai mostrar cada site com a opção bloqueado ou a velocidade daquele grupo, caso o site esteja em algum grupo.
tem como fazer? e quanto ficaria cada um?
1
2
3 -
-
Tem como fazer?
1 sim. mas depende do onde está rodando o seu servidor freeradius.
2 O squidguard não contempla isso mas pode ser contornado trabalhando em conjunto com o squid. SSL somente com interceptação de SSL
3 Sarg não é capaz de informar a velocidade do site, só se foi bloqueado ou não.e quanto ficaria cada um?
Não da para estipular um valor fixo uma vez que tudo depende da complexidade das alterações e o tempo gasto para isso. Podemos acertar um valor por hora de programação em private.
-
Segui os procedimentos indicados mas os serviços do squid e squidguard permanecem com status stopped.
Agradeço a ajuda.pfsense: 2.1-RELEASE (amd64)
squid3: 3.1.20 pkg 2.0.6
squidGuard: 1.4_4 pkg v.1.9.5Autenticação na interface LAN (squid e squidguard) integrada com Active Directory funciona corretamente
Autenticação na interface OPT (captive portal) integrada com Radius Windows 2008 R2 funciona corretamenteCaptive Portal + Squid + Squidguard não consegui implementar.
1. Proxy Server > Custom Options
external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php
acl dgfilter external check_filter
http_access allow dgfilter2. Shell
fetch -o /usr/pbi/squid-amd64/libexec/squid/check_ip.php https://raw.github.com/pfsense/pfsense-packages/master/config/squid3/33/check_ip.php3. Shell
ls -l /usr/pbi/squid-amd64/libexec/squid/check_ip.php
-rwxr-xr-x 1 root wheel 2769 Sep 26 07:12 /usr/pbi/squid-amd64/libexec/squid/check_ip.php4. Shell
/usr/pbi/squid-amd64/libexec/squid/check_ip.php
Não retorna informação5. Status > System Logs > General
Sep 26 07:33:03 squid: Bungled squid.conf line 85: external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php
Sep 26 07:33:08 php[30152]: /status_services.php: The command '/usr/local/etc/rc.d/squid.sh stop' returned exit code '1', the output was 'FATAL: Bungled squid.conf line 85: external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php Squid Cache (Version 3.1.22): Terminated abnormally. CPU Usage: 0.006 seconds = 0.006 user + 0.000 sys Maximum Resident Size: 6072 KB Page faults with physical i/o: 0'
Sep 26 07:33:10 squid: Bungled squid.conf line 85: external_acl_type check_filter children-startup=5 ttl=60 %SRC /usr/pbi/squid-amd64/libexec/squid/check_ip.php -
eu falo com vc com:
só neste e-mail:forum@pfsense.org
entra em contato comigo no e-mail calebepereira@hotmail.com para que possamos conversar se for possível um tel eu fico grato.
-
sorry ı have to use english
a small contribution to the external acl type scrirpt
ttl=60 means the code will not check the ip for 60 seconds, and will use the first username for that period even if the user loged out and a new one logged in, a value shorter like ttl=0 or ttl=1 would be more accurate I think
-
Thanks for your contribution on this topic :)