Squid et Https

Bonjour,

j’ai squid3 et squidguard fonctionnels sur ma debian.
Par contre un problème s’oppose à moi, les sites en https
En effet, qu’il s’agissent d’un site bloqué ou non , l’accès à la page https est impossible
sur firefox j’ai le message:

[quote]La connexion a échoué

      Firefox ne peut établir de connexion avec le serveur à l'adresse google.fr.

Le site est peut-être temporairement indisponible ou surchargé. Réessayez plus
tard ;
Si vous n’arrivez à naviguer sur aucun site, vérifiez la connexion
au réseau de votre ordinateur ;
Si votre ordinateur ou votre réseau est protégé par un pare-feu ou un proxy,
assurez-vous que Firefox est autorisé à accéder au Web.[/quote]

je ne vois pas du tout où cela peut bien bloquer.
Voici ma config squid3:

[code]http_port 8080
icp_port 0
htcp_port 0
visible_hostname squid

Pour que le proxy soit serveur DNS :

dns_nameservers dns_fai ou/et dns_passerelle

dns_nameservers 10.176.155.206 10.176.155.202
dns_defnames on

acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl our_networks src 127.0.0.1/32 10.176.155.0/24
acl our_servers src 10.176.155.199-10.176.155.206
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 CONNECT method CONNECT
acl POST method POST
never_direct allow CONNECT
never_direct allow POST

le protocole cache_object (acl manager) ne pourra acc�der que depuis l’adresse 127.0.0.1 (acl localhost) et pas depuis une autre

http_access allow manager localhost
http_access deny manager

Interdit l’acc�s aux ports autres que 80, 21, 443 et de 1025 � 65535 (n�gation (!) de acl Safe_ports)

http_access deny !Safe_ports

Interdit l’acc�s vers 127.0.0.0/8 (acl to_localhost)

http_access deny to_localhost

Autorise l’acc�s depuis les serveurs d�finis dans acl our_servers

http_access allow our_servers

Autorise l’acc�s depuis mon r�seau (acl our_networks)

http_access allow our_networks

Interdit tout le reste (mot r�serv� all)

http_access deny all

http_reply_access allow all

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin ?
cache deny QUERY
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 . 0 20% 4320

Attention si vous modifiez les valeurs de la ligne suivante : lancez squid3 -f /etc/squid3/squid.conf -z pour reconstruire le cache !

cache_dir ufs /var/spool/squid3 1024 256 256

Les journaux

cache_effective_user proxy
cache_effective_group proxy
cache_access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
cache_swap_log /var/log/squid3/cache_swap.log

cache_mgr informatique@moa.fr

#SquidGuard
url_rewrite_program /usr/bin/squidGuard -c /etc/squidguard/squidGuard.conf
url_rewrite_children 5
positive_dns_ttl 1 day
negative_dns_ttl 1 hour
[/code]

config squidguard

[code]#

CONFIG FILE FOR SQUIDGUARD

dbhome /var/lib/squidguard/db
logdir /var/log/squidguard

TIME RULES:

abbrev for weekdays:

s = sun, m = mon, t =tue, w = wed, h = thu, f = fri, a = sat

#time workhours {

weekly mtwhf 08:00 - 18:30

date --01 08:00 - 18:30

#}

REWRITE RULES:

#rew dmz {

s@://admin/@://admin.foo.bar.de/@i

s@://foo.bar.de/@://www.foo.bar.de/@i

#}

SOURCE ADDRESSES:

src admin {
ip 10.176.155.82

user root foo bar

within workhours

}

src clients {
ip 10.176.155.0/24
}

DESTINATION CLASSES:

dest adult {
domainlist adult/domains
urllist adult/urls
expressionlist adult/expressions
redirect http://localhost/redirection.html
log adult.log
}
#dest ads {

domainlist ads/domains

urllist ads/urls

log ads.log

#}
#dest porn {

domainlist porn/domains

urllist porn/urls

log porn.log

#}
#dest warez {

domainlist warez/domains

urllist warez/urls

log warez.log

#}

dest social_networks {
domainlist social_networks/domains
urllist social_networks/urls
log social.log
}

acl {
admin {
pass any
}

    clients {
            pass !social_networks any
            redirect http://localhost/redirection.html
    }


    default {
            pass none

rewrite dmz

            redirect http://127.0.0.1/cgi-bin/squidGuard.cgi?clientaddr=%a+clientname=%n+clientident=%i+srcclass=%s+targetclass=%t+url=%u
    }

}
[/code]

et les logs:

1354693805.885 6 10.176.155.59 TCP_REFRESH_MODIFIED/200 2074 GET http://10.176.155.100/html/squid-reports/ - DIRECT/10.176.155.100 text/h$ 1354693805.949 2 10.176.155.59 TCP_REFRESH_MODIFIED/200 7509 GET http://10.176.155.100/html/squid-reports/images/sarg.png - DIRECT/10.176$ 1354694163.392 5 10.176.155.59 TCP_MISS/200 2006 GET http://10.176.155.100/html/squid-reports/2012Dec04-2012Dec04/index.html - DIRECT/10.$ 1354694163.631 4 10.176.155.59 TCP_REFRESH_MODIFIED/200 447 GET http://10.176.155.100/html/squid-reports/images/graph.png - DIRECT/10.176$ 1354694163.634 6 10.176.155.59 TCP_REFRESH_MODIFIED/200 552 GET http://10.176.155.100/html/squid-reports/images/datetime.png - DIRECT/10.$ 1354694165.445 3 10.176.155.59 TCP_MISS/200 2285 GET http://10.176.155.100/html/squid-reports/2012Dec04-2012Dec04/10_176_155_61/10_176_15$ 1354694173.965 6 10.176.155.59 TCP_MISS/200 3825 GET http://10.176.155.100/html/squid-reports/2012Dec04-2012Dec04/10_176_155_59/10_176_15$ 1354695230.530 251 10.176.155.59 TCP_MISS/503 0 CONNECT www.google.com:443 - NONE/- - 1354695233.428 0 10.176.155.59 TCP_MISS/503 0 CONNECT www.google.com:443 - NONE/- - 1354695239.753 284 10.176.155.59 TCP_MISS/302 813 GET http://www.google.com/search? - DIRECT/173.194.67.99 text/html 1354695241.232 1400 10.176.155.59 TCP_MISS/200 52779 GET http://www.google.fr/search? - DIRECT/173.194.67.94 text/html

Pourriez vous m’éclairer svp ?
Merci d’avance

Saloute,

Pour ma part j’utilise la config qui va suivre et tout fonctionne :

acl CONNECT_ports port 443 acl CONNECT method CONNECT http_access deny CONNECT !CONNECT_ports

Je ne vois nul par dans ton fichier de conf, une autorisation pour la methode CONNECT via un http_access ? Alors que tu spécifies bien un never_direct

ah oui nickel,

j’ai modifié comme suit:
lignes rouge supprimées, ligne verte ajoutées

[quote]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_ports port 443
acl CONNECT method CONNECT
acl POST method POST
never_direct allow CONNECT
never_direct allow POST

#autoriser https
http_access deny CONNECT !CONNECT_ports

[/quote]

Merci bcp.
tu maîtrises.