Buongiorno a tutti,

ho il seguente problema con il proxy squid:

S.O Cent.OS 5 + Squid 2.6 su hardware virtuale Microsoft Virtual Server (questo mi passano..)

Ho configurato winbind ed smb,tutto funziona a meraviglia, la macchina Linux fa parte del dominio Windows 2003, il proxy autentica perfettamente gli utenti usando il protocollo ntlm.

Ho la seguente acl :

codice:
acl unrestricted_users proxy_auth_regex "UNLIMITED_USERS.txt"
http_access allow unrestricted_users
Funziona:, se un utente è nel file UNLIMITED_USERS.txt le regole successive relative ad esempio al fatto che un dominio sia o meno in blacklist vengono ignorate.

Fin qua tutto bene. poi ho questa ACL

codice:
acl banned_users proxy_auth_regex "BANNED_USERS.txt"
http_access deny banned_users
se mi metto nel file BANNED_USERS in teoria dovrei avere nei log le solite due richieste fallite TCP_DENIED/407 (dovute al protocollo NTLM) e quindi TCP_DENIED/403 con il mio nome utente nel file di log. Se le mie conoscenze del protocollo HTTP non mi tradiscono avendo a mio tempo sviluppato sia un piccolo client che un piccolo server, dovrebbero significare rispettivamente 407 PROXY AUTH REQUIRED e 403 FORBIDDEN (non ci riprovare)

Invece il proxy continua a rispondere TCP_DENIED/407 ma incredibilmente riporta il mio nome utente nel file di log.

Della serie mi dice: ok ti sei autenticato, dammi lo stesso la password perchè questa non mi piace, invece che dirmi: con questa password non vai da nessuna parte.

Ecco le righe di log.

Fri Aug 22 16:56:31 2008 0 192.168.100.170 TCP_DENIED/407 1818 GET http://www.undominioqualunque.it/ - NONE/- text/html
Fri Aug 22 16:56:31 2008 0 192.168.100.170 TCP_DENIED/407 2024 GET http://www.undominioqualunque.it/ - NONE/- text/html
Fri Aug 22 16:56:31 2008 7 192.168.100.170 TCP_DENIED/407 1602 GET http://www.undominioqualunque.it/ DOMINIOXYZ\asimonassi NONE/- text/html

Ovviamente il povero internet explorer continua a chiedermi la password 3 volte poi si stufa e mi rimanda alla pagina di errore CORRETTA quella che dice che sono stato bannato (se si vede il file di config) da ciò presumo che sia un BUG di Squid che risponde 407 invece di 403 ... ma mi pare impossibile non trovare nulla in merito sulla rete pertanto sono portato a pensare di sbagliare qualcosa.

Anche se è lungo posto l'intero contenuto del file squid.conf e me ne scuso con chi avesse un desktop a bassa risoluzione senza mouse con la rotellina.

Ringrazio anticipatamente, naturalmente non mi aspetto nulla, con spirito collaborativo spero di potere ricambiare il forum con qualcosa in cui sono piu forte, sono un po di anni che manco qui.

Cordiali saluti a tutti.

codice:
#	----------------------------

cache_effective_user squid
cache_effective_group squid
http_port 3128
hierarchy_stoplist cgi-bin ?
visible_hostname linuxproxy.dominio.dns.interno

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 20

acl NTLMUsers proxy_auth REQUIRED
acl wu dstdomain .windowsupdate.com .microsoft.com .windows.com .public-trust.com 
acl malwaredomain dstdomain "MALWARE_DOMAINS.txt"

acl localnet_dst dst 192.168.0.0/255.255.0.0 
acl all src 0.0.0.0/0.0.0.0 
acl manager proto cache_object 
acl localhost src 127.0.0.1/255.255.255.255 

acl to_localhost dst 127.0.0.0/8 
acl SSL_ports port 443 
acl Safe_ports port 80 # http 
acl Safe_ports port 21 # ftp 
acl Safe_ports port 443 # https 
acl Safe_ports port 70 # gopher 
acl Safe_ports port 210 # wais 
acl Safe_ports port 1025-65535 # unregistered ports 
acl Safe_ports port 280 # http-mgmt 
acl Safe_ports port 488 # gss-http 
acl Safe_ports port 591 # filemaker 
acl Safe_ports port 777 # multiling http 
acl post method POST 
acl CONNECT method CONNECT


acl INTERNET_DISABLED src "CLIENT_IP_BLOCKED.txt"

acl BLACKLIST_URL url_regex "BLACKLIST_URL.txt"
acl BLACKLIST_DOMAIN dstdomain "BLACKLIST_DOMAIN.txt"
acl BLACKLIST_IPADDR dst "BLACKLIST_IPADDR.txt"

acl WHITELIST_URL url_regex "WHITELIST_URL.txt"
acl WHITELIST_DOMAIN dstdomain "WHITELIST_DOMAIN.txt"
acl WHITELIST_IPADDR dst "WHITELIST_IPADDR.txt"


acl TERMINAL_SERVER src "TERMINAL_SERVER_IPADDR.txt"

acl java_jvm browser Java

acl OpenOfficeUpdate url_regex update.services.openoffice.org 

acl banned_users proxy_auth_regex "BANNED_USERS.txt"
acl restricted_users proxy_auth_regex "RESTRICTED_USERS.txt"
acl unrestricted_users proxy_auth_regex "UNLIMITED_USERS.txt"
acl client_diretti src "CLIENT_DIRETTI.txt"

refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern .		0	20%	4320

http_access allow manager localhost
http_access deny manager

http_access allow localnet_dst

http_access deny malwaredomain
deny_info ERR_CUSTOM_MALWARE malwaredomain

always_direct allow post
http_access allow post

http_access allow OpenOfficeUpdate
http_access allow wu
http_access allow java_jvm

http_access allow client_diretti

http_access deny NTLMUsers banned_users
deny_info ERR_CUSTOM_BANNED banned_users

http_access allow NTLMUsers unrestricted_users

http_access deny INTERNET_DISABLED
deny_info ERR_CUSTOM_BANNED_PC INTERNET_DISABLED

http_access deny BLACKLIST_URL
deny_info ERR_CUSTOM_BLACKLISTED_URL BLACKLIST_URL 
http_access deny BLACKLIST_DOMAIN 
deny_info ERR_CUSTOM_BLACKLISTED_DOM BLACKLIST_DOMAIN 
http_access deny BLACKLIST_IPADDR 
deny_info ERR_CUSTOM_BLACKLISTED_IP BLACKLIST_IPADDR

http_access allow WHITELIST_URL
http_access allow WHITELIST_DOMAIN
http_access allow WHITELIST_IPADDR

http_access deny TERMINAL_SERVER
deny_info ERR_CUSTOM_TERMINAL_SERVER TERMINAL_SERVER

http_access deny restricted_users
deny_info ERR_CUSTOM_RESTRICTED restricted_users 

http_access allow NTLMUsers
http_access deny all