[squid] Problème de configuration

Bonjour a tous,

Je viens d'installer un proxy squid sur mon ubuntu et j'ai un petit souci de configuration je pense car je peux surfer derrière mon proxy depuis le pc ou j'ai installé le proxy mais pas depuis un autre pc de mon lan.

J'ai pourtant créer un groupe et accepté les connexions.

Et j'ai beau regarder et regarder encore mon squid.conf, je ne vois pas la bétise que j'ai faite. (et pourtant je suis sur que c'est un truc evident).

Je fais donc appel a votre aide et je vous remercie par avance de cette aide que vous m'apporterez.

Je vous joint mon fichier conf bien épuré (j'ai enlevé toutes les lignes commentées).

Merci encore de votre aide.

Lonewolf


# Squid normally listens to port 3128
http_port 3128

#We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

#We recommend you to use the following two lines.
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

# Apache to signal ETag correctly on such responses
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

#  To log the request via syslog specify a filepath of "syslog"
access_log /var/log/squid/access.log squid


hosts_file /etc/hosts


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


#Recommended minimum configuration:
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		# https
acl SSL_ports port 563		# snews
acl SSL_ports port 873		# rsync
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 Safe_ports port 631		# cups
acl Safe_ports port 873		# rsync
acl Safe_ports port 901		# SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl lanhome src 192.168.1.0/255.255.255.0


# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports

#http_access allow our_networks
http_access allow localhost
http_access allow lanhome

# And finally deny all other access to this proxy
http_access deny all


# and finally allow by default
http_reply_access allow all

#Allow ICP queries from everyone
icp_access allow all


cache_effective_group proxy

#Default:
visible_hostname StephLinux


#Default:
error_directory /usr/share/squid/errors/French


# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid



ps : Ah oui pour les essais j'ai evidemment modifié mon mode de connexion derrière firefox pour le faire passer par le proxy. Je sais que ca parait evident mais devant une erreur c'est souvent une chose evidente qui bloque tout.
Configuration: Linux
Firefox 2.0.0.6

5 réponses

  • Votes
  • Date
  • Date décroissante
  1. De base Squid ne permet a personne de surfer (access denied) sauf le localhost.

    Tu dois ajouter cette acl :

    acl my_network src 192.168.10.0/24
    http_access allow my_network

    Dans ton squid.conf (remplacer le 192.168.1.0 par la plage de ton reseau evidment :))

    Ca fonctionne maintenant parceque tu autorises les adresses fixe a des plages horaires. (plus rigide, a voir si utile car maitnenance plus lourde)

    un peu tard :$ mais si quelq passe sur cette apge :)
    1. bonjour

      as tu redemarrer squid apres l'avoir configure ?
      1. Bonjour,

        Oui je l'ai redemarré. Redemarrage sans message d'erreur mais quand meme sans le resultat désiré.

        Amitiés
        1. Bon ca y es problème résolu.

          D'une manière assez bizarre car a configuration identique ca marchait chez un collègue.

          Pour moi il a fallut que je nomme les pc faisant partie du lan et que je leur ouvre un plage horaire alors qu'en mettant une plage c'etait ouvert par défaut chez le collège.

          M'enfin problème résolu donc tout va bien dans le meilleur des mondes.

          Je vous joint le fichier conf qui fonctionne et vous remercie de votre aide.

          Amitié a tous

          lonewolf

          # Squid normally listens to port 3128
          http_port 3128
          
          #We recommend you to use at least the following line.
          hierarchy_stoplist cgi-bin ?
          
          #We recommend you to use the following two lines.
          acl QUERY urlpath_regex cgi-bin \?
          cache deny QUERY
          
          # Apache to signal ETag correctly on such responses
          acl apache rep_header Server ^Apache
          broken_vary_encoding allow apache
          
          #  To log the request via syslog specify a filepath of "syslog"
          access_log /var/log/squid/access.log squid
          
          #Default:
          hosts_file /etc/hosts
          
          #Suggested default:
          refresh_pattern ^ftp:      1440   20%   10080
          refresh_pattern ^gopher:   1440   0%   1440
          refresh_pattern .      0   20%   4320
          
          #Recommended minimum configuration:
          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 host1 src 192.168.1.20
          acl jour time 00:00-23:59
          acl regular_days time MTWHF 00:00-23:59
          acl SSL_ports port 443      # https
          acl SSL_ports port 563      # snews
          acl SSL_ports port 873      # rsync
          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 Safe_ports port 631      # cups
          acl Safe_ports port 873      # rsync
          acl Safe_ports port 901      # SWAT
          acl purge method PURGE
          acl CONNECT method CONNECT
          
          # Only allow cachemgr access from localhost
          http_access allow manager localhost
          http_access deny manager
          
          # Only allow purge requests from localhost
          http_access allow purge localhost
          http_access deny purge
          # Deny requests to unknown ports
          http_access deny !Safe_ports
          
          # Deny CONNECT to other than SSL ports
          http_access deny CONNECT !SSL_ports
          
          #http_access allow our_networks
          http_access allow localhost
          http_access allow host1 jour
          http_access deny all
          
          # And finally deny all other access to this proxy
          http_access deny all
          
          # and finally allow by default
          http_reply_access allow all
          
          #Allow ICP queries from everyone
          icp_access allow all
          
          #   group.
          cache_effective_group proxy
          
          #Default:
          visible_hostname StephLinux
          
          #Default:
          error_directory /usr/share/squid/errors/French
          
          # Leave coredumps in the first cache dir
          coredump_dir /var/spool/squid