Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/12/2012, à 18:27

2fast4u

Squid3 (AD/NTLM) - performances médiocre (TCP_MISS, TCP_DENIED)

Bonjour,

Je viens d'installer squid en suivant ce tuto et j'ai un comportement étrange de mon proxy.
Installé sur une version serveur 12.04
l'authentification kerberos semble ok, kinit et klist montrent qu'un ticket est bien validé
l'intégration au domain est faite,

sudo net ads testjoin
Join is OK

J'arrive à lister les utilisateurs et groupes du domaine avec wbinfo -u / -g
Par contre j'ai un message d'erreur avec wbinfo -t

checking the trust secret for domain MONDOMAIN via RPC calls failed
failed to call wbcCheckTrustCredentials: WBC_ERR_WINBIND_NOT_AVAILABLE
Could not check secret

et un test d'authentification passe en plaintext password mais pas en challenge/response

wbinfo -a testuser
Enter testuser's password: 
plaintext password authentication succeeded
Enter testuser's password: 
challenge/response password authentication failed
Could not authenticate user testuser with challenge/response

à l'utilisation, la navigation sur un poste avec IE (ou FF) est lente, mais l'authentification fonctionne, si je suis loggué avec un compte du domaine, je n'ai aucune demande, par contre avec un compte local, j'ai bien une demande d'authentification de la par du proxy.

J'ai regénéré le dossier de cache avec la commande squid3 -z
Le dossier du cache semble se remplir correctement, je ne sais plus ou chercher.

sudo du -sh /var/spool/squid3/*
28M	/var/spool/squid3/00
1,1M	/var/spool/squid3/01
1,1M	/var/spool/squid3/02
1,1M	/var/spool/squid3/03
1,1M	/var/spool/squid3/04
1,1M	/var/spool/squid3/05
1,1M	/var/spool/squid3/06
1,1M	/var/spool/squid3/07
1,1M	/var/spool/squid3/08
1,1M	/var/spool/squid3/09
1,1M	/var/spool/squid3/0A
1,1M	/var/spool/squid3/0B
1,1M	/var/spool/squid3/0C
1,1M	/var/spool/squid3/0D
1,1M	/var/spool/squid3/0E
1,1M	/var/spool/squid3/0F
60K	/var/spool/squid3/swap.state

Et dans le fichier access.log j'ai 99% de TCP_DENIED/407 ou TCP_MISS/200 et très peu de HIT

1354543654.421     26 10.10.48.138 TCP_MISS/200 507 GET http://www.google-analytics.com/__utm.gif? monuserad DIRECT/173.194.34.32 image/gif
1354543655.493     27 10.10.48.138 TCP_MISS/200 1780 GET http://www.google.com/enterprise/apps/images/common/ui_sprite.png monuserad DIRECT/173.194.34.49 image/png
1354543660.329  11759 10.10.48.138 TCP_MISS/200 8710 GET http://apis.google.com/js/plusone.js monuserad DIRECT/74.125.230.224 application/javascript
1354543660.502      0 10.10.48.138 TCP_DENIED/407 3872 CONNECT apis.google.com:443 - NONE/- text/html
1354543660.541      1 10.10.48.138 TCP_DENIED/407 4100 CONNECT apis.google.com:443 - NONE/- text/html
1354543660.673      0 10.10.48.138 TCP_DENIED/407 3884 CONNECT plusone.google.com:443 - NONE/- text/html
1354543660.693     26 10.10.48.138 TCP_MISS/200 708 GET http://www.google.com/images/icons/product/gplus-16.png monuserad DIRECT/173.194.34.49 image/png
1354543661.491      1 10.10.48.138 TCP_DENIED/407 4112 CONNECT plusone.google.com:443 - NONE/- text/html
1354543661.493     44 10.10.48.138 TCP_MISS/200 615 GET http://www.google.com/images/icons/product/blogger-16.png monuserad DIRECT/173.194.34.49 image/png
1354543661.513      0 10.10.48.138 TCP_DENIED/407 4364 GET http://www.google.com/images/icons/product/youtube-16.png - NONE/- text/html
1354543661.579     45 10.10.48.138 TCP_MISS/200 627 GET http://www.google.com/images/icons/product/youtube-16.png monuserad DIRECT/173.194.34.49 image/png
1354543661.936      0 10.10.48.138 TCP_DENIED/407 4328 GET http://www.google.com/enterprise/apps/js/view.js - NONE/- text/html
1354543661.981      4 10.10.48.138 TCP_DENIED/407 4556 GET http://www.google.com/enterprise/apps/js/view.js - NONE/- text/html
1354543662.074     78 10.10.48.138 TCP_MISS/200 45461 GET http://www.google.com/enterprise/apps/js/view.js monuserad DIRECT/173.194.34.49 text/javascript
1354543662.497   1948 10.10.48.138 TCP_MISS/200 29677 CONNECT apis.google.com:443 monuserad DIRECT/74.125.230.224 -
1354543662.596      0 10.10.48.138 TCP_DENIED/407 3872 CONNECT ssl.gstatic.com:443 - NONE/- text/html
1354543662.776      1 10.10.48.138 TCP_DENIED/407 4100 CONNECT ssl.gstatic.com:443 - NONE/- text/html
1354543663.816      0 10.10.48.138 TCP_DENIED/407 3874 CONNECT login.live.com:443 - NONE/- text/html
1354543663.902     26 10.10.48.138 TCP_MISS/200 483 GET http://www.google.com/images/cleardot.gif monuserad DIRECT/173.194.34.49 image/gif
1354543664.059      1 10.10.48.138 TCP_DENIED/407 4102 CONNECT login.live.com:443 - NONE/- text/html
1354543665.516     35 10.10.48.138 TCP_MISS/200 6096 GET http://www.google.com/intl/fr/enterprise/apps/js/sitemap.min.js monuserad DIRECT/173.194.34.49 text/javascript
1354543667.459      0 10.10.48.138 TCP_DENIED/407 4260 GET http://www.google.com/js/maia.js - NONE/- text/html
1354543667.765      3 10.10.48.138 TCP_DENIED/407 4488 GET http://www.google.com/js/maia.js - NONE/- text/html
1354543667.889     35 10.10.48.138 TCP_MISS/200 2992 GET http://www.google.com/js/maia.js monuserad DIRECT/173.194.34.49 text/javascript
1354543667.962   6429 10.10.48.138 TCP_MISS/200 68967 CONNECT plusone.google.com:443 monuserad DIRECT/173.194.34.37 -
1354543668.180     24 10.10.48.138 TCP_MISS/200 507 GET http://www.google-analytics.com/__utm.gif? monuserad DIRECT/173.194.34.32 image/gif
1354543670.349   6271 10.10.48.138 TCP_MISS/200 16237 CONNECT login.live.com:443 monuserad DIRECT/65.54.186.19 -
1354543671.290  16095 10.10.48.138 TCP_MISS/200 19343 GET http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3fY6323mHUZFJMgTvxaG2iE.eot monuserad DIRECT/74.125.230.236 font/eot
1354543678.280  11472 10.10.48.138 TCP_MISS/302 866 GET http://fls.doubleclick.net/activityi;src=2507573;type=enter133;cat=appsh4;ord=7493270981721.024? monuserad DIRECT/74.125.230.252 text/html
1354543683.675   5348 10.10.48.138 TCP_MISS/200 622 GET http://2507573.fls.doubleclick.net/activityi;src=2507573;type=enter133;cat=appsh4;ord=7493270981721.024 monuserad DIRECT/173.194.34.60 text/html
1354543683.847     36 10.10.48.138 TCP_MISS/200 5885 GET http://www.google.com/favicon.ico monuserad DIRECT/173.194.34.49 image/x-icon
1354543713.480  63469 10.10.48.138 TCP_MISS/200 5551 CONNECT home.live.com:443 monuserad DIRECT/65.55.114.223 -
1354543724.741  73800 10.10.48.138 TCP_MISS/200 6424 CONNECT mail.live.com:443 monuserad DIRECT/157.55.0.135 -

Malgré cela, les pages s'affichent, elles arrivent d'un bloc après plusieurs secondes d'attente ! Le gain est pour ainsi dire nul en terme de rapidité de navigation, même sur des sites dont un gros pourcentage de la page n'est pas dynamique.
Cela fait plusieurs jours que j'essaie des configurations différentes sans avoir trouvé de solution.

voici mes fichiers de conf
krb5.conf

[logging]
    default = FILE10000:/var/log/krb5lib.log
 
[libdefaults]
    ticket_lifetime = 24000
    default_realm = MONDOMAIN.MONENTREPRISE.LOCAL
    dns_fallback = no
    dns_lookup_realm = no
    dns_lookup_kdc = true

; for Windows 2003
    default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
    default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
    permitted_enctypes = rc4-hmac des-cbc-crc des-cbc-md5

; for Windows 2008 with AES
;    default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
;    default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
;    permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
     
[realms]
    MONDOMAIN.MONENTREPRISE.LOCAL = {
        kdc = dc1.MONDOMAIN.MONENTREPRISE.local:88
        kdc = dc2.MONDOMAIN.MONENTREPRISE.local:88
        admin_server = dc1.MONDOMAIN.MONENTREPRISE.local:789
        default_domain = MONDOMAIN.MONENTREPRISE.LOCAL
	}
 
[domain_realm]
    .MONDOMAIN.MONENTREPRISE.local = MONDOMAIN.MONENTREPRISE.LOCAL
    MONDOMAIN.MONENTREPRISE.local = MONDOMAIN.MONENTREPRISE.LOCAL

smb.conf

[global]
        security = ADS
        realm = MONDOMAIN.MONENTREPRISE.LOCAL
        password server = dc1.mondomain.monentreprise.local
        workgroup = mondomain
        winbind separator = /
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        winbind enum users = yes
        winbind enum groups = yes
        template homedir = /home/%D/%U
        template shell = /bin/bash
        client use spnego = yes
        winbind use default domain = yes
# empeche le client de devenir maitre explorateur
        domain master = no
        local master = no
        preferred master = no
        os level = 0

squid.conf

###########PRISE EN CHARGE DU LOGIN AD########################################
 
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 50
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 50
auth_param basic realm mondomain.monentreprise.local
auth_param basic credentialsttl 2 hours
 
###########ACCESS LISTE######################################################
 
acl ntlm proxy_auth REQUIRED
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.10.0.0/16   # RFC1918 possible internal network
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 CONNECT method CONNECT

acl block_websites dstdomain .facebook.com .youtube.com 
##########LISTE DES ACL AUTORISEE###########################################
http_access deny block_websites

http_access allow ntlm
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
 
#########PORT D'ECOUTE######################################################
http_port 3128
 
############GESTION DES PARAMETRES DE CACHE#################################
cache_dir ufs /var/spool/squid3 10240 16 256
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .               0       20%     4320
 
############DOMAINE DE LOGIN PAR DEFAUT#####################################
 
append_domain .mondomain.monentreprise.local
visible_hostname proxy-admin 

Hors ligne