{"id":152,"date":"2010-06-10T18:51:31","date_gmt":"2010-06-10T16:51:31","guid":{"rendered":"http:\/\/smolensk.homelinux.org\/?p=152"},"modified":"2014-05-18T11:36:52","modified_gmt":"2014-05-18T09:36:52","slug":"configurer-squid","status":"publish","type":"post","link":"https:\/\/2d6.fr\/?p=152","title":{"rendered":"Configurer squid"},"content":{"rendered":"<p>Sur un proxy <em><strong>squid<\/strong><\/em> install\u00e9, j&rsquo;ai eu besoin de planifier des p\u00e9riodes et des sites bloqu\u00e9s.<\/p>\n<p>Voici mon memento. ( Fichier <code>\/etc\/squid\/squid.conf<\/code> )<\/p>\n<p><code><br \/>\n(...)<br \/>\n# definition reseau local<br \/>\nacl localnet src 192.168.1.0\/255.255.255.0<br \/>\n# ajouts ####<br \/>\n# sites interdits (definitivement)<br \/>\nacl interdits dstdomain www.test.com www.trucdefou.fr<br \/>\nhttp_access deny interdits<br \/>\n# fichier de sites interdits<br \/>\nacl interdits2 dstdomain \"\/etc\/squid\/interdits2\"<br \/>\n# definition horaire de blocage<br \/>\nacl TEMPS1 time SMTWHFA 08:00-18:00<br \/>\n# blocage des sites selon cette periode<br \/>\nhttp_access deny interdits2 TEMPS1<br \/>\n#<br \/>\n# port 7780<br \/>\nhttp_port 7780<br \/>\nhttps_port 7780<br \/>\ncache_effective_user squid<br \/>\ncache_effective_group squid<br \/>\nvisible_hostname nomMachine<br \/>\n<\/code><\/p>\n<p>Le fichier <code>\/etc\/squid\/interdits2<\/code> contient une liste de sites bloqu\u00e9s (noter la syntaxe commen\u00e7ant par un point). Il s&rsquo;agit d&rsquo;un simple fichier texte.<br \/>\n<code><br \/>\n.site1.com<br \/>\n.site2.fr<br \/>\n<\/code><br \/>\nRed\u00e9marrer squid apr\u00e8s modification.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img src=http:\/\/2d6.fr\/acw\/linux20.png>configurer le proxy squid avec des horaires, des listes &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3],"tags":[7,97],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-application_reseau","category-linux","tag-applications","tag-linux"],"_links":{"self":[{"href":"https:\/\/2d6.fr\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2d6.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2d6.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2d6.fr\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/2d6.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":0,"href":"https:\/\/2d6.fr\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"https:\/\/2d6.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2d6.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2d6.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}