bonjour,
j’essaie de configurer squid sur une de mes passerelles mais je rencontre des problèmes.
voici le fichier de configuration
less squid.conf | egrep -v -e '^[[:blank:]]*#|^$'
acl localnet src 192.168.1.0/24 # 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
http_access allow localhost manager
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny all
http_port 3128 intercept
coredump_dir /var/spool/squid
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
quand j'indique au navigateur d'utiliser ce proxy, tout est normal et je vois bien les accès dans acces.log
mais quand je fais la redirection
iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
toutes les adresses sont réécrites en local
au lieu de
1417183211.159 79 192.168.1.19 TCP_MISS/200 529 GET http://ads.clicmanager.fr/counter.php? - HIER_DIRECT/91.204.119.46 image/gif
j'ai
1417183211.159 79 192.168.1.19 TCP_MISS/200 529 GET /counter.php? -HIER_NONE/- text/html
La doc sur squid ne traite pas de la configuration simple...
Merci
Gérard