[squid-users] POST + NTLM Authentication

From: Luiz Felipe Ferreira <lfferreira_at_gmail.com>
Date: Wed, 9 Jul 2008 16:13:40 -0300

Guys,

We have a squid-2.5STABLE14 with NTLM authentication.

I note that when you try to upload a file on 4shared.com or
in.solit.us, it begins well but after some seconds, appears a pop-up
window asking for user and password. Ok, I write those things and
browser (even IE or Firefox) hangs.

PS: It works when I use an direct connection (without proxy).

Checking out log files:

- access.log

1215199353.123 22376 192.168.0.155 TCP_MISS/200 440 POST
http://dc66.4shared.com/main/upload.jsp? lferreira
DIRECT/69.80.240.179 text/html
1215199414.781 22144 192.168.0.155 TCP_MISS/200 440 POST
http://dc74.4shared.com/main/upload.jsp? lferreira
DIRECT/69.80.243.139 text/html
1215199437.306 22509 192.168.0.155 TCP_MISS/200 440 POST
http://dc74.4shared.com/main/upload.jsp? lferreira
DIRECT/69.80.243.139 text/html
1215199611.155 23644 192.168.0.155 TCP_MISS/200 440 POST
http://dc74.4shared.com/main/upload.jsp? lferreira
DIRECT/69.80.243.139 text/html
1215199785.005 536 192.168.0.155 TCP_DENIED/407 1911 POST
http://dc25.4shared.com/main/upload.jsp? - NONE/- text/html

- store.log

1215199353.123 RELEASE -1 FFFFFFFF E205E332DAEC24F17197E22C6144D7
5D 200 1215199352 -1 -1 text/html 167/167 POST
http://dc66.4shared.com/main/upload.jsp?
1215199414.781 RELEASE -1 FFFFFFFF A03D5568BD650C5FCD2E8429096646B9
200 1215199412 -1 -1 text/html 167/167 POST
http://dc74.4shared.com/main/upload.jsp?
1215199437.306 RELEASE -1 FFFFFFFF 35A9BFB88944746779AE354FE6CC7BC1
200 1215199435 -1 -1 text/html 167/167 POST
http://dc74.4shared.com/main/upload.jsp?
1215199611.155 RELEASE -1 FFFFFFFF 90431684346D3CC537AE7C3011D6CA62
200 1215199608 -1 -1 text/html 167/167 POST
http://dc74.4shared.com/main/upload.jsp?
1215199785.005 RELEASE -1 FFFFFFFF 1520CD49085D03BA0549CA9945DF0951
407 1215199784 0 1215199784 text/html 1435/1786 POST
http://dc25.4shared.com/main/upload.jsp?
1215200190.844 RELEASE -1 FFFFFFFF 7B8C33A98841AB40778B0B74193E6710
200 1215200188 -1 -1 text/html 167/167 POST
http://dc25.4shared.com/main/upload.jsp?
1215201418.064 RELEASE -1 FFFFFFFF 27362CDD856C0C0CAC4F126460F1FD3E
200 1215201416 -1 -1 text/html 167/167 POST
http://dc72.4shared.com/main/upload.jsp?
1215201418.676 RELEASE -1 FFFFFFFF 8E62BC28AB2A0468919FFE92D1ACF70C
200 1215201418 -1 0 text/html 107170/24875 POST
http://www.4shared.com/account/dir/3635557/6e0afaec/sharing.html?

- cache.log

2008/07/04 16:22:32| httpReadReply: Request not yet fully sent "POST
http://dc66.4shared.com/main/upload.jsp?sId=SlY40MdG9hQzRfHf"
2008/07/04 16:23:34| httpReadReply: Request not yet fully sent "POST
http://dc74.4shared.com/main/upload.jsp?sId=SlY40MdG9hQzRfHf"
2008/07/04 16:23:56| httpReadReply: Request not yet fully sent "POST
http://dc74.4shared.com/main/upload.jsp?sId=SlY40MdG9hQzRfHf"
2008/07/04 16:26:49| httpReadReply: Request not yet fully sent "POST
http://dc74.4shared.com/main/upload.jsp?sId=SlY40MdG9hQzRfHf"
2008/07/04 16:36:30| httpReadReply: Request not yet fully sent "POST
http://dc25.4shared.com/main/upload.jsp?sId=FRCHrfEklUxJq2u9"
2008/07/04 16:56:57| httpReadReply: Request not yet fully sent "POST
http://dc72.4shared.com/main/upload.jsp?sId=vQrlC0qS1CYH8OyV"

- squid.conf

# Porta que o Squid irá "escutar"
http_port 3128

# Usuário e grupo do squid
cache_effective_user proxy
cache_effective_group proxy

#redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/
squidGuard.conf

# Tamanho do cache
cache_mem 1000 MB

cache_swap_low 90
cache_swap_high 95
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
maximum_object_size 16 MB

maximum_object_size_in_memory 40 KB
cache_dir diskd /squidcache/cache/1 10000 64 256 Q1=64 Q2=72
cache_dir diskd /squidcache/cache/2 10000 64 256 Q1=64 Q2=72
cache_dir diskd /squidcache/cache/3 10000 64 256 Q1=64 Q2=72
cache_dir diskd /squidcache/cache/4 10000 64 256 Q1=64 Q2=72
cache_dir diskd /squidcache/cache/5 10000 64 256 Q1=64 Q2=72
cache_dir diskd /squidcache/cache/6 7000 64 256 Q1=64 Q2=72
request_body_max_size 0 KB
visible_hostname server.domain.com.br

# Determinando o diretorio onde estara armazenado o cache das paginas
cache_log /var/log/squid/cache.log
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
hierarchy_stoplist cgi-bin ?

#log_mime_hdrs on
- Mostrar texto das mensagens anteriores -

acl QUERY urlpath_regex cgi-bin \?

# Autenticacao NTLM
auth_param ntlm program /usr/bin/ntlm_auth DOMAIN/SERVER
--helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 15
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 2 minutes
auth_param ntlm use_ntlm_negotiate off
auth_param basic program /usr/bin/ntlm_auth DOMAIN/SERVER
--helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm Digite o Dominio\Login e Senha
auth_param basic credentialsttl 8 hours
auth_param basic casesensitive off

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

half_closed_clients off

acl all src 192.168.0.0/255.255.255.0
acl all src 192.168.1.0/255.255.255.0
acl all src 192.168.11.0/255.255.255.0
acl all src 192.168.12.0/255.255.255.0
#acl all src 127.0.0.1/255.255.255.255

acl manager proto cache_object
#acl administrador src 127.0.0.1
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 563
acl Safe_ports port 80 # http
acl Safe_ports port 20 # ftp
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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
### Windows Update temporario###
acl windowsupdate dstdomain .windowsupdate.microsoft.com
acl windowsupdate dstdomain .update.microsoft.com
acl windowsupdate dstdomain .download.windowsupdate.com
acl windowsupdate dstdomain .c.microsoft.com
acl windowsupdate dstdomain .download.microsoft.com
acl CONNECT method CONNECT

acl post method POST
acl acesso proxy_auth REQUIRED
acl dominios_negados url_regex -i "/usr/local/squid/etc/listas/dominios_negados"
acl java browser java
acl java browser Java
acl usr_vip proxy_auth "/usr/local/squid/etc/listas/usr_vip.usr"
#acl logmein dstdomain logmein.com.
acl usr_post proxy_auth "/usr/local/squid/etc/listas/usr_post.usr"
http_access allow manager localhost
acl usr_web proxy_auth "/usr/local/squid/etc/listas/usr_web.usr"
acl sites_permitidos_vip url_regex
"/usr/local/squid/etc/listas/sites_permitidos"
acl acesso_messenger url_regex -i gateway.dll
acl messenger req_mime_type -i ^application/x-msn-messenger

acl sites_permitidos_web url_regex
"/usr/local/squid/etc/listas/sites_permitidos_web"
acl ar src "/usr/local/squid/etc/listas/grupo_ar"
acl sites_ar url_regex "/usr/local/squid/etc/listas/sites_ar"
acl usr_logmein proxy_auth "/usr/local/squid/etc/listas/usr_logmein.usr"
acl sites_permitidos_logmein url_regex
"/usr/local/squid/etc/listas/sites_permitidos_logmein"
acl usr_linkedin proxy_auth "/usr/local/squid/etc/listas/usr_linkein.usr"
acl sites_permitidos_linkedin url_regex
"/usr/local/squid/etc/listas/sites_permitidos_linkedin"
acl dominios_permitidos url_regex
"/usr/local/squid/etc/listas/dominios_permitidos"
acl html rep_mime_type text/html
reply_body_max_size 0 allow html
reply_body_max_size 314572800 allow all
no_cache deny QUERY

# A linha abaixo deve ser descomentada para liberar o acesso total.
#http_access allow all
http_access allow java
#http_access allow logmein
http_access allow windowsupdate
http_access deny acesso acesso_messenger
http_access deny messenger
http_access allow usr_vip sites_permitidos_vip
http_access allow ar sites_ar
http_access deny ar !sites_ar
http_access allow usr_web sites_permitidos_web
http_access allow usr_linkedin sites_permitidos_linkedin
http_access allow usr_logmein sites_permitidos_logmein
http_access allow dominios_permitidos
http_access allow post usr_post

http_access deny dominios_negados
http_access deny !Safe_ports
http_access allow post all
http_access deny CONNECT !SSL_ports
http_access allow all acesso
http_access deny all

http_reply_access allow all
icp_access allow all
miss_access allow all
coredump_dir /usr/local/squid/var/cache

#Log de Erros
error_directory /usr/local/squid/share/errors/Portuguese/
deny_info http://server.certintra.com.br/bloqueio.html dominios_negados
cache_mgr seguranca_at_certisign.com.br

#dns_nameservers 127.0.0.1
#reference_age 20 day
positive_dns_ttl 12 hour

Any idea?
Luiz Felipe Ferreira
Received on Wed Jul 09 2008 - 19:13:44 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 10 2008 - 12:00:03 MDT