Installation d’un proxy Squid version OS: Centos 6.8 version Squid: 3.1 Pré requis Voir l’article Préparation d’une machine Centos 6.x 1.Installation du paquet squid
1 |
$ sudo yum install squid |
Éditer le fichier de conf squid et ajouter les modification en gras dans le texte
1 |
$ sudo vim /etc/squid/squid.conf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT <strong>acl lan src 192.168.3.0/24</strong> <span style="color: #ff0000;"><-- Autoriser le réseau local</span> # # Recommended minimum Access Permission configuration: # # Only allow cachemgr access from localhost # from where browsing should be allowed http_access allow localnet http_access allow localhost <strong>http_access allow lan</strong> <span style="color: #ff0000;"><-- Autoriser les aces lan</span> # And finally deny all other access to this proxy http_access deny all # Squid normally listens to port 3128 <strong>http_port 8080 </strong><span style="color: #ff0000;"><-- définir le port</span> # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /var/spool/squid 100 16 256 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 <strong>request_header_access Referer deny all</strong> <strong>request_header_access X-Forwarded-For deny all</strong> <strong>request_header_access Via deny all</strong> <strong>request_header_access Cache-Control deny all</strong> <strong>visible_hostname proxy.domain.tld <-- </strong> <strong>forwarded_for off </strong><span style="color: #ff0000;"><-- pour ne pas afficher le proxy</span> |
Rendre le service automatique et […]