{"id":81,"date":"2017-05-05T08:14:20","date_gmt":"2017-05-05T08:14:20","guid":{"rendered":"https:\/\/d1m0.com\/?p=81"},"modified":"2018-03-09T16:09:32","modified_gmt":"2018-03-09T16:09:32","slug":"squid3-pam-centos7","status":"publish","type":"post","link":"https:\/\/d1m0.com\/?p=81","title":{"rendered":"squid3 + pam + centos7"},"content":{"rendered":"<p>yum install squid<\/p>\n<blockquote><p>\/etc\/squid\/squid.conf<\/p><\/blockquote>\n<p><!--more--><\/p>\n<blockquote><p>auth_param basic program \/usr\/lib64\/squid\/basic_pam_auth<br \/>\nauth_param basic children 5<br \/>\nauth_param basic realm proxy<br \/>\nauth_param basic credentialsttl 2 hours<br \/>\nacl password proxy_auth REQUIRED<br \/>\nacl localhost src 127.0.0.1\/32 ::1<br \/>\nacl to_localhost dst 127.0.0.0\/8 0.0.0.0\/32 ::1<br \/>\nacl pam proxy_auth REQUIRED<br \/>\nacl SSL_ports port 443<br \/>\nacl Safe_ports port 80 # http<br \/>\nacl Safe_ports port 21 # ftp<br \/>\nacl Safe_ports port 443 # https<\/p>\n<p>&nbsp;<\/p>\n<p>#acl Safe_ports port 70 # gopher<br \/>\n#acl Safe_ports port 210 # wais<br \/>\n#acl Safe_ports port 1025-65535 # unregistered ports<br \/>\n#acl Safe_ports port 280 # http-mgmt<br \/>\n#acl Safe_ports port 488 # gss-http<br \/>\n#acl Safe_ports port 591 # filemaker<br \/>\n#acl Safe_ports port 777 # multiling http<\/p>\n<p>cache deny all<br \/>\nacl CONNECT method CONNECT<br \/>\nhttp_access allow pam<br \/>\nhttp_access allow manager localhost<br \/>\nhttp_access deny manager<br \/>\nhttp_access deny !Safe_ports<br \/>\nhttp_access deny CONNECT !SSL_ports<br \/>\nhttp_access deny all<br \/>\nhttp_port 10.100.200.1:3128<br \/>\nhttp_port 192.168.3.6:3128<\/p>\n<p>acl migrated_hs_0_0 url_regex cgi\\-bin \\?<br \/>\nalways_direct allow migrated_hs_0_0<br \/>\ncoredump_dir \/var\/spool\/squid3<br \/>\nrefresh_pattern ^ftp: 1440 20% 10080<br \/>\nrefresh_pattern ^gopher: 1440 0% 1440<br \/>\nrefresh_pattern -i (\/cgi-bin\/|\\?) 0 0% 0<br \/>\nrefresh_pattern . 0 20% 4320<br \/>\nvisible_hostname GTFO<\/p><\/blockquote>\n<p>Configuration of the <strong>squid PAM authentication helper<\/strong>&gt;pam_auth is quite simple.It just needs a PAM service to be configured \/etc\/pam.d\/<\/p>\n<p>\/etc\/pam.d\/squid<\/p>\n<blockquote><p>auth\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 include\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 password-auth<br \/>\naccount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 include\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 password-auth<\/p><\/blockquote>\n<p>chmod u+s \/usr\/lib64\/squid\/basic_pam_auth<\/p>\n","protected":false},"excerpt":{"rendered":"<p>yum install squid \/etc\/squid\/squid.conf<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=81"}],"version-history":[{"count":6,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":305,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions\/305"}],"wp:attachment":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}